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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
/* */ package NET.worlds.scape;
/* */
/* */ import NET.worlds.core.Std;
/* */ import java.util.Enumeration;
/* */ import java.util.Vector;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ abstract class ObjectSelectorDialog
/* */ extends ListAdderDialog
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Property property;
/* 31 */ private Vector<Object> objectVector = null;
/* 32 */ SuperRoot root = null;
/* 33 */ Class<?> clas = null;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ ObjectSelectorDialog(EditTile parent, String title, Property property, SuperRoot r, Class<?> clas)
/* */ {
/* 42 */ super(parent, title);
/* 43 */ this.property = property;
/* 44 */ this.root = r;
/* 45 */ this.clas = clas;
/* 46 */ ready();
/* */ }
/* */
/* */ private void quicksort(String[] objectList, int l, int r)
/* */ {
/* 51 */ if (r > l) {
/* 52 */ String v = objectList[r];
/* */
/* */
/* 55 */ int i = l - 1;
/* 56 */ int j = r;
/* */ String tstr;
/* */ Object tobj;
/* */ do {
/* */ do {
/* 61 */ i++; } while (objectList[i].compareTo(v) < 0);
/* */ do {
/* 63 */ j--; } while ((j > l) && (objectList[j].compareTo(v) > 0));
/* */
/* */
/* */
/* 67 */ tstr = objectList[i];
/* 68 */ objectList[i] = objectList[j];
/* 69 */ objectList[j] = tstr;
/* */
/* 71 */ tobj = this.objectVector.elementAt(i);
/* 72 */ this.objectVector.setElementAt(this.objectVector.elementAt(j), i);
/* 73 */ this.objectVector.setElementAt(tobj, j);
/* 60 */ } while (
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 74 */ j > i);
/* */
/* */
/* 77 */ objectList[j] = objectList[i];
/* 78 */ objectList[i] = objectList[r];
/* 79 */ objectList[r] = tstr;
/* 80 */ this.objectVector.setElementAt(this.objectVector.elementAt(i), j);
/* 81 */ this.objectVector.setElementAt(this.objectVector.elementAt(r), i);
/* 82 */ this.objectVector.setElementAt(tobj, r);
/* 83 */ quicksort(objectList, l, i - 1);
/* 84 */ quicksort(objectList, i + 1, r);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ protected void build()
/* */ {
/* 94 */ this.objectVector = new Vector();
/* 95 */ if (this.root != null) {
/* 96 */ for (Enumeration<?> e = this.root.getDeepOwned(); e.hasMoreElements();)
/* */ {
/* 98 */ Object obj = e.nextElement();
/* 99 */ if (Std.instanceOf(obj, this.clas)) {
/* 100 */ this.objectVector.addElement(obj);
/* */ }
/* */ }
/* */
/* 104 */ String[] objectList = new String[this.objectVector.size()];
/* 105 */ for (int i = 0; i < objectList.length; i++) {
/* 106 */ objectList[i] = this.objectVector.elementAt(i).toString();
/* */ }
/* */
/* 109 */ quicksort(objectList, 0, objectList.length - 1);
/* */
/* */
/* 112 */ setListContents(objectList);
/* */ }
/* 114 */ super.build();
/* */ }
/* */
/* */
/* */
/* */
/* */ protected abstract void addIt(Property paramProperty, Object paramObject);
/* */
/* */
/* */
/* */
/* */ protected void add(int option)
/* */ {
/* 127 */ Object obj = this.objectVector.elementAt(option);
/* 128 */ if (obj != null) {
/* 129 */ addIt(this.property, obj);
/* */ }
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ObjectSelectorDialog.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|