ilog.views.appframe.event
Class IlvActionHandlerArray

java.lang.Object
  extended by ilog.views.appframe.event.IlvActionHandlerArray
All Implemented Interfaces:
ActionHandler, ActionListener, EventListener

public class IlvActionHandlerArray
extends Object
implements ActionHandler

Action handler that contains an array of action handlers.


Constructor Summary
IlvActionHandlerArray()
          Constructs a new IlvActionHandlerArray.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs.
 void addActionHandler(ActionHandler actionHandler)
          Adds the specified actionHandler to the list of action handlers of this object.
 ActionHandler getActionHandler(String command)
          Retrieves the action handler of this object that is able to process the action with the specified command key.
 boolean isProcessingAction(String command)
          Determines whether the action handler is able to perform the action with the specified command key in its ActionListener.actionPerformed(java.awt.event.ActionEvent) method.
 boolean removeActionHandler(ActionHandler actionHandler)
          Removes the specified actionHandler from the list of action handlers of this object.
 boolean updateAction(Action action)
          Invoked by the application to update the state of the specified action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvActionHandlerArray

public IlvActionHandlerArray()
Constructs a new IlvActionHandlerArray.

Method Detail

isProcessingAction

public boolean isProcessingAction(String command)
Determines whether the action handler is able to perform the action with the specified command key in its ActionListener.actionPerformed(java.awt.event.ActionEvent) method.

Specified by:
isProcessingAction in interface ActionHandler
Parameters:
command - The command key of the action.
Returns:
true if one of the action handlers added to the object can process the action; false otherwise.
See Also:
getActionHandler(java.lang.String)

getActionHandler

public ActionHandler getActionHandler(String command)
Retrieves the action handler of this object that is able to process the action with the specified command key.

Parameters:
command - The command key of the action to retrieve an action handler from.
Returns:
The action handler with the ActionHandler.isProcessingAction(java.lang.String) method that returns true for the specified action command or null if there is no action handler that can process this action.
See Also:
isProcessingAction(java.lang.String)

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs. The action handler returned by the getActionHandler(java.lang.String) method has its actionPerformed method called with the specified action event parameter.

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - The action event to process.

updateAction

public boolean updateAction(Action action)
Invoked by the application to update the state of the specified action.

Specified by:
updateAction in interface ActionHandler
Parameters:
action - The action to update.
Returns:
true if one of the action handlers of this object could update the state of the action; false otherwise.

addActionHandler

public void addActionHandler(ActionHandler actionHandler)
Adds the specified actionHandler to the list of action handlers of this object.

Parameters:
actionHandler - The new action handler to add.
See Also:
removeActionHandler(ilog.views.appframe.event.ActionHandler)

removeActionHandler

public boolean removeActionHandler(ActionHandler actionHandler)
Removes the specified actionHandler from the list of action handlers of this object.

Parameters:
actionHandler - The action handler to remove.
Returns:
true if the action handler was previously added to this object; false otherwise.
See Also:
addActionHandler(ilog.views.appframe.event.ActionHandler)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.