Class MegaCreateTool
java.lang.Object
java.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
org.graffiti.plugin.tool.AbstractTool
org.graffiti.plugin.tool.AbstractUndoableTool
org.graffiti.plugins.modes.defaults.MegaTools
org.graffiti.plugins.modes.defaults.MegaCreateTool
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
,MouseInputListener
,Tool
,SelectionListener
,SessionListener
,Undoable
- Direct Known Subclasses:
IPK_MegaCreateTool
public class MegaCreateTool extends MegaTools
A tool for creating and editing a graph.
- Author:
- Holleis
-
Field Summary
Fields inherited from class org.graffiti.plugins.modes.defaults.MegaTools
MouseWheelZoomEnabled
-
Constructor Summary
Constructors Constructor Description MegaCreateTool()
Constructor for this tool. -
Method Summary
Modifier and Type Method Description void
activate()
The method additionally registers a key used to delete graph elements.void
deactivate()
This method additionaly unregisters the key used for deleting graph elements.Cursor
getEdgeCursor()
Cursor
getNodeCursor()
Cursor
getNormCursor()
String
getToolName()
boolean
isCreatingEdge()
static boolean
isTemporaryNode(Node n)
void
mouseClicked(MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) inside the editor panel and handles what has to happen.void
mouseDragged(MouseEvent e)
Invoked when the mouse button has been pressed and dragged inside the editor panel and handles what has to happen.void
mouseMoved(MouseEvent e)
Temporarily marks the component under cursor.void
mousePressed(MouseEvent e)
Invoked when the mouse button has been pressed inside the editor panel and handles what has to happen.void
mouseReleased(MouseEvent e)
Invoked when the mouse button has been released inside the editor panel and handles what has to happen.void
reset()
Resets the tool to initial values.Methods inherited from class org.graffiti.plugins.modes.defaults.MegaTools
fireSelectionChanged, getFoundComponent, getLastMouseE, getLastMouseSrc, postProcessImageCreation, preProcessImageCreation, sessionChanged, sessionDataChanged, setFoundComponent, unmarkAll, wasScrollPaneMovement
Methods inherited from class org.graffiti.plugin.tool.AbstractUndoableTool
isSelectionListener, isSessionListener, setUndoSupport
Methods inherited from class org.graffiti.plugin.tool.AbstractTool
activateTool, deactivateAll, displayAsMarked, displayAsMarked, displayAsMarked, displayAsMarked, getActiveTool, highlight, isActive, isViewListener, selectionChanged, selectionListChanged, setGraph, setPrefs, unDisplayAsMarked, unDisplayAsMarked
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mouseWheelMoved
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.MouseListener
mouseEntered, mouseExited
-
Constructor Details
-
MegaCreateTool
public MegaCreateTool()Constructor for this tool. Registers a key used to delete graph elements.
-
-
Method Details
-
getNormCursor
-
getEdgeCursor
-
getNodeCursor
-
activate
public void activate()The method additionally registers a key used to delete graph elements.- Specified by:
activate
in interfaceTool
- Overrides:
activate
in classAbstractTool
- See Also:
AbstractTool.activate()
-
deactivate
public void deactivate()This method additionaly unregisters the key used for deleting graph elements.- Specified by:
deactivate
in interfaceTool
- Overrides:
deactivate
in classAbstractTool
- See Also:
AbstractTool.deactivate()
-
mousePressed
Invoked when the mouse button has been pressed inside the editor panel and handles what has to happen. Is actually empty since all functionality is put into mousePressed etc.- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
- Parameters:
e
- the mouse event
-
mouseDragged
Invoked when the mouse button has been pressed and dragged inside the editor panel and handles what has to happen.- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
- Parameters:
e
- the mouse event
-
mouseMoved
Temporarily marks the component under cursor.- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMegaTools
- Parameters:
e
- the mouse event
-
mouseClicked
Invoked when the mouse button has been clicked (pressed and released) inside the editor panel and handles what has to happen.- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classMouseAdapter
- Parameters:
e
- the mouse event
-
isTemporaryNode
-
isCreatingEdge
public boolean isCreatingEdge() -
mouseReleased
Invoked when the mouse button has been released inside the editor panel and handles what has to happen.- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
- Parameters:
e
- the mouse event
-
reset
public void reset()Resets the tool to initial values. -
getToolName
-