public class GraphLayoutPanelMouseListener
extends java.awt.event.MouseAdapter
Modifier and Type | Class and Description |
---|---|
static class |
GraphLayoutPanelMouseListener.BothEdgeAndVertexPolicy
Both an edge event or a vertex event is fired from this panel.
|
static class |
GraphLayoutPanelMouseListener.EdgeAndVertexPolicy
Either an edge event or a vertex event is fired from this panel.
|
static class |
GraphLayoutPanelMouseListener.EdgeEventPolicy
Only edge events are fired from this panel.
|
static class |
GraphLayoutPanelMouseListener.NoEventPolicy
No graph events are fired from this panel
|
static class |
GraphLayoutPanelMouseListener.VertexEventPolicy
Only vertex events are fired from this panel.
|
Modifier and Type | Field and Description |
---|---|
static double |
EDGE_CLICK_THRESHOLD |
protected GraphLayoutPanel |
panel |
static double |
VERTEX_BIAS
If the system is set to accept both VERTEX and EDGE clicks, then any
edge click will be just as far from a vertex as a vertex click is.
|
static double |
VERTEX_CLICK_THRESHOLD
This constant tracks how far a click needs to be before it's too far to
register at all.
|
Constructor and Description |
---|
GraphLayoutPanelMouseListener(GraphLayoutPanel panel) |
Modifier and Type | Method and Description |
---|---|
protected void |
fireEdgeEvent(Edge e,
double dist_to_closest_edge,
java.awt.event.MouseEvent me) |
protected void |
fireVertexEvent(Vertex v,
double dist_to_closest_vertex,
java.awt.event.MouseEvent e) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
protected final GraphLayoutPanel panel
public static double VERTEX_CLICK_THRESHOLD
public static double EDGE_CLICK_THRESHOLD
public static double VERTEX_BIAS
public GraphLayoutPanelMouseListener(GraphLayoutPanel panel)
panel
- protected void fireVertexEvent(Vertex v, double dist_to_closest_vertex, java.awt.event.MouseEvent e)
protected void fireEdgeEvent(Edge e, double dist_to_closest_edge, java.awt.event.MouseEvent me)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class java.awt.event.MouseAdapter