Class LabelEditingGraphMousePlugin<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
edu.uci.ics.jung.visualization.control.LabelEditingGraphMousePlugin<V,E>
- All Implemented Interfaces:
GraphMousePlugin
,MouseListener
,EventListener
public class LabelEditingGraphMousePlugin<V,E>
extends AbstractGraphMousePlugin
implements MouseListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected E
the picked Edge, if anyprotected V
the picked Vertex, if anyFields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
cursor, down, modifiers
-
Constructor Summary
ConstructorsConstructorDescriptioncreate an instance with default settingsLabelEditingGraphMousePlugin
(int selectionModifiers) create an instance with overrides -
Method Summary
Modifier and TypeMethodDescriptionvoid
For primary modifiers (default, MouseButton1): pick a single Vertex or Edge that is under the mouse pointer.void
void
void
If the mouse is over a picked vertex, drag all picked vertices with the mouse.void
If the mouse is dragging a rectangle, pick the Vertices contained in that rectangle clean up settings from mousePressedMethods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
checkModifiers, getCursor, getModifiers, setCursor, setModifiers
-
Field Details
-
vertex
the picked Vertex, if any -
edge
the picked Edge, if any
-
-
Constructor Details
-
LabelEditingGraphMousePlugin
public LabelEditingGraphMousePlugin()create an instance with default settings -
LabelEditingGraphMousePlugin
public LabelEditingGraphMousePlugin(int selectionModifiers) create an instance with overrides- Parameters:
selectionModifiers
- for primary selection
-
-
Method Details
-
mouseClicked
For primary modifiers (default, MouseButton1): pick a single Vertex or Edge that is under the mouse pointer. If no Vertex or edge is under the pointer, unselect all picked Vertices and edges, and set up to draw a rectangle for multiple selection of contained Vertices. For additional selection (default Shift+MouseButton1): Add to the selection, a single Vertex or Edge that is under the mouse pointer. If a previously picked Vertex or Edge is under the pointer, it is un-picked. If no vertex or Edge is under the pointer, set up to draw a multiple selection rectangle (as above) but do not unpick previously picked elements.- Specified by:
mouseClicked
in interfaceMouseListener
- Parameters:
e
- the event
-
mouseReleased
If the mouse is dragging a rectangle, pick the Vertices contained in that rectangle clean up settings from mousePressed- Specified by:
mouseReleased
in interfaceMouseListener
-
mousePressed
If the mouse is over a picked vertex, drag all picked vertices with the mouse. If the mouse is not over a Vertex, draw the rectangle to select multiple Vertices- Specified by:
mousePressed
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-