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 int
Holds the index of the current (editing) label or point.protected int
Holds the index of the current (editing) label or point.protected Point2D
protected EdgeView
protected boolean
Indicates whether the edge has been modified during the last mouse pressed and dragged operations.protected boolean
True if the cell is being edited.protected Rectangle2D[]
protected boolean
protected JGraph
protected JComponent
Component that is used for highlighting cells if the graph does not allow XOR painting.protected Point2D
Holds the initial location of the label.protected boolean
protected boolean
protected Rectangle2D
protected EdgeView
protected Rectangle2D[]
protected EdgeView
protected boolean
protected boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionSet
createConnectionSet
(EdgeView view, boolean verbose) protected JComponent
Creates the component that is used for highlighting cells if the graph does not allow XOR painting.protected Rectangle
getHighlightBounds
(JGraph graph, CellView cellView) Returns the bounds to be used to highlight the given cell view.protected Point2D
getRelativeLabelPosition
(EdgeView edge, Point2D p) protected void
Highlights the given cell view or removes the highlight if no cell view is specified.protected void
boolean
isAddPointEvent
(MouseEvent event) Returning true signifies a mouse event adds a new point to an edge.boolean
protected boolean
boolean
isRemovePointEvent
(MouseEvent event) Returning true signifies a mouse event removes a given point.protected boolean
protected boolean
void
mouseDragged
(MouseEvent event) Messaged when the user drags the selection.void
mouseMoved
(MouseEvent event) Invoked when the mouse pointer has been moved on a component (with no buttons down).void
mousePressed
(MouseEvent event) Messaged when a mouse button is pressed.void
Messaged when the drag operation has terminated with a drop.void
Paint the handle on the given graphics object during mouse operations.void
Paint the handle on the given graphics object once.protected void
protected void
processNestedMap
(Map nested, boolean clone) protected void
reloadPoints
(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:CellHandle
Paint the handle on the given graphics object once.- Specified by:
paint
in 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:CellHandle
Paint the handle on the given graphics object during mouse operations.- Specified by:
overlay
in 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:
mouseMoved
in interfaceCellHandle
- Parameters:
event
- the mouse event to be processed
-
mousePressed
Description copied from interface:CellHandle
Messaged when a mouse button is pressed.- Specified by:
mousePressed
in interfaceCellHandle
- Parameters:
event
- the mouse event to be processed
-
mouseDragged
Description copied from interface:CellHandle
Messaged when the user drags the selection. The Controller is responsible to determine whether the mouse is inside the parent graph or not.- Specified by:
mouseDragged
in interfaceCellHandle
- Parameters:
event
- the drag event to be processed
-
getRelativeLabelPosition
-
mouseReleased
Description copied from interface:CellHandle
Messaged when the drag operation has terminated with a drop.- Specified by:
mouseReleased
in interfaceCellHandle
- Parameters:
e
- the drop event to be processed
-
processNestedMap
-
createConnectionSet
-
invalidate
protected void invalidate()
-