| 102 | | id = id_tf.getText(); |
|---|
| 103 | | x = Integer.parseInt(x_tf.getText()); |
|---|
| 104 | | y = Integer.parseInt(y_tf.getText()); |
|---|
| 105 | | lefttop = lefttop_cb.getSelectedItem().toString(); |
|---|
| 106 | | rightbottom = rightbottom_cb.getSelectedItem().toString(); |
|---|
| 107 | | xkeepratio = Boolean.parseBoolean(xkeepratio_cb.getSelectedItem().toString()); |
|---|
| 108 | | ykeepratio = Boolean.parseBoolean(ykeepratio_cb.getSelectedItem().toString()); |
|---|
| 109 | | visible = visible_tf.getText(); |
|---|
| 110 | | help = help_tf.getText(); |
|---|
| 111 | | |
|---|
| 112 | | up1 = up1_tf.getText(); |
|---|
| 113 | | over1 = over1_tf.getText(); |
|---|
| 114 | | down1 = down1_tf.getText(); |
|---|
| 115 | | action1 = action1_tf.getText(); |
|---|
| 116 | | tooltiptext1 = tooltiptext1_tf.getText(); |
|---|
| 117 | | up2 = up2_tf.getText(); |
|---|
| 118 | | over2 = over2_tf.getText(); |
|---|
| 119 | | down2 = down2_tf.getText(); |
|---|
| 120 | | action2 = action2_tf.getText(); |
|---|
| 121 | | tooltiptext2 = tooltiptext2_tf.getText(); |
|---|
| 122 | | state = state_tf.getText(); |
|---|
| 123 | | |
|---|
| 124 | | s.updateItems(); |
|---|
| 125 | | s.expandItem(id); |
|---|
| 126 | | frame.setDefaultCloseOperation(frame.HIDE_ON_CLOSE); |
|---|
| 127 | | created = true; |
|---|
| | 103 | if(!created) { |
|---|
| | 104 | id = id_tf.getText(); |
|---|
| | 105 | x = Integer.parseInt(x_tf.getText()); |
|---|
| | 106 | y = Integer.parseInt(y_tf.getText()); |
|---|
| | 107 | lefttop = lefttop_cb.getSelectedItem().toString(); |
|---|
| | 108 | rightbottom = rightbottom_cb.getSelectedItem().toString(); |
|---|
| | 109 | xkeepratio = Boolean.parseBoolean(xkeepratio_cb.getSelectedItem().toString()); |
|---|
| | 110 | ykeepratio = Boolean.parseBoolean(ykeepratio_cb.getSelectedItem().toString()); |
|---|
| | 111 | visible = visible_tf.getText(); |
|---|
| | 112 | help = help_tf.getText(); |
|---|
| | 113 | |
|---|
| | 114 | up1 = up1_tf.getText(); |
|---|
| | 115 | over1 = over1_tf.getText(); |
|---|
| | 116 | down1 = down1_tf.getText(); |
|---|
| | 117 | action1 = action1_tf.getText(); |
|---|
| | 118 | tooltiptext1 = tooltiptext1_tf.getText(); |
|---|
| | 119 | up2 = up2_tf.getText(); |
|---|
| | 120 | over2 = over2_tf.getText(); |
|---|
| | 121 | down2 = down2_tf.getText(); |
|---|
| | 122 | action2 = action2_tf.getText(); |
|---|
| | 123 | tooltiptext2 = tooltiptext2_tf.getText(); |
|---|
| | 124 | state = state_tf.getText(); |
|---|
| | 125 | |
|---|
| | 126 | CheckboxAddEvent cae = new CheckboxAddEvent(s.getParentListOf(id),this); |
|---|
| | 127 | s.m.hist.addEvent(cae); |
|---|
| | 128 | |
|---|
| | 129 | s.updateItems(); |
|---|
| | 130 | s.expandItem(id); |
|---|
| | 131 | frame.setDefaultCloseOperation(frame.HIDE_ON_CLOSE); |
|---|
| | 132 | created = true; |
|---|
| | 133 | } |
|---|
| | 134 | else { |
|---|
| | 135 | CheckboxEditEvent cee = new CheckboxEditEvent(this); |
|---|
| | 136 | |
|---|
| | 137 | id = id_tf.getText(); |
|---|
| | 138 | x = Integer.parseInt(x_tf.getText()); |
|---|
| | 139 | y = Integer.parseInt(y_tf.getText()); |
|---|
| | 140 | lefttop = lefttop_cb.getSelectedItem().toString(); |
|---|
| | 141 | rightbottom = rightbottom_cb.getSelectedItem().toString(); |
|---|
| | 142 | xkeepratio = Boolean.parseBoolean(xkeepratio_cb.getSelectedItem().toString()); |
|---|
| | 143 | ykeepratio = Boolean.parseBoolean(ykeepratio_cb.getSelectedItem().toString()); |
|---|
| | 144 | visible = visible_tf.getText(); |
|---|
| | 145 | help = help_tf.getText(); |
|---|
| | 146 | |
|---|
| | 147 | up1 = up1_tf.getText(); |
|---|
| | 148 | over1 = over1_tf.getText(); |
|---|
| | 149 | down1 = down1_tf.getText(); |
|---|
| | 150 | action1 = action1_tf.getText(); |
|---|
| | 151 | tooltiptext1 = tooltiptext1_tf.getText(); |
|---|
| | 152 | up2 = up2_tf.getText(); |
|---|
| | 153 | over2 = over2_tf.getText(); |
|---|
| | 154 | down2 = down2_tf.getText(); |
|---|
| | 155 | action2 = action2_tf.getText(); |
|---|
| | 156 | tooltiptext2 = tooltiptext2_tf.getText(); |
|---|
| | 157 | state = state_tf.getText(); |
|---|
| | 158 | |
|---|
| | 159 | cee.setNew(); |
|---|
| | 160 | s.m.hist.addEvent(cee); |
|---|
| | 161 | |
|---|
| | 162 | s.updateItems(); |
|---|
| | 163 | s.expandItem(id); |
|---|
| | 164 | } |
|---|