/* */ 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 */