org.objectweb.fractal.gui.selection.model
Class BasicSelection

java.lang.Object
  extended byorg.objectweb.fractal.gui.selection.model.BasicSelection
All Implemented Interfaces:
BindingController, Selection

public class BasicSelection
extends Object
implements Selection, BindingController

Basic implementation of the Selection interface.


Field Summary
static String SELECTION_LISTENERS_BINDING
          A collection client interface bound to the listeners of this component.
 
Constructor Summary
BasicSelection()
          Constructs a new BasicSelection component.
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 void clearSelection()
          Clears the selection.
 Object getSelection()
          Returns the component or interface that is currently selected.
 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 selectComponent(Component component)
          Selects the given component.
 void selectInterface(Interface itf)
          Selects the given interface.
 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

SELECTION_LISTENERS_BINDING

public static final String SELECTION_LISTENERS_BINDING
A collection client interface bound to the listeners of this component.

See Also:
Constant Field Values
Constructor Detail

BasicSelection

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

getSelection

public Object getSelection()
Description copied from interface: Selection
Returns the component or interface that is currently selected.

Specified by:
getSelection in interface Selection
Returns:
the component or interface that is currently selected. May be null if the selection is empty.

selectComponent

public void selectComponent(Component component)
Description copied from interface: Selection
Selects the given component.

Specified by:
selectComponent in interface Selection
Parameters:
component - the component that must be selected.

selectInterface

public void selectInterface(Interface itf)
Description copied from interface: Selection
Selects the given interface.

Specified by:
selectInterface in interface Selection
Parameters:
itf - the interface that must be selected.

clearSelection

public void clearSelection()
Description copied from interface: Selection
Clears the selection.

Specified by:
clearSelection in interface Selection