com.tensegrity.graph.view
Interface InteractionControl

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
InteractionControlAdapter

public interface InteractionControl
extends java.io.Serializable

Interaction control. This specification can be overridden to supply custom code for interaction settings. The InteractionControl classes should follow a few rules: - they should not keep any internal state they rely on as they should behave as deep copied classes when they are shallow-copied. The way to achieve this is to make subclasses of InteractionControl immutable. That means all fields and fields of fields recursively should be declared final. By overridden this class one can customize the interaction with the visualgraph. The abstract methods are defined in a derived class and are called by the visualgraph during user interaction and the return value is used to indicate whether the visualgraph should allow or inhibit a certain operation or not.

Version:
$Id: InteractionControl.java,v 1.8 2005/09/26 08:45:34 MichaelKegel Exp $
Author:
Stepan Rutz

Method Summary
 boolean preAttachSource(VisualGraph visualgraph, VisualEdge visualedge, VisualPort newport)
          This method is invoked as a callback before the source-end of VisualEdge is attached.
 boolean preAttachTarget(VisualGraph visualgraph, VisualEdge visualedge, VisualPort newport)
          This method is invoked as a callback before the target-end of VisualEdge is attached.
 boolean preDetachSource(VisualGraph visualgraph, VisualEdge visualedge)
          This method is invoked as a callback before the source-end of VisualEdge is detached.
 boolean preDetachTarget(VisualGraph visualgraph, VisualEdge visualedge)
          This method is invoked as a callback before the target-end of VisualEdge is detached.
 boolean preDragVisualEdge(VisualGraph visualgraph, VisualEdge visualedge)
          This method is invoked as a callback before a VisualEdge is dragged.
 boolean preHighlightPort(VisualGraph visualgraph, VisualPort visualport)
          This method is invoked as a callback before a VisualPort is highlighted.
 

Method Detail

preDragVisualEdge

public boolean preDragVisualEdge(VisualGraph visualgraph,
                                 VisualEdge visualedge)
This method is invoked as a callback before a VisualEdge is dragged.

Parameters:
visualgraph - the VisualGraph in which the interaction occured.
visualedge - the VisualEdge that was dragged.
Returns:
boolean to indicate whether the operation shall proceed.
See Also:
VisualGraph, VisualEdge

preDetachSource

public boolean preDetachSource(VisualGraph visualgraph,
                               VisualEdge visualedge)
This method is invoked as a callback before the source-end of VisualEdge is detached.

Parameters:
visualgraph - the VisualGraph in which the interaction occured.
visualedge - the VisualEdge that is being detached.
Returns:
boolean to indicate whether the operation shall proceed.
See Also:
VisualGraph, VisualEdge

preDetachTarget

public boolean preDetachTarget(VisualGraph visualgraph,
                               VisualEdge visualedge)
This method is invoked as a callback before the target-end of VisualEdge is detached.

Parameters:
visualgraph - the VisualGraph in which the interaction occured.
visualedge - the VisualEdge that is being detached.
Returns:
boolean to indicate whether the operation shall proceed.
See Also:
VisualGraph, VisualEdge

preAttachSource

public boolean preAttachSource(VisualGraph visualgraph,
                               VisualEdge visualedge,
                               VisualPort newport)
This method is invoked as a callback before the source-end of VisualEdge is attached.

Parameters:
visualgraph - the VisualGraph in which the interaction occured.
visualedge - the VisualEdge that is being attached.
Returns:
boolean to indicate whether the operation shall proceed.
See Also:
VisualGraph, VisualEdge, VisualPort

preAttachTarget

public boolean preAttachTarget(VisualGraph visualgraph,
                               VisualEdge visualedge,
                               VisualPort newport)
This method is invoked as a callback before the target-end of VisualEdge is attached.

Parameters:
visualgraph - the VisualGraph in which the interaction occured.
visualedge - the VisualEdge that is being attached.
Returns:
boolean to indicate whether the operation shall proceed.
See Also:
VisualGraph, VisualEdge, VisualPort

preHighlightPort

public boolean preHighlightPort(VisualGraph visualgraph,
                                VisualPort visualport)
This method is invoked as a callback before a VisualPort is highlighted.

Parameters:
visualgraph - the VisualGraph in which the interaction occured.
Returns:
boolean to indicate whether the operation shall proceed.
See Also:
VisualGraph, VisualEdge, VisualPort


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.