UpdateActionsEvent.java :  » Mail-Clients » pooka » net » suberic » util » event » Java Open Source

Java Open Source » Mail Clients » pooka 
pooka » net » suberic » util » event » UpdateActionsEvent.java
package net.suberic.util.event;
import java.util.Hashtable;
import javax.swing.Action;

/**
 * This is an event which indicates that a ConifugrableUI element should
 * update its Action list.
 */
public class UpdateActionsEvent {
    
    Hashtable commands = null;
    Action[] actions = null;
    
    /** 
     * This creates a new UpdateActionsEvents with a Hashtable of new
     * Actions.
     */
    public UpdateActionsEvent(Hashtable newCommands) {
  commands = newCommands;
    }

    /**
     * This creates a new UpdateActionsEvent from an array of Actions.
     */

    public UpdateActionsEvent(Action[] newActions) {
  actions=newActions;
    }

    public Hashtable getCommands() {
  return commands;
    }

    public Action[] getActions() {
  return actions;
    }

    public boolean hasCommands() {
  return (commands != null);
    }

    public boolean hasActions() {
  return (actions != null);
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.