Package mgui.interfaces.tools.graphs
Class ToolGraphTransform
java.lang.Object
mgui.interfaces.tools.graphs.ToolGraph
mgui.interfaces.tools.graphs.ToolGraphTransform
- All Implemented Interfaces:
java.lang.Cloneable
,PopupMenuObject
,Tool
,ToolInputListener
,IconObject
public class ToolGraphTransform extends ToolGraph
Acts as a bridge between the mgui Tool interface and Jung's view control mouse plugins.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected edu.uci.ics.jung.visualization.control.DefaultModalGraphMouse<AbstractGraphNode,AbstractGraphEdge>
graph_mouse
Fields inherited from class mgui.interfaces.tools.graphs.ToolGraph
icon, isImmediate, listeners, name, plugins, target_panel
-
Constructor Summary
Constructors Constructor Description ToolGraphTransform()
-
Method Summary
Modifier and Type Method Description void
activate()
Should be called once a tool is activated within a particular InterfaceDisplayPanel.java.lang.Object
clone()
void
deactivate()
Should be called once a tool is deactivated; instances of Tool should perform clean-up activities here.InterfacePopupMenu
getPopupMenu()
Produces and returns a popup menu for this object.void
handlePopupEvent(java.awt.event.ActionEvent e)
Handles an event on this object's popup menu.void
handleToolEvent(ToolInputEvent e)
Handle this tool eventboolean
isExclusive()
Specifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.void
setTargetPanel(InterfacePanel panel)
void
showPopupMenu(java.awt.event.MouseEvent e)
Shows a popup menu at the point of the givenMouseEvent
.Methods inherited from class mgui.interfaces.tools.graphs.ToolGraph
addListener, getName, getObjectIcon, getPlugins, getPopupMenu, getPreviousTool, isImmediate, removeListener, setIcon
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
graph_mouse
protected edu.uci.ics.jung.visualization.control.DefaultModalGraphMouse<AbstractGraphNode,AbstractGraphEdge> graph_mouse
-
-
Constructor Details
-
ToolGraphTransform
public ToolGraphTransform()
-
-
Method Details
-
handleToolEvent
Description copied from interface:ToolInputListener
Handle this tool event- Specified by:
handleToolEvent
in interfaceToolInputListener
- Overrides:
handleToolEvent
in classToolGraph
-
setTargetPanel
- Specified by:
setTargetPanel
in interfaceTool
- Overrides:
setTargetPanel
in classToolGraph
-
clone
public java.lang.Object clone() -
activate
public void activate()Description copied from interface:Tool
Should be called once a tool is activated within a particular InterfaceDisplayPanel. -
deactivate
public void deactivate()Description copied from interface:Tool
Should be called once a tool is deactivated; instances of Tool should perform clean-up activities here. -
isExclusive
public boolean isExclusive()Description copied from interface:Tool
Specifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.- Returns:
-
getPopupMenu
Description copied from interface:PopupMenuObject
Produces and returns a popup menu for this object.- Specified by:
getPopupMenu
in interfacePopupMenuObject
- Overrides:
getPopupMenu
in classToolGraph
- Returns:
-
handlePopupEvent
public void handlePopupEvent(java.awt.event.ActionEvent e)Description copied from interface:PopupMenuObject
Handles an event on this object's popup menu. -
showPopupMenu
public void showPopupMenu(java.awt.event.MouseEvent e)Description copied from interface:PopupMenuObject
Shows a popup menu at the point of the givenMouseEvent
.
-