ilog.views.diagrammer.application
Class IlvDiagrammerAction.Handler

java.lang.Object
  extended by ilog.views.util.swing.context.ComponentAction.Handler
      extended by ilog.views.diagrammer.application.IlvDiagrammerAction.Handler
Enclosing class:
IlvDiagrammerAction

public static class IlvDiagrammerAction.Handler
extends ilog.views.util.swing.context.ComponentAction.Handler

This class can be used to redefine the behavior of a predefined action.

See Also:
IlvDiagrammerAction.setHandler(ilog.views.diagrammer.application.IlvDiagrammerAction.Handler)

Constructor Summary
IlvDiagrammerAction.Handler()
           
 
Method Summary
 void perform(ilog.views.util.swing.context.ComponentAction action, Component target, ActionEvent event)
          This method is called when an ComponentAction is performed.
 void perform(IlvDiagrammerAction action, IlvDiagrammer diagrammer, ActionEvent event)
          This method is called when an IlvDiagrammerAction is performed.
 void update(ilog.views.util.swing.context.ComponentAction action, Component target)
          This method is called when the state (enabled/disabled, selected/unselected) of an ComponentAction is queried.
 void update(IlvDiagrammerAction action, IlvDiagrammer diagrammer)
          This method is called when the state (enabled/disabled, selected/unselected) of an IlvDiagrammerAction is queried.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvDiagrammerAction.Handler

public IlvDiagrammerAction.Handler()
Method Detail

perform

public void perform(IlvDiagrammerAction action,
                    IlvDiagrammer diagrammer,
                    ActionEvent event)
             throws Exception
This method is called when an IlvDiagrammerAction is performed.

The default implementation calls the perform(IlvDiagrammerAction, IlvDiagrammer, ActionEvent) method of the action.

Parameters:
action - The action that is being performed.
diagrammer - The diagram component on which the action is being performed.
event - The AWT action event that causes the action to be performed.
Throws:
Exception

update

public void update(IlvDiagrammerAction action,
                   IlvDiagrammer diagrammer)
            throws Exception
This method is called when the state (enabled/disabled, selected/unselected) of an IlvDiagrammerAction is queried. The implementation of this method should call the AbstractAction.setEnabled(boolean) and ComponentAction.setSelected(boolean) methods of the action.

The default implementation calls the update(IlvDiagrammerAction, IlvDiagrammer) method of the action.

Parameters:
action - The action that is being updated.
diagrammer - The diagram component for which the action is being updated.
Throws:
Exception

perform

public final void perform(ilog.views.util.swing.context.ComponentAction action,
                          Component target,
                          ActionEvent event)
                   throws Exception
Description copied from class: ilog.views.util.swing.context.ComponentAction.Handler
This method is called when an ComponentAction is performed.

The default implementation calls the ComponentAction.perform(java.awt.event.ActionEvent, java.awt.Component) method of the action.

Overrides:
perform in class ilog.views.util.swing.context.ComponentAction.Handler
Parameters:
action - The action that is being performed.
target - The component on which the action is being performed.
event - The AWT action event that causes the action to be performed.
Throws:
Exception

update

public final void update(ilog.views.util.swing.context.ComponentAction action,
                         Component target)
                  throws Exception
Description copied from class: ilog.views.util.swing.context.ComponentAction.Handler
This method is called when the state (enabled/disabled, selected/unselected) of an ComponentAction is queried. The implementation of this method should call the AbstractAction.setEnabled(boolean) and ComponentAction.setSelected(boolean) methods of the action.

The default implementation calls the ComponentAction.update(java.awt.Component) method of the action.

Overrides:
update in class ilog.views.util.swing.context.ComponentAction.Handler
Parameters:
action - The action that is being updated.
target - The component for which the action is being updated.
Throws:
Exception


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