org.graffiti.plugins.modes.advanced.create
Class CreateTool

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by javax.swing.event.MouseInputAdapter
          extended by org.graffiti.plugins.modes.deprecated.AbstractTool
              extended by org.graffiti.plugins.modes.deprecated.AbstractUndoableTool
                  extended by org.graffiti.plugins.modes.advanced.AbstractEditingTool
                      extended by org.graffiti.plugins.modes.advanced.create.CreateTool
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener, GraphicAttributeConstants, ViewListener, FunctionComponent, org.graffiti.plugins.modes.deprecated.Tool, SelectionListener, SessionListener, Undoable

Deprecated.

@Deprecated
public class CreateTool
extends AbstractEditingTool
implements GraphicAttributeConstants

Editing tool for creating, deleting and moving (single) nodes and edges.


Field Summary
 
Fields inherited from class org.graffiti.plugins.modes.advanced.AbstractEditingTool
BOTTOM, CENTER, CENTER_HORIZONTAL, CENTER_VERTICAL, DEFAULT, DOWN, LEFT, RIGHT, TOP, UP
 
Fields inherited from interface org.graffiti.graphics.GraphicAttributeConstants
ABSOLUTE_X_OFFSET, ABSOLUTE_Y_OFFSET, ALIGNMENT, ALIGNMENT_SEGMENT, ALIGNMENT_X, ALIGNMENT_Y, ARROWHEAD, ARROWSHAPE_CLASSNAME, ARROWTAIL, BEND, BENDS, BENDS_PATH, BGIMAGE, BGIMAGE_PATH, BLUE, BOTTOM_INSIDE, BOTTOM_OUTSIDE, CENTERED, CIRCLE_CENTER, CIRCLE_CENTER_PATH, CIRCLE_CLASSNAME, CIRCLE_LINE_SEGMENTATION_CLASSNAME, CIRCLE_LINE_SEGMENTATION_SHAPE, COMMON, COORD_PATH, COORDINATE, COORDX_PATH, COORDY_PATH, COORDZ_PATH, CUBICSPLINE, CUBICSPLINE_CLASSNAME, DEFAULT_CAP, DEFAULT_EDGE_FILLCOLOR, DEFAULT_EDGE_FRAMECOLOR, DEFAULT_EDGE_FRAMETHICKNESS, DEFAULT_EDGE_THICKNESS, DEFAULT_FONT_SIZE, DEFAULT_GRAPHIC_ELEMENT_FRAMECOLOR, DEFAULT_GRAPHIC_ELEMENT_FRAMETHICKNESS, DEFAULT_JOIN, DEFAULT_MAX_WIDTH, DEFAULT_MITER, DEFAULT_NODE_FILLCOLOR, DEFAULT_NODE_FRAMECOLOR, DEFAULT_NODE_FRAMETHICKNESS, DEFAULT_NODE_SHAPE, DEFAULT_NODE_SIZE, DEPTH, DEPTH_PATH, DIM_PATH, DIMENSION, DIMH_PATH, DIMW_PATH, DOCKING, DOCKING_PATH, EDGE, ELLIPSE_CLASSNAME, END_ANGLE, FILLCOLOR, FILLCOLOR_PATH, FONT, FONT_SIZE, FRAMECOLOR, FRAMETHICKNESS, FRAMETHICKNESS_PATH, GRAPHICS, GREEN, GRID, GRID_PATH, HEIGHT, IMAGE, IN, INTRA_LEVEL_CLASSNAME, LABEL, LABEL_ATTRIBUTE_PATH, LABEL_DISTANCE, LEFT_INSIDE, LEFT_OUTSIDE, LEVEL, LINE_POINT_PATH, LINEMODE, LINEMODE_PATH, LINETYPE, LINEWIDTH_PATH, MAX_WIDTH, MAXIMIZE, NAME, NEARSOURCE, NEARTARGET, NODE, OFFSET, OPAC, OUT, OUTLINE_PATH, POLYCLOSED_CLASSNAME, POLYLINE, POLYLINE_CLASSNAME, PORT, PORTS, PORTS_PATH, POSITION, QUAD_CURVE_EDGE_SHAPE, RECTANGLE_CLASSNAME, RED, REF, RELATIVE_ALIGNMENT, RELATIVE_X_OFFSET, RELATIVE_Y_OFFSET, RIGHT_INSIDE, RIGHT_OUTSIDE, ROTATION, SHAPE, SHAPE_DESC_PATH, SHAPE_PATH, SHAPEDESCRIPTION, SMOOTH_CLASSNAME, SMOOTH_LINE_EDGE_SHAPE, SMOOTHLINE, SOURCE, SPIRAL_CLASSNAME, SQUARESPLINE, SQUARESPLINE_CLASSNAME, START_ANGLE, STRAIGHT_LINE_EDGE_SHAPE, STRAIGHTLINE, STRAIGHTLINE_CLASSNAME, TARGET, TEXTCOLOR, THICKNESS, THICKNESS_PATH, TILED, TOP_INSIDE, TOP_OUTSIDE, WIDTH, X, Y, Z
 
