01: package net.suberic.util.event;
02:
03: import java.util.Hashtable;
04: import javax.swing.Action;
05:
06: /**
07: * This is an event which indicates that a ConifugrableUI element should
08: * update its Action list.
09: */
10: public class UpdateActionsEvent {
11:
12: Hashtable commands = null;
13: Action[] actions = null;
14:
15: /**
16: * This creates a new UpdateActionsEvents with a Hashtable of new
17: * Actions.
18: */
19: public UpdateActionsEvent(Hashtable newCommands) {
20: commands = newCommands;
21: }
22:
23: /**
24: * This creates a new UpdateActionsEvent from an array of Actions.
25: */
26:
27: public UpdateActionsEvent(Action[] newActions) {
28: actions = newActions;
29: }
30:
31: public Hashtable getCommands() {
32: return commands;
33: }
34:
35: public Action[] getActions() {
36: return actions;
37: }
38:
39: public boolean hasCommands() {
40: return (commands != null);
41: }
42:
43: public boolean hasActions() {
44: return (actions != null);
45: }
46: }
|