diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/Point2EditorDialog.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/scape/Point2EditorDialog.java')
| -rw-r--r-- | NET/worlds/scape/Point2EditorDialog.java | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/NET/worlds/scape/Point2EditorDialog.java b/NET/worlds/scape/Point2EditorDialog.java new file mode 100644 index 0000000..4c3b28c --- /dev/null +++ b/NET/worlds/scape/Point2EditorDialog.java @@ -0,0 +1,85 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Point2EditorDialog +/* */ extends ListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected Property property; +/* */ protected Point2 p; +/* */ +/* */ Point2EditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 28 */ super(parent, title); +/* 29 */ this.property = property; +/* 30 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 35 */ this.p = ((Point2)this.property.get()); +/* 36 */ super.build(); +/* */ } +/* */ +/* */ protected int getElementCount() +/* */ { +/* 41 */ return 2; +/* */ } +/* */ +/* */ protected String getElement(int index) +/* */ { +/* 46 */ switch (index) { +/* */ case 0: +/* 48 */ return this.p.x; +/* */ } +/* 50 */ return this.p.y; +/* */ } +/* */ +/* */ +/* */ protected boolean setElements(StringTokenizer e) +/* */ { +/* 56 */ Point2 p = new Point2(); +/* 57 */ int count = 0; +/* 58 */ while (e.hasMoreTokens()) +/* */ try { +/* 60 */ float tmp = Float.valueOf(e.nextToken()).floatValue(); +/* 61 */ switch (count++) { +/* */ case 0: +/* 63 */ p.x = tmp; +/* 64 */ break; +/* */ case 1: +/* 66 */ p.y = tmp; +/* 67 */ break; +/* */ default: +/* 69 */ return false; +/* */ } +/* */ } catch (Exception x) { +/* 72 */ return false; +/* */ } +/* 74 */ if (count != 2) +/* 75 */ return false; +/* 76 */ this.parent.addUndoableSet(this.property, p); +/* 77 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point2EditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |