org.objectweb.fractal.gui.history.control
Class GoNextAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.objectweb.fractal.swing.AbstractAction
          extended byorg.objectweb.fractal.gui.history.control.GoNextAction
All Implemented Interfaces:
Action, org.objectweb.fractal.swing.ActionAttributes, ActionListener, AttributeController, BindingController, Cloneable, EventListener, HistoryListener, Serializable

public class GoNextAction
extends org.objectweb.fractal.swing.AbstractAction
implements HistoryListener, BindingController

An action that just calls the goNext method on an HistoryManager. This action listens to the history model in order to enable or disable itfself when the canGoNext state changes.

See Also:
Serialized Form

Field Summary
static String HISTORY_MANAGER_BINDING
          A mandatory client interface bound to a history model.
 
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
GoNextAction()
          Constructs a new GoNextAction component.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void bindFc(String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 void historyStateChanged()
          Notifies this listener that the state of the history model has changed.
 String[] listFc()
          Returns the names of the client interfaces of the component to which this interface belongs.
 Object lookupFc(String clientItfName)
          Returns the interface to which the given client interface is bound.
 void unbindFc(String clientItfName)
          Unbinds the given client interface.
 
Methods inherited from class org.objectweb.fractal.swing.AbstractAction
getAcceleratorKey, getIconURL, getName, getToolTipText, setAcceleratorKey, setIconURL, setName, setToolTipText
 
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
 

Field Detail

HISTORY_MANAGER_BINDING

public static final String HISTORY_MANAGER_BINDING
A mandatory client interface bound to a history model. This is the model modified by this controller component.

See Also:
Constant Field Values
Constructor Detail

GoNextAction

public GoNextAction()
Constructs a new GoNextAction component.

Method Detail

listFc

public String[] listFc()
Description copied from interface: BindingController
Returns the names of the client interfaces of the component to which this interface belongs.

Specified by:
listFc in interface BindingController
Returns:
the names of the client interfaces of the component to which this interface belongs.

lookupFc

public Object lookupFc(String clientItfName)
Description copied from interface: BindingController
Returns the interface to which the given client interface is bound. More precisely, returns the server interface to which the client interface whose name is given is bound. This server interface is necessarily in the same address space as the client interface (see bindFc).

Specified by:
lookupFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
Returns:
the server interface to which the given interface is bound, or null if it is not bound.

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
Description copied from interface: BindingController
Binds the client interface whose name is given to a server interface. More precisely, binds the client interface of the component to which this interface belongs, and whose name is equal to the given name, to the given server interface. The given server interface must be in the same address space as the client interface.

Specified by:
bindFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
serverItf - a server interface.

unbindFc

public void unbindFc(String clientItfName)
Description copied from interface: BindingController
Unbinds the given client interface. More precisely, unbinds the client interface of the component to which this interface belongs, and whose name is equal to the given name.

Specified by:
unbindFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.

historyStateChanged

public void historyStateChanged()
Description copied from interface: HistoryListener
Notifies this listener that the state of the history model has changed. This method is called each time the state of the history model has changed in such a way that the result of canGoPrevious or canGoNext changes.

Specified by:
historyStateChanged in interface HistoryListener

actionPerformed

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