ilog.cpl.graph.action.toolbar
Class IlpGraphInteractorAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ilog.cpl.graph.action.toolbar.IlpAbstractGraphAction
          extended by ilog.cpl.graph.action.toolbar.IlpGraphInteractorAction
All Implemented Interfaces:
InteractorListener, ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
IlpEquipmentInteractorAction, IlpNetworkInteractorAction

public abstract class IlpGraphInteractorAction
extends IlpAbstractGraphAction
implements InteractorListener

This action sets an interactor on the view. The button remains highlighted as long as the interactor is active.

Since:
JTGO 4.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
protected IlpGraphInteractorAction(IlpViewsView view, AbstractButton button, IlpViewsViewInteractor interactor, String bundle)
          Creates the action.
protected IlpGraphInteractorAction(IlpViewsView view, AbstractButton button, IlvManagerViewInteractor interactor, String bundle)
          Creates the action.
protected IlpGraphInteractorAction(IlpViewsView view, String bundle)
          Creates the action.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
protected  boolean belongsToThisInteractor(IlvManagerViewInteractor otherInteractor)
          Indicates if the given interactors is the same one as the interactor registered for this action.
 IlpViewsViewInteractor getCplInteractor()
          Deprecated. Please use getIlpInteractor instead.
 IlpViewsViewInteractor getIlpInteractor()
          Gets the associated ILOG JTGO interactor.
 IlvManagerViewInteractor getIlvInteractor()
          Gets the associated ILOG JViews interactor.
 void interactorChanged(InteractorChangedEvent event)
          Listen to interactor changes in the attached views.
 void setButton(AbstractButton b)
          Associates a button with this action.
protected  void setIlpInteractor(IlpViewsViewInteractor interactor)
          Sets the associated ILOG JTGO interactor.
protected  void setIlvInteractor(IlvManagerViewInteractor interactor)
          Sets the associated ILOG JViews interactor.
 
Methods inherited from class ilog.cpl.graph.action.toolbar.IlpAbstractGraphAction
getContext, getView
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

IlpGraphInteractorAction

protected IlpGraphInteractorAction(IlpViewsView view,
                                   AbstractButton button,
                                   IlvManagerViewInteractor interactor,
                                   String bundle)
Creates the action.

Parameters:
view - The view on which to operate.
button - Button to which the action will be attached.
interactor - The interactor to activate when the button is pressed.
bundle - The resource bundle containing localized messages.

IlpGraphInteractorAction

protected IlpGraphInteractorAction(IlpViewsView view,
                                   AbstractButton button,
                                   IlpViewsViewInteractor interactor,
                                   String bundle)
Creates the action.

Parameters:
view - The view on which to operate.
button - Button to which the action will be attached.
interactor - The interactor to activate when the button is pressed.
bundle - The resource bundle containing localized messages.

IlpGraphInteractorAction

protected IlpGraphInteractorAction(IlpViewsView view,
                                   String bundle)
Creates the action.

An interactor must be set prior to use.

Parameters:
view - The view on which to operate.
bundle - The resource bundle containing localized messages.
Since:
JTGO 4.0
See Also:
setIlpInteractor(ilog.cpl.graphic.views.IlpViewsViewInteractor), setIlvInteractor(ilog.views.IlvManagerViewInteractor), setButton(javax.swing.AbstractButton)
Method Detail

setButton

public void setButton(AbstractButton b)
Associates a button with this action. This method should be used if a visual feedback on the toolbar button is required when this action is activated.

Parameters:
b - Button where this action is currently registered
Since:
JTGO 4.0

getIlvInteractor

public IlvManagerViewInteractor getIlvInteractor()
Gets the associated ILOG JViews interactor.


getIlpInteractor

public IlpViewsViewInteractor getIlpInteractor()
Gets the associated ILOG JTGO interactor.


getCplInteractor

public IlpViewsViewInteractor getCplInteractor()
Deprecated. Please use getIlpInteractor instead.

Gets the associated ILOG JTGO interactor.

Deprecated Since:
JTGO 4.0

setIlpInteractor

protected void setIlpInteractor(IlpViewsViewInteractor interactor)
Sets the associated ILOG JTGO interactor.

Parameters:
interactor -
Since:
JTGO 4.0

setIlvInteractor

protected void setIlvInteractor(IlvManagerViewInteractor interactor)
Sets the associated ILOG JViews interactor.

Parameters:
interactor -
Since:
JTGO 4.0

belongsToThisInteractor

protected boolean belongsToThisInteractor(IlvManagerViewInteractor otherInteractor)
Indicates if the given interactors is the same one as the interactor registered for this action.

This implementation verifies if the given interactor corresponds to getIlvInteractor().


interactorChanged

public void interactorChanged(InteractorChangedEvent event)
Listen to interactor changes in the attached views.

Specified by:
interactorChanged in interface InteractorListener
Parameters:
event - The modification event.
Internal method or field: do not use!

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener


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