EdgeView.EdgeHandle (JGraph v5.12.4.2 API Specification)
Keywords: org.jgraph.graph.EdgeView.EdgeHandle class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.12.4.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgraph.graph
Class EdgeView.EdgeHandle

    java.lang.Object
      org.jgraph.graph.EdgeView.EdgeHandle

All Implemented Interfaces:
  CellHandle, Serializable

Enclosing class:
  EdgeView

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

See Also:
  Serialized Form

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 JComponent` | `highlight` Component that is used for highlighting cells if the graph does not allow XOR painting.
`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
`EdgeView.EdgeHandle(EdgeView edge, GraphContext ctx)`

Method Summary
`protected ConnectionSet` | `createConnectionSet(EdgeView view, boolean verbose)`
`protected JComponent` | `createHighlight()` 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` | `highlight(JGraph graph, CellView cellView)` Highlights the given cell view or removes the highlight if no cell view is specified.
`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)` 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` | `mouseReleased(MouseEvent e)` Messaged when the drag operation has terminated with a drop.
`void` | `overlay(Graphics g)` Paint the handle on the given graphics object during mouse operations.
`void` | `paint(Graphics g)` Paint the handle on the given graphics object once.
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### graph

    protected JGraph graph

### edge

    protected EdgeView edge

### orig

    protected EdgeView orig

### label

    protected boolean label

### source

    protected boolean source

### target

    protected boolean target

### currentLabel

    protected int currentLabel

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

### currentIndex

    protected int currentIndex

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

### currentPoint

    protected Point2D currentPoint

### r

    protected transient Rectangle2D[] r

### loc

    protected transient Rectangle2D loc

### extraLabelLocations

    protected transient Rectangle2D[] extraLabelLocations

### firstOverlayCall

    protected boolean firstOverlayCall

### isEdgeConnectable

    protected boolean isEdgeConnectable

### relevantEdge

    protected EdgeView relevantEdge

### editing

    protected boolean editing

  True if the cell is being edited.

### initialLabelLocation

    protected Point2D initialLabelLocation

  Holds the initial location of the label.

### edgeModified

    protected boolean edgeModified

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

### highlight

    protected JComponent highlight

  Component that is used for highlighting cells if the graph does not allow XOR painting.

Constructor Detail

### EdgeView.EdgeHandle

    public EdgeView.EdgeHandle(EdgeView edge,
                               GraphContext ctx)

Method Detail

### createHighlight

    protected JComponent createHighlight()

  Creates the component that is used for highlighting cells if the graph does not allow XOR painting.

### reloadPoints

    protected void reloadPoints(EdgeView edge)

### paint

    public void paint(Graphics g)

  Description copied from interface: `CellHandle`
  Paint the handle on the given graphics object once.

  Specified by:
    `paint` in interface `CellHandle`
  Parameters:
    `g` - the graphics object to paint the handle on

### highlight

    protected void highlight(JGraph graph,
                             CellView cellView)

  Highlights the given cell view or removes the highlight if no cell view is specified.

  Parameters:
    `graph` -
    `cellView` -

### getHighlightBounds

    protected Rectangle getHighlightBounds(JGraph graph,
                                           CellView cellView)

  Returns the bounds to be used to highlight the given cell view.

  Parameters:
    `graph` -
    `cellView` -
  Returns:

### overlay

    public void overlay(Graphics g)

  Description copied from interface: `CellHandle`
  Paint the handle on the given graphics object during mouse operations.

  Specified by:
    `overlay` in interface `CellHandle`
  Parameters:
    `g` - the graphics object to paint the handle on

### paintPort

    protected void paintPort(Graphics g,
                             CellView p)

### snap

    protected boolean snap(boolean source,
                           Point2D point)

### isConstrainedMoveEvent

    public boolean isConstrainedMoveEvent(MouseEvent e)

### isAddPointEvent

    public boolean isAddPointEvent(MouseEvent event)

  Returning true signifies a mouse event adds a new point to an edge.

### isRemovePointEvent

    public boolean isRemovePointEvent(MouseEvent event)

  Returning true signifies a mouse event removes a given point.

### isSourceEditing

    protected boolean isSourceEditing()

### isTargetEditing

    protected boolean isTargetEditing()

### isEditing

    protected boolean isEditing()

### 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`
  Parameters:
    `event` - the mouse event to be processed

### mousePressed

    public void mousePressed(MouseEvent event)

  Description copied from interface: `CellHandle`
  Messaged when a mouse button is pressed.

  Specified by:
    `mousePressed` in interface `CellHandle`
  Parameters:
    `event` - the mouse event to be processed

### mouseDragged

    public void mouseDragged(MouseEvent event)

  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 interface `CellHandle`
  Parameters:
    `event` - the drag event to be processed

### getRelativeLabelPosition

    protected Point2D getRelativeLabelPosition(EdgeView edge,
                                               Point2D p)

### mouseReleased

    public void mouseReleased(MouseEvent e)

  Description copied from interface: `CellHandle`
  Messaged when the drag operation has terminated with a drop.

  Specified by:
    `mouseReleased` in interface `CellHandle`
  Parameters:
    `e` - the drop event to be processed

### processNestedMap

    protected void processNestedMap(Map nested,
                                    boolean clone)

### createConnectionSet

    protected ConnectionSet createConnectionSet(EdgeView view,
                                                boolean verbose)

### invalidate

    protected void invalidate()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.12.4.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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