JGraphpad Pro
v6.0.5.0


com.jgraph.editor
Class JGraphEditorTool

java.lang.Object
  extended byorg.jgraph.graph.BasicMarqueeHandler
      extended bycom.jgraph.editor.JGraphEditorTool
Direct Known Subclasses:
JGraphpadVertexTool

public class JGraphEditorTool
extends org.jgraph.graph.BasicMarqueeHandler

The base class for all tools in a JGraph editor kit. Tools are used to temporary set a graphs marquee handler, ie. to take over all interactions on a graph. This is typically used to insert new cells in marquee-style (as opposed to dnd-style used in the library).


Field Summary
protected  boolean isAlwaysActive
          Specifies whether this tool is always activated.
protected  String name
          Holds the name.
 
Fields inherited from class org.jgraph.graph.BasicMarqueeHandler
currentPoint, marqueeBounds, previousCursor, startPoint
 
Constructor Summary
JGraphEditorTool(String name)
          Constructs a tool with the specified name.
JGraphEditorTool(String name, boolean isAlwaysActive)
          Constructs a tool with the specified name.
 
Method Summary
 String getName()
          Returns the name of the tool.
 boolean isAlwaysActive()
          Returns true if this tool is always active, eg if it should return true whenever BasicMarqueeHandler.isForceMarqueeEvent(MouseEvent) is called.
 void setAlwaysActive(boolean isAlwaysActive)
          Sets whether the tool is always active.
 void setName(String name)
          Sets the name of the tool.
 
Methods inherited from class org.jgraph.graph.BasicMarqueeHandler
getCurrentPoint, getGraphForEvent, getMarqueeBounds, getPreviousCursor, getStartPoint, handleMarqueeEvent, isForceMarqueeEvent, isMarqueeTriggerEvent, mouseDragged, mouseMoved, mousePressed, mouseReleased, overlay, paint, processMouseDraggedEvent, setCurrentPoint, setMarqueeBounds, setPreviousCursor, setStartPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
Holds the name.


isAlwaysActive

protected boolean isAlwaysActive
Specifies whether this tool is always activated. Default is false. A value of true means the tool will always be called by the toolbox redirector if the tool is selected.

Constructor Detail

JGraphEditorTool

public JGraphEditorTool(String name)
Constructs a tool with the specified name.

Parameters:
name - The name of the tool to be created.

JGraphEditorTool

public JGraphEditorTool(String name,
                        boolean isAlwaysActive)
Constructs a tool with the specified name.

Parameters:
name - The name of the tool to be created.
Method Detail

getName

public String getName()
Returns the name of the tool.

Returns:
Returns the name.

setName

public void setName(String name)
Sets the name of the tool.

Parameters:
name - The name to set.

isAlwaysActive

public boolean isAlwaysActive()
Returns true if this tool is always active, eg if it should return true whenever BasicMarqueeHandler.isForceMarqueeEvent(MouseEvent) is called.

Returns:
Returns the isAlwaysActive.

setAlwaysActive

public void setAlwaysActive(boolean isAlwaysActive)
Sets whether the tool is always active.

Parameters:
isAlwaysActive - The isAlwaysActive to set.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.