| 143 | | id = id_tf.getText(); |
|---|
| 144 | | x = Integer.parseInt(x_tf.getText()); |
|---|
| 145 | | y = Integer.parseInt(y_tf.getText()); |
|---|
| 146 | | lefttop = lefttop_cb.getSelectedItem().toString(); |
|---|
| 147 | | rightbottom = rightbottom_cb.getSelectedItem().toString(); |
|---|
| 148 | | xkeepratio = Boolean.parseBoolean(xkeepratio_cb.getSelectedItem().toString()); |
|---|
| 149 | | ykeepratio = Boolean.parseBoolean(ykeepratio_cb.getSelectedItem().toString()); |
|---|
| 150 | | visible = visible_tf.getText(); |
|---|
| 151 | | help = help_tf.getText(); |
|---|
| 152 | | |
|---|
| 153 | | width = Integer.parseInt(width_tf.getText()); |
|---|
| 154 | | height = Integer.parseInt(height_tf.getText()); |
|---|
| 155 | | font = font_tf.getText(); |
|---|
| 156 | | bgimage = bgimage_tf.getText(); |
|---|
| 157 | | itemimage = itemimage_tf.getText(); |
|---|
| 158 | | openimage = openimage_tf.getText(); |
|---|
| 159 | | closedimage = closedimage_tf.getText(); |
|---|
| 160 | | fgcolor = fgcolor_tf.getText(); |
|---|
| 161 | | selcolor = selcolor_tf.getText(); |
|---|
| 162 | | playcolor = playcolor_tf.getText(); |
|---|
| 163 | | bgcolor1 = bgcolor1_tf.getText(); |
|---|
| 164 | | bgcolor2 = bgcolor2_tf.getText(); |
|---|
| 165 | | flat = (Boolean)flat_cb.getSelectedItem(); |
|---|
| 166 | | |
|---|
| 167 | | s.updateItems(); |
|---|
| 168 | | s.expandItem(id); |
|---|
| 169 | | frame.setDefaultCloseOperation(frame.HIDE_ON_CLOSE); |
|---|
| 170 | | created=true; |
|---|
| | 144 | if(!created) { |
|---|
| | 145 | PlaytreeAddEvent paa = new PlaytreeAddEvent(s.getParentListOf(id),this); |
|---|
| | 146 | |
|---|
| | 147 | id = id_tf.getText(); |
|---|
| | 148 | x = Integer.parseInt(x_tf.getText()); |
|---|
| | 149 | y = Integer.parseInt(y_tf.getText()); |
|---|
| | 150 | lefttop = lefttop_cb.getSelectedItem().toString(); |
|---|
| | 151 | rightbottom = rightbottom_cb.getSelectedItem().toString(); |
|---|
| | 152 | xkeepratio = Boolean.parseBoolean(xkeepratio_cb.getSelectedItem().toString()); |
|---|
| | 153 | ykeepratio = Boolean.parseBoolean(ykeepratio_cb.getSelectedItem().toString()); |
|---|
| | 154 | visible = visible_tf.getText(); |
|---|
| | 155 | help = help_tf.getText(); |
|---|
| | 156 | |
|---|
| | 157 | width = Integer.parseInt(width_tf.getText()); |
|---|
| | 158 | height = Integer.parseInt(height_tf.getText()); |
|---|
| | 159 | font = font_tf.getText(); |
|---|
| | 160 | bgimage = bgimage_tf.getText(); |
|---|
| | 161 | itemimage = itemimage_tf.getText(); |
|---|
| | 162 | openimage = openimage_tf.getText(); |
|---|
| | 163 | closedimage = closedimage_tf.getText(); |
|---|
| | 164 | fgcolor = fgcolor_tf.getText(); |
|---|
| | 165 | selcolor = selcolor_tf.getText(); |
|---|
| | 166 | playcolor = playcolor_tf.getText(); |
|---|
| | 167 | bgcolor1 = bgcolor1_tf.getText(); |
|---|
| | 168 | bgcolor2 = bgcolor2_tf.getText(); |
|---|
| | 169 | flat = (Boolean)flat_cb.getSelectedItem(); |
|---|
| | 170 | |
|---|
| | 171 | s.updateItems(); |
|---|
| | 172 | s.expandItem(id); |
|---|
| | 173 | frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); |
|---|
| | 174 | created=true; |
|---|
| | 175 | |
|---|
| | 176 | s.m.hist.addEvent(paa); |
|---|
| | 177 | } |
|---|
| | 178 | else { |
|---|
| | 179 | PlaytreeEditEvent pee = new PlaytreeEditEvent(this); |
|---|
| | 180 | |
|---|
| | 181 | id = id_tf.getText(); |
|---|
| | 182 | x = Integer.parseInt(x_tf.getText()); |
|---|
| | 183 | y = Integer.parseInt(y_tf.getText()); |
|---|
| | 184 | lefttop = lefttop_cb.getSelectedItem().toString(); |
|---|
| | 185 | rightbottom = rightbottom_cb.getSelectedItem().toString(); |
|---|
| | 186 | xkeepratio = Boolean.parseBoolean(xkeepratio_cb.getSelectedItem().toString()); |
|---|
| | 187 | ykeepratio = Boolean.parseBoolean(ykeepratio_cb.getSelectedItem().toString()); |
|---|
| | 188 | visible = visible_tf.getText(); |
|---|
| | 189 | help = help_tf.getText(); |
|---|
| | 190 | |
|---|
| | 191 | width = Integer.parseInt(width_tf.getText()); |
|---|
| | 192 | height = Integer.parseInt(height_tf.getText()); |
|---|
| | 193 | font = font_tf.getText(); |
|---|
| | 194 | bgimage = bgimage_tf.getText(); |
|---|
| | 195 | itemimage = itemimage_tf.getText(); |
|---|
| | 196 | openimage = openimage_tf.getText(); |
|---|
| | 197 | closedimage = closedimage_tf.getText(); |
|---|
| | 198 | fgcolor = fgcolor_tf.getText(); |
|---|
| | 199 | selcolor = selcolor_tf.getText(); |
|---|
| | 200 | playcolor = playcolor_tf.getText(); |
|---|
| | 201 | bgcolor1 = bgcolor1_tf.getText(); |
|---|
| | 202 | bgcolor2 = bgcolor2_tf.getText(); |
|---|
| | 203 | flat = (Boolean)flat_cb.getSelectedItem(); |
|---|
| | 204 | |
|---|
| | 205 | s.updateItems(); |
|---|
| | 206 | s.expandItem(id); |
|---|
| | 207 | |
|---|
| | 208 | pee.setNew(); |
|---|
| | 209 | s.m.hist.addEvent(pee); |
|---|
| | 210 | } |
|---|