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, setModifierspublic EditingGraphMousePlugin()
public EditingGraphMousePlugin(int modifiers)
modifiers - public void setVertexLocations(SettableVertexLocationFunction vertexLocations)
vertexLocations - public boolean checkModifiers(java.awt.event.MouseEvent e)
checkModifiers in interface GraphMousePlugincheckModifiers in class AbstractGraphMousePlugine - an event to compare topublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListener