KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > suberic > util > event > UpdateActionsEvent


1 package net.suberic.util.event;
2 import java.util.Hashtable JavaDoc;
3 import javax.swing.Action JavaDoc;
4
5 /**
6  * This is an event which indicates that a ConifugrableUI element should
7  * update its Action list.
8  */

9 public class UpdateActionsEvent {
10     
11     Hashtable JavaDoc commands = null;
12     Action JavaDoc[] actions = null;
13     
14     /**
15      * This creates a new UpdateActionsEvents with a Hashtable of new
16      * Actions.
17      */

18     public UpdateActionsEvent(Hashtable JavaDoc newCommands) {
19     commands = newCommands;
20     }
21
22     /**
23      * This creates a new UpdateActionsEvent from an array of Actions.
24      */

25
26     public UpdateActionsEvent(Action JavaDoc[] newActions) {
27     actions=newActions;
28     }
29
30     public Hashtable JavaDoc getCommands() {
31     return commands;
32     }
33
34     public Action JavaDoc[] getActions() {
35     return actions;
36     }
37
38     public boolean hasCommands() {
39     return (commands != null);
40     }
41
42     public boolean hasActions() {
43     return (actions != null);
44     }
45 }
46
Popular Tags