org.objectweb.fractal.gui.tree.model
Class BasicTreeSelectionModel

java.lang.Object
  extended byjavax.swing.tree.DefaultTreeSelectionModel
      extended byorg.objectweb.fractal.gui.tree.model.BasicTreeSelectionModel
All Implemented Interfaces:
BindingController, Cloneable, SelectionListener, Serializable, TreeSelectionModel

public class BasicTreeSelectionModel
extends DefaultTreeSelectionModel
implements SelectionListener, BindingController

A TreeSelectionModel based on a Selection. This model makes a conversion from a Selection model to a TreeSelectionModel. It listens to the selection in order to update its state when the selection changes.

See Also:
Serialized Form

Field Summary
static String CONFIGURATION_BINDING
          An optional client interface bound to a configuration model.
static String SELECTION_BINDING
          A mandatory client interface bound to a selection model.
 
Fields inherited from class javax.swing.tree.DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, SELECTION_MODE_PROPERTY, selectionMode
 
Fields inherited from interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
 
Constructor Summary
BasicTreeSelectionModel()
          Constructs a new BasicTreeSelectionModel component.
 
Method Summary
 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 selectionChanged()
          Notifies this listener that the selection has changed.
 void setSelectionPath(TreePath path)
           
 void unbindFc(String clientItfName)
          Unbinds the given client interface.
 
Methods inherited from class javax.swing.tree.DefaultTreeSelectionModel
addPropertyChangeListener, addSelectionPath, addSelectionPaths, addTreeSelectionListener, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getPropertyChangeListeners, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, getTreeSelectionListeners, insureRowContinuity, insureUniqueness, isPathSelected, isRowSelected, isSelectionEmpty, notifyPathChange, removePropertyChangeListener, removeSelectionPath, removeSelectionPaths, removeTreeSelectionListener, resetRowSelection, setRowMapper, setSelectionMode, setSelectionPaths, toString, updateLeadIndex
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONFIGURATION_BINDING

public static final String CONFIGURATION_BINDING
An optional client interface bound to a configuration model. The root component of this configuration is changed each time the selection is changed through this model (but not if the selection model on which this model is based changes).

See Also:
Constant Field Values

SELECTION_BINDING

public static final String SELECTION_BINDING
A mandatory client interface bound to a selection model. This is the model on which this model is based and synchronized.

See Also:
Constant Field Values
Constructor Detail

BasicTreeSelectionModel

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

selectionChanged

public void selectionChanged()
Description copied from interface: SelectionListener
Notifies this listener that the selection has changed.

Specified by:
selectionChanged in interface SelectionListener

setSelectionPath

public void setSelectionPath(TreePath path)
Specified by:
setSelectionPath in interface TreeSelectionModel