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 voidactivate()The method additionally registers a key used to delete graph elements.voiddeactivate()This method additionaly unregisters the key used for deleting graph elements.CursorgetEdgeCursor()CursorgetNodeCursor()CursorgetNormCursor()StringgetToolName()booleanisCreatingEdge()static booleanisTemporaryNode(Node n)voidmouseClicked(MouseEvent e)Invoked when the mouse button has been clicked (pressed and released) inside the editor panel and handles what has to happen.voidmouseDragged(MouseEvent e)Invoked when the mouse button has been pressed and dragged inside the editor panel and handles what has to happen.voidmouseMoved(MouseEvent e)Temporarily marks the component under cursor.voidmousePressed(MouseEvent e)Invoked when the mouse button has been pressed inside the editor panel and handles what has to happen.voidmouseReleased(MouseEvent e)Invoked when the mouse button has been released inside the editor panel and handles what has to happen.voidreset()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, wasScrollPaneMovementMethods inherited from class org.graffiti.plugin.tool.AbstractUndoableTool
isSelectionListener, isSessionListener, setUndoSupportMethods inherited from class org.graffiti.plugin.tool.AbstractTool
activateTool, deactivateAll, displayAsMarked, displayAsMarked, displayAsMarked, displayAsMarked, getActiveTool, highlight, isActive, isViewListener, selectionChanged, selectionListChanged, setGraph, setPrefs, unDisplayAsMarked, unDisplayAsMarkedMethods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mouseWheelMovedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
activatein interfaceTool- Overrides:
activatein classAbstractTool- See Also:
AbstractTool.activate()
-
deactivate
public void deactivate()This method additionaly unregisters the key used for deleting graph elements.- Specified by:
deactivatein interfaceTool- Overrides:
deactivatein 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:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin 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:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter- Parameters:
e- the mouse event
-
mouseMoved
Temporarily marks the component under cursor.- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin 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:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin 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:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseAdapter- Parameters:
e- the mouse event
-
reset
public void reset()Resets the tool to initial values. -
getToolName
-