blob: 6e5fdede8f7acf188e22d534bcc695aafdc08853 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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
*/
|