samples.preview_new_graphdraw.impl
Class GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
java.lang.Object
samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
- All Implemented Interfaces:
- samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.ClickPolicy
- Enclosing class:
- GraphLayoutPanelMouseListener
- public static final class GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
- extends Object
- implements samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.ClickPolicy
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.)
GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
public GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy()
toString
public String toString()
shouldCheckVertexDistance
public boolean shouldCheckVertexDistance()
- Specified by:
shouldCheckVertexDistance
in interface samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.ClickPolicy
shouldCheckEdgeDistance
public boolean shouldCheckEdgeDistance()
- Specified by:
shouldCheckEdgeDistance
in interface samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.ClickPolicy
fireEvents
public void fireEvents(GraphLayoutPanelMouseListener gmpl,
MouseEvent me,
VisEdge ve,
double edgeDist,
VisVertex vv,
double vertexDistance)
- Specified by:
fireEvents
in interface samples.preview_new_graphdraw.impl.GraphLayoutPanelMouseListener.ClickPolicy