public class EditingGraphMousePlugin extends AbstractGraphMousePlugin implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
cursor, modifiers
Constructor and Description |
---|
EditingGraphMousePlugin() |
EditingGraphMousePlugin(int modifiers)
create instance and prepare shapes for visual effects
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkModifiers(java.awt.event.MouseEvent e)
overrided to be more flexible, and pass events with
key combinations.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e)
If startVertex is non-null, stretch an edge shape between
startVertex and the mouse pointer to simulate edge creation
|
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e)
If the mouse is pressed in an empty area, create a new vertex there.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
If startVertex is non-null, and the mouse is released over an
existing vertex, create an undirected edge from startVertex to
the vertex under the mouse pointer.
|
void |
setVertexLocations(SettableVertexLocationFunction vertexLocations)
sets the vertex locations.
|
getCursor, getModifiers, setCursor, setModifiers
public EditingGraphMousePlugin()
public EditingGraphMousePlugin(int modifiers)
modifiers
- public void setVertexLocations(SettableVertexLocationFunction vertexLocations)
vertexLocations
- public boolean checkModifiers(java.awt.event.MouseEvent e)
checkModifiers
in interface GraphMousePlugin
checkModifiers
in class AbstractGraphMousePlugin
e
- an event to compare topublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener