org.objectweb.fractal.gui.menu.control
Class OpenAction

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

public class OpenAction
extends org.objectweb.fractal.swing.AbstractAction
implements BindingController, LifeCycleController

An action to open a configuration stored in a repository.

See Also:
Serialized Form

Field Summary
static String CONFIGURATION_BINDING
          A mandatory client interface bound to a configuration model.
static String GRAPH_BINDING
          An optional client interface bound to a graph model.
static String REPOSITORY_BINDING
          A mandatory client interface bound to a repository.
static String SAVE_ACTION_BINDING
          An optional client interface bound to a save action.
static String SELECTION_BINDING
          A mandatory client interface bound to a selection model.
static String STORAGE_BINDING
          A mandatory client interface bound to a storage.
static String USER_DATA_BINDING
          An optional client interface bound to a userdata.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
OpenAction()
          Constructs a new OpenAction 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.
 String getFcState()
          Returns the execution state of the component to which this interface belongs.
 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 startFc()
          Starts the component to which this interface belongs.
 void stopFc()
          Stops the component to which this interface belongs.
 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

CONFIGURATION_BINDING

public static final String CONFIGURATION_BINDING
A mandatory client interface bound to a configuration model. This is the configuration into which the opened configurations are loaded.

See Also:
Constant Field Values

GRAPH_BINDING

public static final String GRAPH_BINDING
An optional client interface bound to a graph model. This is the model into which the opened configuration graphical information are loaded.

See Also:
Constant Field Values

SELECTION_BINDING

public static final String SELECTION_BINDING
A mandatory client interface bound to a selection model. This model is reinitialized after a configuration has been opened.

See Also:
Constant Field Values

REPOSITORY_BINDING

public static final String REPOSITORY_BINDING
A mandatory client interface bound to a repository. This repository is used to load the configurations stored in the storage.

See Also:
Constant Field Values

STORAGE_BINDING

public static final String STORAGE_BINDING
A mandatory client interface bound to a storage. This is the storage from which the opened configurations are read.

See Also:
Constant Field Values

USER_DATA_BINDING

public static final String USER_DATA_BINDING
An optional client interface bound to a userdata. This is the storage into/from which some personal data peculiar to each user are written/read.

See Also:
Constant Field Values

SAVE_ACTION_BINDING

public static final String SAVE_ACTION_BINDING
An optional client interface bound to a save action. This action is used to save the current configuration, before opening a new one.

See Also:
Constant Field Values
Constructor Detail

OpenAction

public OpenAction()
Constructs a new OpenAction 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.

getFcState

public String getFcState()
Description copied from interface: LifeCycleController
Returns the execution state of the component to which this interface belongs.

Specified by:
getFcState in interface LifeCycleController
Returns:
the execution state of the component to which this interface belongs.

startFc

public void startFc()
Description copied from interface: LifeCycleController
Starts the component to which this interface belongs.

Specified by:
startFc in interface LifeCycleController

stopFc

public void stopFc()
Description copied from interface: LifeCycleController
Stops the component to which this interface belongs. The result of a method call on a stopped component is undefined, except on its control interfaces (these calls are executed normally).

Specified by:
stopFc in interface LifeCycleController

actionPerformed

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