samples.preview_new_graphdraw.impl
Class GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy

java.lang.Object
  extended by samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
Enclosing class:
GraphLayoutPanelMouseListener

public static final class GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
extends Object

Both an edge event or a vertex event is fired from this panel. If the click is close to a vertex, a vertex event is fired; if the click is close to an edge, the edge event. (If both, then both may be fired: it is up to the developer to choose a mechansim. For example, some applications will select only vertices if the user is holding down the control button.)


Constructor Summary
GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy()
           
 
Method Summary
 void fireEvents(GraphLayoutPanelMouseListener gmpl, MouseEvent me, VisEdge ve, double edgeDist, VisVertex vv, double vertexDistance)
           
 boolean shouldCheckEdgeDistance()
           
 boolean shouldCheckVertexDistance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy

public GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

shouldCheckVertexDistance

public boolean shouldCheckVertexDistance()

shouldCheckEdgeDistance

public boolean shouldCheckEdgeDistance()

fireEvents

public void fireEvents(GraphLayoutPanelMouseListener gmpl,
                       MouseEvent me,
                       VisEdge ve,
                       double edgeDist,
                       VisVertex vv,
                       double vertexDistance)