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_mouseFields 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 voidactivate()Should be called once a tool is activated within a particular InterfaceDisplayPanel.java.lang.Objectclone()voiddeactivate()Should be called once a tool is deactivated; instances of Tool should perform clean-up activities here.InterfacePopupMenugetPopupMenu()Produces and returns a popup menu for this object.voidhandlePopupEvent(java.awt.event.ActionEvent e)Handles an event on this object's popup menu.voidhandleToolEvent(ToolInputEvent e)Handle this tool eventbooleanisExclusive()Specifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.voidsetTargetPanel(InterfacePanel panel)voidshowPopupMenu(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, setIconMethods 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:ToolInputListenerHandle this tool event- Specified by:
handleToolEventin interfaceToolInputListener- Overrides:
handleToolEventin classToolGraph
-
setTargetPanel
- Specified by:
setTargetPanelin interfaceTool- Overrides:
setTargetPanelin classToolGraph
-
clone
public java.lang.Object clone() -
activate
public void activate()Description copied from interface:ToolShould be called once a tool is activated within a particular InterfaceDisplayPanel. -
deactivate
public void deactivate()Description copied from interface:ToolShould be called once a tool is deactivated; instances of Tool should perform clean-up activities here. -
isExclusive
public boolean isExclusive()Description copied from interface:ToolSpecifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.- Returns:
-
getPopupMenu
Description copied from interface:PopupMenuObjectProduces and returns a popup menu for this object.- Specified by:
getPopupMenuin interfacePopupMenuObject- Overrides:
getPopupMenuin classToolGraph- Returns:
-
handlePopupEvent
public void handlePopupEvent(java.awt.event.ActionEvent e)Description copied from interface:PopupMenuObjectHandles an event on this object's popup menu. -
showPopupMenu
public void showPopupMenu(java.awt.event.MouseEvent e)Description copied from interface:PopupMenuObjectShows a popup menu at the point of the givenMouseEvent.
-