Constructor Summary
CreateTool(ToolPlugin toolPlugin, PositionInfo positionInfo)
          Deprecated. Constructs a new CreateTool.
 
Method Summary
 Edge addEdge(Node destNode)
          Deprecated. moved from the FinishAddEdgeAction [MH]
 void afterEvent(Point position)
          Deprecated. Is called after an event.
 void deactivate()
          Deprecated. Classes that overwrite this method should call super.deactive first.
 FunctionAction getFunctionAction(String functionName)
          Deprecated. Returns the action of a function.
 FunctionComponent getSubComponent(String name)
          Deprecated. Implementation of FunctionComponent
 void moveNode(Node node, Point newPosition)
          Deprecated. Moves the given Node to the given position.
 void setAddEdgeSourceNode(Node node)
          Deprecated. Sets the source-node of an edge now to be added by the tool.
 
Methods inherited from class org.graffiti.plugins.modes.advanced.AbstractEditingTool
activate, addAttributesToMap, addAttributesToMap, beforeEvent, fireSelectionChanged, getActiveJComponent, getAttributesMap, getBendCoords, getCooAttNode, getDummySupportViews, getGEMap, getGraph, getMode, getNodeCoords, getNodeDims, getNodesUnderMouse, getPositionInfo, getPrefs, getSelection, getToolPlugin, getTopEdge, getTopEdgeComponent, getTopGEComponent, getTopGraphElement, getTopNode, getTopNodeComponent, getUndoSupport, getViewComponent, getZoomedPosition, isInDefaultMode, isInMultiCommandMode, isMarked, isMarked, isViewListener, mark, mark, mouseDragged, mouseEntered, mouseExited, mouseMoved, nodeAdded, sessionChanged, setAttributesMap, setBendCoords, setModeToDefault, setNodeCoords, setNodeDims, switchToDefaultMode, switchToMultiCommandMode, unmark, unmark, unmarkAll, viewChanged
 
Methods inherited from class org.graffiti.plugins.modes.deprecated.AbstractUndoableTool
isSelectionListener, isSessionListener, sessionDataChanged, setUndoSupport
 
Methods inherited from class org.graffiti.plugins.modes.deprecated.AbstractTool
displayAsMarked, displayAsMarked, displayAsMarked, displayAsMarked, highlight, isActive, selectionChanged, selectionListChanged, setGraph, setPrefs, unDisplayAsMarked, unDisplayAsMarked, unDisplayAsMarked, unDisplayAsMarked
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mousePressed, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mousePressed, mouseReleased
 

Constructor Detail

CreateTool

public CreateTool(ToolPlugin toolPlugin,
                  PositionInfo positionInfo)
Deprecated. 
Constructs a new CreateTool. Sets up all functions. _Currently_, also the bindings are defined here (hard-coded).

Parameters:
toolPlugin - ToolPlugin-instance this tool belongs to.
positionInfo - Information of the position of the mouse
Method Detail

setAddEdgeSourceNode

public void setAddEdgeSourceNode(Node node)
Deprecated. 
Sets the source-node of an edge now to be added by the tool.

Parameters:
node - source-node of the new edge

getFunctionAction

public FunctionAction getFunctionAction(String functionName)
Deprecated. 
Returns the action of a function.

Specified by:
getFunctionAction in interface FunctionComponent
Overrides:
getFunctionAction in class AbstractEditingTool
Parameters:
functionName - The given name of a function.
Returns:
the action of a function.

getSubComponent

public FunctionComponent getSubComponent(String name)
Deprecated. 
Implementation of FunctionComponent

Specified by:
getSubComponent in interface FunctionComponent
Overrides:
getSubComponent in class AbstractEditingTool
Parameters:
name - The given name of the FunctionComponent
Returns:
FunctionComponent

addEdge

public Edge addEdge(Node destNode)
Deprecated. 
moved from the FinishAddEdgeAction [MH]

Parameters:
destNode - destination node
Returns:
The currently added node

afterEvent

public void afterEvent(Point position)
Deprecated. 
Is called after an event.

Specified by:
afterEvent in interface FunctionComponent
Overrides:
afterEvent in class AbstractEditingTool
Parameters:
position - The given position

deactivate

public void deactivate()
Deprecated. 
Classes that overwrite this method should call super.deactive first.

Specified by:
deactivate in interface org.graffiti.plugins.modes.deprecated.Tool
Overrides:
deactivate in class AbstractEditingTool
See Also:
Tool.deactivate()

moveNode

public void moveNode(Node node,
                     Point newPosition)
Deprecated. 
Moves the given Node to the given position.

Parameters:
node - any Node
newPosition - the new position of the given node


Generated at 2012-05-30 11:01:25 PM CEST