|
@@ -105,7 +105,6 @@ public class ActionTriggersListPanel extends JPanel {
|
105
|
105
|
if (getComponentCount() == 0) {
|
106
|
106
|
add(new TextLabel("No triggers."));
|
107
|
107
|
}
|
108
|
|
- getLayout().layoutContainer(this);
|
109
|
108
|
setVisible(true);
|
110
|
109
|
}
|
111
|
110
|
}
|
|
@@ -146,11 +145,11 @@ public class ActionTriggersListPanel extends JPanel {
|
146
|
145
|
return triggers;
|
147
|
146
|
}
|
148
|
147
|
}
|
149
|
|
-
|
|
148
|
+
|
150
|
149
|
public ActionType getTrigger(final int index) {
|
151
|
150
|
return triggers.get(index);
|
152
|
151
|
}
|
153
|
|
-
|
|
152
|
+
|
154
|
153
|
public int getTriggerCount() {
|
155
|
154
|
synchronized (triggers) {
|
156
|
155
|
return triggers.size();
|
|
@@ -189,4 +188,24 @@ public class ActionTriggersListPanel extends JPanel {
|
189
|
188
|
listener.triggerRemoved(type);
|
190
|
189
|
}
|
191
|
190
|
}
|
|
191
|
+
|
|
192
|
+ /** {@inheritDoc} */
|
|
193
|
+ @Override
|
|
194
|
+ public void setEnabled(final boolean enabled) {
|
|
195
|
+ SwingUtilities.invokeLater(new Runnable() {
|
|
196
|
+
|
|
197
|
+ /** {@inheritDoc} */
|
|
198
|
+ @Override
|
|
199
|
+ public void run() {
|
|
200
|
+ if (enabled) {
|
|
201
|
+ layoutComponents();
|
|
202
|
+ } else {
|
|
203
|
+ setVisible(false);
|
|
204
|
+ removeAll();
|
|
205
|
+ add(new TextLabel("No triggers."));
|
|
206
|
+ setVisible(true);
|
|
207
|
+ }
|
|
208
|
+ }
|
|
209
|
+ });
|
|
210
|
+ }
|
192
|
211
|
}
|