org.objectweb.fractal.gui.dialog.control
Class BasicDialogController

java.lang.Object
  extended byorg.objectweb.fractal.gui.dialog.control.BasicDialogController
All Implemented Interfaces:
BindingController, DialogViewListener

public class BasicDialogController
extends Object
implements DialogViewListener, BindingController

A controller component for dialog view components. This component modifies a dialog model, in reaction to events emitted by a dialog view.


Field Summary
static String CONFIGURATION_BINDING
          A mandatory client interface bound to a configuration model.
static String DIALOG_MODEL_BINDING
          A mandatory client interface bound to a dialog model.
static String FACTORY_BINDING
          A mandatory client interface bound to a factory.
static String SELECTION_BINDING
          A mandatory client interface bound to a selection model.
 
Constructor Summary
BasicDialogController()
          Constructs a new BasicDialogController component.
 
Method Summary
 void addAttributeButtonClicked()
          Notifies this listener that the "add attribute" button has been clicked.
 void addClientInterfaceButtonClicked()
          Notifies this listener that the "add client interface" button has been clicked.
 void addServerInterfaceButtonClicked()
          Notifies this listener that the "add server interface" button has been clicked.
 void bindFc(String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 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 removeAttributeButtonClicked()
          Notifies this listener that the "remove attribute" button has been clicked.
 void removeClientInterfaceButtonClicked()
          Notifies this listener that the "remove client interface" button has been clicked.
 void removeServerInterfaceButtonClicked()
          Notifies this listener that the "remove server interface" button has been clicked.
 void unbindFc(String clientItfName)
          Unbinds the given client interface.
 
Methods inherited from class java.lang.Object
clone, 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 model is used to get the component to which interfaces or attributes must be added or removed by this controller (the component used is the root component of the configuration).

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 used to get the interface that must be removed when a "remove interface" button is clicked.

See Also:
Constant Field Values

DIALOG_MODEL_BINDING

public static final String DIALOG_MODEL_BINDING
A mandatory client interface bound to a dialog model. This model is used to get selection model of the attribute table, which is itself used to find the attribute to be removed when the "remove attribute" button is clicked.

See Also:
Constant Field Values

FACTORY_BINDING

public static final String FACTORY_BINDING
A mandatory client interface bound to a factory. This factory is used to create interfaces when a "add interface" button is clicked.

See Also:
Constant Field Values
Constructor Detail

BasicDialogController

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

addClientInterfaceButtonClicked

public void addClientInterfaceButtonClicked()
Description copied from interface: DialogViewListener
Notifies this listener that the "add client interface" button has been clicked.

Specified by:
addClientInterfaceButtonClicked in interface DialogViewListener

removeClientInterfaceButtonClicked

public void removeClientInterfaceButtonClicked()
Description copied from interface: DialogViewListener
Notifies this listener that the "remove client interface" button has been clicked.

Specified by:
removeClientInterfaceButtonClicked in interface DialogViewListener

addServerInterfaceButtonClicked

public void addServerInterfaceButtonClicked()
Description copied from interface: DialogViewListener
Notifies this listener that the "add server interface" button has been clicked.

Specified by:
addServerInterfaceButtonClicked in interface DialogViewListener

removeServerInterfaceButtonClicked

public void removeServerInterfaceButtonClicked()
Description copied from interface: DialogViewListener
Notifies this listener that the "remove server interface" button has been clicked.

Specified by:
removeServerInterfaceButtonClicked in interface DialogViewListener

addAttributeButtonClicked

public void addAttributeButtonClicked()
Description copied from interface: DialogViewListener
Notifies this listener that the "add attribute" button has been clicked.

Specified by:
addAttributeButtonClicked in interface DialogViewListener

removeAttributeButtonClicked

public void removeAttributeButtonClicked()
Description copied from interface: DialogViewListener
Notifies this listener that the "remove attribute" button has been clicked.

Specified by:
removeAttributeButtonClicked in interface DialogViewListener