Package org.jgraph.graph
Class EdgeView.EdgeHandle
java.lang.Object
org.jgraph.graph.EdgeView.EdgeHandle
- All Implemented Interfaces:
Serializable,CellHandle
- Enclosing class:
- EdgeView
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intHolds the index of the current (editing) label or point.protected intHolds the index of the current (editing) label or point.protected Point2Dprotected EdgeViewprotected booleanIndicates whether the edge has been modified during the last mouse pressed and dragged operations.protected booleanTrue if the cell is being edited.protected Rectangle2D[]protected booleanprotected JGraphprotected JComponentComponent that is used for highlighting cells if the graph does not allow XOR painting.protected Point2DHolds the initial location of the label.protected booleanprotected booleanprotected Rectangle2Dprotected EdgeViewprotected Rectangle2D[]protected EdgeViewprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionSetcreateConnectionSet(EdgeView view, boolean verbose) protected JComponentCreates the component that is used for highlighting cells if the graph does not allow XOR painting.protected RectanglegetHighlightBounds(JGraph graph, CellView cellView) Returns the bounds to be used to highlight the given cell view.protected Point2DgetRelativeLabelPosition(EdgeView edge, Point2D p) protected voidHighlights the given cell view or removes the highlight if no cell view is specified.protected voidbooleanisAddPointEvent(MouseEvent event) Returning true signifies a mouse event adds a new point to an edge.booleanprotected booleanbooleanisRemovePointEvent(MouseEvent event) Returning true signifies a mouse event removes a given point.protected booleanprotected booleanvoidmouseDragged(MouseEvent event) Messaged when the user drags the selection.voidmouseMoved(MouseEvent event) Invoked when the mouse pointer has been moved on a component (with no buttons down).voidmousePressed(MouseEvent event) Messaged when a mouse button is pressed.voidMessaged when the drag operation has terminated with a drop.voidPaint the handle on the given graphics object during mouse operations.voidPaint the handle on the given graphics object once.protected voidprotected voidprocessNestedMap(Map nested, boolean clone) protected voidreloadPoints(EdgeView edge) protected boolean
-
Field Details
-
graph
-
edge
-
orig
-
label
protected boolean label -
source
protected boolean source -
target
protected boolean target -
currentLabel
protected int currentLabelHolds the index of the current (editing) label or point. -
currentIndex
protected int currentIndexHolds the index of the current (editing) label or point. -
currentPoint
-
r
-
loc
-
extraLabelLocations
-
firstOverlayCall
protected boolean firstOverlayCall -
isEdgeConnectable
protected boolean isEdgeConnectable -
relevantEdge
-
editing
protected boolean editingTrue if the cell is being edited. -
initialLabelLocation
Holds the initial location of the label. -
edgeModified
protected boolean edgeModifiedIndicates whether the edge has been modified during the last mouse pressed and dragged operations. -
highlight
Component that is used for highlighting cells if the graph does not allow XOR painting.
-
-
Constructor Details
-
EdgeHandle
-
-
Method Details
-
createHighlight
Creates the component that is used for highlighting cells if the graph does not allow XOR painting. -
reloadPoints
-
paint
Description copied from interface:CellHandlePaint the handle on the given graphics object once.- Specified by:
paintin interfaceCellHandle- Parameters:
g- the graphics object to paint the handle on
-
highlight
Highlights the given cell view or removes the highlight if no cell view is specified.- Parameters:
graph-cellView-
-
getHighlightBounds
Returns the bounds to be used to highlight the given cell view.- Parameters:
graph-cellView-- Returns:
-
overlay
Description copied from interface:CellHandlePaint the handle on the given graphics object during mouse operations.- Specified by:
overlayin interfaceCellHandle- Parameters:
g- the graphics object to paint the handle on
-
paintPort
-
snap
-
isConstrainedMoveEvent
-
isAddPointEvent
Returning true signifies a mouse event adds a new point to an edge. -
isRemovePointEvent
Returning true signifies a mouse event removes a given point. -
isSourceEditing
protected boolean isSourceEditing() -
isTargetEditing
protected boolean isTargetEditing() -
isEditing
protected boolean isEditing() -
mouseMoved
Invoked when the mouse pointer has been moved on a component (with no buttons down).- Specified by:
mouseMovedin interfaceCellHandle- Parameters:
event- the mouse event to be processed
-
mousePressed
Description copied from interface:CellHandleMessaged when a mouse button is pressed.- Specified by:
mousePressedin interfaceCellHandle- Parameters:
event- the mouse event to be processed
-
mouseDragged
Description copied from interface:CellHandleMessaged when the user drags the selection. The Controller is responsible to determine whether the mouse is inside the parent graph or not.- Specified by:
mouseDraggedin interfaceCellHandle- Parameters:
event- the drag event to be processed
-
getRelativeLabelPosition
-
mouseReleased
Description copied from interface:CellHandleMessaged when the drag operation has terminated with a drop.- Specified by:
mouseReleasedin interfaceCellHandle- Parameters:
e- the drop event to be processed
-
processNestedMap
-
createConnectionSet
-
invalidate
protected void invalidate()
-