Package mgui.interfaces.tools.graphs
Class ToolGraph
java.lang.Object
mgui.interfaces.tools.graphs.ToolGraph
- All Implemented Interfaces:
java.lang.Cloneable,PopupMenuObject,Tool,ToolInputListener,IconObject
- Direct Known Subclasses:
ToolGraphImage,ToolGraphTransform
public abstract class ToolGraph extends java.lang.Object implements Tool
Abstract class to be inherited by tools which operate on graphs; i.e, through
InterfaceGraphDisplay.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.Iconiconprotected booleanisImmediateprotected java.util.ArrayList<ToolListener>listenersprotected java.lang.Stringnameprotected java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin>pluginsprotected InterfaceGraphDisplaytarget_panel -
Constructor Summary
Constructors Constructor Description ToolGraph() -
Method Summary
Modifier and Type Method Description voidaddListener(ToolListener tl)abstract java.lang.Objectclone()java.lang.StringgetName()javax.swing.IcongetObjectIcon()Returns theIconassociated with this object.java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin>getPlugins()InterfacePopupMenugetPopupMenu()Produces and returns a popup menu for this object.InterfacePopupMenugetPopupMenu(java.util.List<java.lang.Object> selection)Produces and returns a popup menu for this object.ToolgetPreviousTool()Returns the tool that was set previous to this one, if one existsvoidhandleToolEvent(ToolInputEvent e)Handle this tool eventbooleanisImmediate()Specifies whether this tool is immediate; this indicates that it should be run immediately upon calling and stop, rather than wait for AWT events.voidremoveListener(ToolListener tl)protected voidsetIcon()voidsetTargetPanel(InterfacePanel p)Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mgui.interfaces.menus.PopupMenuObject
handlePopupEvent, showPopupMenuMethods inherited from interface mgui.interfaces.tools.Tool
activate, deactivate, isExclusive
-
Field Details
-
name
protected java.lang.String name -
plugins
protected java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin> plugins -
listeners
-
isImmediate
protected boolean isImmediate -
target_panel
-
icon
protected javax.swing.Icon icon
-
-
Constructor Details
-
ToolGraph
public ToolGraph()
-
-
Method Details
-
getPlugins
public java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin> getPlugins() -
setTargetPanel
- Specified by:
setTargetPanelin interfaceTool
-
getPreviousTool
Description copied from interface:ToolReturns the tool that was set previous to this one, if one exists- Specified by:
getPreviousToolin interfaceTool- Returns:
-
handleToolEvent
Description copied from interface:ToolInputListenerHandle this tool event- Specified by:
handleToolEventin interfaceToolInputListener
-
getPopupMenu
Description copied from interface:PopupMenuObjectProduces and returns a popup menu for this object.- Specified by:
getPopupMenuin interfacePopupMenuObject- Returns:
-
getPopupMenu
Description copied from interface:PopupMenuObjectProduces and returns a popup menu for this object. Allows an associated list of objects to be passed as an argument.- Specified by:
getPopupMenuin interfacePopupMenuObject- Returns:
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObjectReturns theIconassociated with this object.- Specified by:
getObjectIconin interfaceIconObject- Returns:
-
setIcon
protected void setIcon() -
addListener
- Specified by:
addListenerin interfaceTool
-
removeListener
- Specified by:
removeListenerin interfaceTool
-
getName
public java.lang.String getName() -
clone
public abstract java.lang.Object clone() -
isImmediate
public boolean isImmediate()Description copied from interface:ToolSpecifies whether this tool is immediate; this indicates that it should be run immediately upon calling and stop, rather than wait for AWT events.- Specified by:
isImmediatein interfaceTool- Returns:
-