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 Details

    • name

      protected java.lang.String name
    • plugins

      protected java.util.ArrayList<edu.uci.ics.jung.visualization.control.GraphMousePlugin> plugins
    • listeners

      protected java.util.ArrayList<ToolListener> listeners
    • isImmediate

      protected boolean isImmediate
    • target_panel

      protected InterfaceGraphDisplay 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

      public void setTargetPanel​(InterfacePanel p)
      Specified by:
      setTargetPanel in interface Tool
    • getPreviousTool

      public Tool getPreviousTool()
      Description copied from interface: Tool
      Returns the tool that was set previous to this one, if one exists
      Specified by:
      getPreviousTool in interface Tool
      Returns:
    • handleToolEvent

      public void handleToolEvent​(ToolInputEvent e)
      Description copied from interface: ToolInputListener
      Handle this tool event
      Specified by:
      handleToolEvent in interface ToolInputListener
    • getPopupMenu

      public InterfacePopupMenu getPopupMenu()
      Description copied from interface: PopupMenuObject
      Produces and returns a popup menu for this object.
      Specified by:
      getPopupMenu in interface PopupMenuObject
      Returns:
    • getPopupMenu

      public InterfacePopupMenu getPopupMenu​(java.util.List<java.lang.Object> selection)
      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 interface PopupMenuObject
      Returns:
    • getObjectIcon

      public javax.swing.Icon getObjectIcon()
      Description copied from interface: IconObject
      Returns the Icon associated with this object.
      Specified by:
      getObjectIcon in interface IconObject
      Returns:
    • setIcon

      protected void setIcon()
    • addListener

      public void addListener​(ToolListener tl)
      Specified by:
      addListener in interface Tool
    • removeListener

      public void removeListener​(ToolListener tl)
      Specified by:
      removeListener in interface Tool
    • getName

      public java.lang.String getName()
      Specified by:
      getName in interface Tool
    • clone

      public abstract java.lang.Object clone()
      Specified by:
      clone in interface Tool
      Overrides:
      clone in class java.lang.Object
    • 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 interface Tool
      Returns: