org.jgraph.graph

Class EdgeView.EdgeHandle

Enclosing Class:
EdgeView
Implemented Interfaces:
CellHandle, Serializable

public static class EdgeView.EdgeHandle
extends java.lang.Object
implements CellHandle, Serializable

Field Summary

protected int
currentIndex
Holds the index of the current (editing) label or point.
protected int
currentLabel
Holds the index of the current (editing) label or point.
protected Point2D
currentPoint
protected EdgeView
edge
protected boolean
edgeModified
Indicates whether the edge has been modified during the last mouse pressed and dragged operations.
protected boolean
editing
True if the cell is being edited.
protected Rectangle2D[]
extraLabelLocations
protected boolean
firstOverlayCall
protected JGraph
graph
protected Point2D
initialLabelLocation
Holds the initial location of the label.
protected boolean
isEdgeConnectable
protected boolean
label
protected Rectangle2D
loc
protected EdgeView
orig
protected Rectangle2D[]
r
protected EdgeView
relevantEdge
protected boolean
source
protected boolean
target

Constructor Summary

EdgeHandle(EdgeView edge, GraphContext ctx)

Method Summary

protected ConnectionSet
createConnectionSet(EdgeView view, boolean verbose)
protected Point2D
getRelativeLabelPosition(EdgeView edge, Point2D p)
protected void
invalidate()
boolean
isAddPointEvent(MouseEvent event)
Returning true signifies a mouse event adds a new point to an edge.
boolean
isConstrainedMoveEvent(MouseEvent e)
protected boolean
isEditing()
boolean
isRemovePointEvent(MouseEvent event)
Returning true signifies a mouse event removes a given point.
protected boolean
isSourceEditing()
protected boolean
isTargetEditing()
void
mouseDragged(MouseEvent event)
void
mouseMoved(MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).
void
mousePressed(MouseEvent event)
void
mouseReleased(MouseEvent e)
void
overlay(Graphics g)
void
paint(Graphics g)
protected void
paintPort(Graphics g, CellView p)
protected void
processNestedMap(Map nested, boolean clone)
protected void
reloadPoints(EdgeView edge)
protected boolean
snap(boolean source, Point2D point)

Field Details

currentIndex

protected int currentIndex
Holds the index of the current (editing) label or point.

currentLabel

protected int currentLabel
Holds the index of the current (editing) label or point.

currentPoint

protected Point2D currentPoint

edge

protected EdgeView edge

edgeModified

protected boolean edgeModified
Indicates whether the edge has been modified during the last mouse pressed and dragged operations.

editing

protected boolean editing
True if the cell is being edited.

extraLabelLocations

protected Rectangle2D[] extraLabelLocations

firstOverlayCall

protected boolean firstOverlayCall

graph

protected JGraph graph

initialLabelLocation

protected Point2D initialLabelLocation
Holds the initial location of the label.

isEdgeConnectable

protected boolean isEdgeConnectable

label

protected boolean label

loc

protected Rectangle2D loc

orig

protected EdgeView orig

r

protected Rectangle2D[] r

relevantEdge

protected EdgeView relevantEdge

source

protected boolean source

target

protected boolean target

Constructor Details

EdgeHandle

public EdgeHandle(EdgeView edge,
                  GraphContext ctx)

Method Details

createConnectionSet

protected ConnectionSet createConnectionSet(EdgeView view,
                                            boolean verbose)

getRelativeLabelPosition

protected Point2D getRelativeLabelPosition(EdgeView edge,
                                           Point2D p)

invalidate

protected void invalidate()

isAddPointEvent

public boolean isAddPointEvent(MouseEvent event)
Returning true signifies a mouse event adds a new point to an edge.

isConstrainedMoveEvent

public boolean isConstrainedMoveEvent(MouseEvent e)

isEditing

protected boolean isEditing()

isRemovePointEvent

public boolean isRemovePointEvent(MouseEvent event)
Returning true signifies a mouse event removes a given point.

isSourceEditing

protected boolean isSourceEditing()

isTargetEditing

protected boolean isTargetEditing()

mouseDragged

public void mouseDragged(MouseEvent event)
Specified by:
mouseDragged in interface CellHandle

mouseMoved

public void mouseMoved(MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).
Specified by:
mouseMoved in interface CellHandle

mousePressed

public void mousePressed(MouseEvent event)
Specified by:
mousePressed in interface CellHandle

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface CellHandle

overlay

public void overlay(Graphics g)
Specified by:
overlay in interface CellHandle

paint

public void paint(Graphics g)
Specified by:
paint in interface CellHandle

paintPort

protected void paintPort(Graphics g,
                         CellView p)

processNestedMap

protected void processNestedMap(Map nested,
                                boolean clone)

reloadPoints

protected void reloadPoints(EdgeView edge)

snap

protected boolean snap(boolean source,
                       Point2D point)

Copyright (C) 2001-2006 Gaudenz Alder. All rights reserved.