org.objectweb.fractal.gui.graph.model
Class BasicTools

java.lang.Object
  extended byorg.objectweb.fractal.gui.graph.model.BasicTools
All Implemented Interfaces:
BindingController, Tools

public class BasicTools
extends Object
implements Tools, BindingController

Basic implementation of the Tools interface.


Field Summary
static String TOOLS_LISTENERS_BINDING
          A collection client interface bound to the listeners of this model.
 
Fields inherited from interface org.objectweb.fractal.gui.graph.model.Tools
BIND, MOVE, SELECT, ZOOM_IN, ZOOM_OUT
 
Constructor Summary
BasicTools()
          Constructs a new BasicTools component.
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 Interface getBindInterface()
          Returns the client interface that will be bound by the Tools.BIND tool.
 int getTool()
          Returns the currently selected tool.
 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 setBindInterface(Interface i)
          Sets the client interface that will be bound by the Tools.BIND tool.
 void setTool(int tool)
          Sets the currently selected tool.
 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

TOOLS_LISTENERS_BINDING

public static final String TOOLS_LISTENERS_BINDING
A collection client interface bound to the listeners of this model.

See Also:
Constant Field Values
Constructor Detail

BasicTools

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

getTool

public int getTool()
Description copied from interface: Tools
Returns the currently selected tool.

Specified by:
getTool in interface Tools
Returns:
the currently selected tool.
See Also:
Tools.setTool(int)

setTool

public void setTool(int tool)
Description copied from interface: Tools
Sets the currently selected tool.

Specified by:
setTool in interface Tools
Parameters:
tool - the new selected tool.
See Also:
Tools.getTool()

getBindInterface

public Interface getBindInterface()
Description copied from interface: Tools
Returns the client interface that will be bound by the Tools.BIND tool.

Specified by:
getBindInterface in interface Tools
Returns:
the client interface that will be bound by the Tools.BIND tool.
See Also:
Tools.setBindInterface(org.objectweb.fractal.gui.model.Interface)

setBindInterface

public void setBindInterface(Interface i)
Description copied from interface: Tools
Sets the client interface that will be bound by the Tools.BIND tool.

Specified by:
setBindInterface in interface Tools
Parameters:
i - the client interface that will be bound by the Tools.BIND tool.
See Also:
Tools.getBindInterface()