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.Icon
icon
protected boolean
isImmediate
protected java.util.ArrayList<ToolListener>
listeners
protected java.lang.String
name
protected java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin>
plugins
protected InterfaceGraphDisplay
target_panel
-
Constructor Summary
Constructors Constructor Description ToolGraph()
-
Method Summary
Modifier and Type Method Description void
addListener(ToolListener tl)
abstract java.lang.Object
clone()
java.lang.String
getName()
javax.swing.Icon
getObjectIcon()
Returns theIcon
associated with this object.java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin>
getPlugins()
InterfacePopupMenu
getPopupMenu()
Produces and returns a popup menu for this object.InterfacePopupMenu
getPopupMenu(java.util.List<java.lang.Object> selection)
Produces and returns a popup menu for this object.Tool
getPreviousTool()
Returns the tool that was set previous to this one, if one existsvoid
handleToolEvent(ToolInputEvent e)
Handle this tool eventboolean
isImmediate()
Specifies whether this tool is immediate; this indicates that it should be run immediately upon calling and stop, rather than wait for AWT events.void
removeListener(ToolListener tl)
protected void
setIcon()
void
setTargetPanel(InterfacePanel p)
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mgui.interfaces.menus.PopupMenuObject
handlePopupEvent, showPopupMenu
Methods 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:
setTargetPanel
in interfaceTool
-
getPreviousTool
Description copied from interface:Tool
Returns the tool that was set previous to this one, if one exists- Specified by:
getPreviousTool
in interfaceTool
- Returns:
-
handleToolEvent
Description copied from interface:ToolInputListener
Handle this tool event- Specified by:
handleToolEvent
in interfaceToolInputListener
-
getPopupMenu
Description copied from interface:PopupMenuObject
Produces and returns a popup menu for this object.- Specified by:
getPopupMenu
in interfacePopupMenuObject
- Returns:
-
getPopupMenu
Description copied from interface:PopupMenuObject
Produces and returns a popup menu for this object. Allows an associated list of objects to be passed as an argument.- Specified by:
getPopupMenu
in interfacePopupMenuObject
- Returns:
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObject
Returns theIcon
associated with this object.- Specified by:
getObjectIcon
in interfaceIconObject
- Returns:
-
setIcon
protected void setIcon() -
addListener
- Specified by:
addListener
in interfaceTool
-
removeListener
- Specified by:
removeListener
in interfaceTool
-
getName
public java.lang.String getName() -
clone
public abstract java.lang.Object clone() -
isImmediate
public boolean isImmediate()Description copied from interface:Tool
Specifies 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:
isImmediate
in interfaceTool
- Returns:
-