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/Point3EditorDialog.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/scape/Point3EditorDialog.java')
| -rw-r--r-- | NET/worlds/scape/Point3EditorDialog.java | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/NET/worlds/scape/Point3EditorDialog.java b/NET/worlds/scape/Point3EditorDialog.java new file mode 100644 index 0000000..6e5fded --- /dev/null +++ b/NET/worlds/scape/Point3EditorDialog.java @@ -0,0 +1,95 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Point3EditorDialog +/* */ extends ListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected Property property; +/* */ protected Point3 p; +/* */ +/* */ Point3EditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 32 */ super(parent, title); +/* 33 */ this.property = property; +/* 34 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 39 */ this.p = ((Point3)this.property.get()); +/* 40 */ super.build(); +/* */ } +/* */ +/* */ protected int getElementCount() +/* */ { +/* 45 */ return 3; +/* */ } +/* */ +/* */ protected String getElement(int index) +/* */ { +/* 50 */ switch (index) { +/* */ case 0: +/* 52 */ return this.p.x; +/* */ case 1: +/* 54 */ return this.p.y; +/* */ } +/* 56 */ return this.p.z; +/* */ } +/* */ +/* */ +/* */ protected boolean setElements(StringTokenizer e) +/* */ { +/* 62 */ Point3 p = new Point3(); +/* 63 */ int count = 0; +/* 64 */ while (e.hasMoreTokens()) { +/* */ try { +/* 66 */ float tmp = Float.valueOf(e.nextToken()).floatValue(); +/* 67 */ switch (count++) { +/* */ case 0: +/* 69 */ p.x = tmp; +/* 70 */ break; +/* */ case 1: +/* 72 */ p.y = tmp; +/* 73 */ break; +/* */ case 2: +/* 75 */ p.z = tmp; +/* 76 */ break; +/* */ default: +/* 78 */ return false; +/* */ } +/* */ } catch (Exception x) { +/* 81 */ return false; +/* */ } +/* */ } +/* 84 */ if (count != 3) +/* 85 */ return false; +/* 86 */ this.parent.addUndoableSet(this.property, p); +/* 87 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point3EditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |