JGraphpad Pro
v6.0.5.0


com.jgraph.pad.graph
Class JGraphpadEdgeView.JGraphpadEdgeHandle

java.lang.Object
  extended byorg.jgraph.graph.EdgeView.EdgeHandle
      extended bycom.jgraph.pad.graph.JGraphpadEdgeView.JGraphpadEdgeHandle
All Implemented Interfaces:
org.jgraph.graph.CellHandle, Serializable
Enclosing class:
JGraphpadEdgeView

public static class JGraphpadEdgeView.JGraphpadEdgeHandle
extends org.jgraph.graph.EdgeView.EdgeHandle

Custom handle that implements moveable ports.

See Also:
Serialized Form

Field Summary
protected  boolean resetOffset
          Specifies if the offset should be reset if the mouse is released.
 
Fields inherited from class org.jgraph.graph.EdgeView.EdgeHandle
currentIndex, currentLabel, currentPoint, edge, edgeModified, editing, extraLabelLocations, firstOverlayCall, graph, initialLabelLocation, isEdgeConnectable, label, loc, orig, r, relevantEdge, source, target
 
Constructor Summary
JGraphpadEdgeView.JGraphpadEdgeHandle(org.jgraph.graph.EdgeView edge, org.jgraph.graph.GraphContext ctx)
          Constructs a new edge handle for the specified edge and context.
 
Method Summary
 boolean isAddPointEvent(MouseEvent event)
          Overrides the parent implementation to support the shift key to add points to edges.
 boolean isRemovePointEvent(MouseEvent event)
          Overrides the parent implementation to support the shift key to remove points from edges.
 void mousePressed(MouseEvent event)
          Overrides the parent implementation to reset the port offset if a remove event has been performed on either port.
protected  void processNestedMap(Map nested, boolean clone)
          Overrides the parent implementation to reset the port offset if the resetOffset flag is set.
protected  boolean snap(boolean isSource, Point2D point)
          Overrides the parent implementation to set the port offset if the mousepointer is over the port's parent view but not over the port's non-floating location (eg center).
 
Methods inherited from class org.jgraph.graph.EdgeView.EdgeHandle
createConnectionSet, getRelativeLabelPosition, invalidate, isConstrainedMoveEvent, isEditing, isSourceEditing, isTargetEditing, mouseDragged, mouseMoved, mouseReleased, overlay, paint, paintPort, reloadPoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resetOffset

protected boolean resetOffset
Specifies if the offset should be reset if the mouse is released.

Constructor Detail

JGraphpadEdgeView.JGraphpadEdgeHandle

public JGraphpadEdgeView.JGraphpadEdgeHandle(org.jgraph.graph.EdgeView edge,
                                             org.jgraph.graph.GraphContext ctx)
Constructs a new edge handle for the specified edge and context.

Parameters:
edge - The edge to create the handle for.
ctx - The context to use for the handle.
Method Detail

isRemovePointEvent

public boolean isRemovePointEvent(MouseEvent event)
Overrides the parent implementation to support the shift key to remove points from edges.

Parameters:
event - The object that describes the event.
Returns:
Returns true if the event is a remove point event.

isAddPointEvent

public boolean isAddPointEvent(MouseEvent event)
Overrides the parent implementation to support the shift key to add points to edges.

Parameters:
event - The object that describes the event.
Returns:
Returns true if the event is a add point event.

mousePressed

public void mousePressed(MouseEvent event)
Overrides the parent implementation to reset the port offset if a remove event has been performed on either port.

Parameters:
event - The object that describes the event.

snap

protected boolean snap(boolean isSource,
                       Point2D point)
Overrides the parent implementation to set the port offset if the mousepointer is over the port's parent view but not over the port's non-floating location (eg center).

Parameters:
isSource - Whether to snap the source or target port.
point - The point that should be used for snapping.

processNestedMap

protected void processNestedMap(Map nested,
                                boolean clone)
Overrides the parent implementation to reset the port offset if the resetOffset flag is set.

Parameters:
nested - The nested attribute map that is used to change the layout cache.
clone - Whether the control key was pressed.

JGraphpad Pro
v6.0.5.0


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