JHotDraw 7.4.1

org.jhotdraw.draw.handle
Class ConnectionEndHandle

java.lang.Object
  extended by org.jhotdraw.draw.handle.AbstractHandle
      extended by org.jhotdraw.draw.handle.AbstractConnectionHandle
          extended by org.jhotdraw.draw.handle.ConnectionEndHandle
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, FigureListener, Handle

public class ConnectionEndHandle
extends AbstractConnectionHandle

A Handle which allows to connect the end of a ConnectionFigure to another figure.

Version:
$Id: ConnectionEndHandle.java -1 $
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class org.jhotdraw.draw.handle.AbstractConnectionHandle
connectors
 
Fields inherited from class org.jhotdraw.draw.handle.AbstractHandle
listenerList, view
 
Constructor Summary
ConnectionEndHandle(ConnectionFigure owner)
          Constructs the connection handle for the given start figure.
 
Method Summary
protected  boolean canConnect(Connector existingEnd, Connector targetEnd)
           
protected  void connect(Connector c)
          Sets the start of the connection.
protected  void disconnect()
          Disconnects the start figure.
protected  int getBezierNodeIndex()
           
protected  java.awt.geom.Point2D.Double getLocation()
          Returns the start point of the connection.
protected  Connector getTarget()
          Returns the connector of the change.
protected  void setLocation(java.awt.geom.Point2D.Double p)
          Sets the start point of the connection.
 
Methods inherited from class org.jhotdraw.draw.handle.AbstractConnectionHandle
basicGetBounds, createSecondaryHandles, draw, findConnector, getBezierFigure, getBezierNode, getOwner, getSource, getToolTipText, isCombinableWith, repaintConnectors, setPotentialTarget, trackEnd, trackStart, trackStep
 
Methods inherited from class org.jhotdraw.draw.handle.AbstractHandle
addHandleListener, areaInvalidated, attributeChanged, contains, dispose, drawCircle, drawDiamond, drawRectangle, figureAdded, figureChanged, figureHandlesChanged, figureRemoved, figureRequestRemove, fireAreaInvalidated, fireHandleRequestRemove, fireHandleRequestSecondaryHandles, fireUndoableEditHappened, getBounds, getCursor, getDrawingArea, getEditor, getHandlesize, getView, invalidate, keyPressed, keyReleased, keyTyped, removeHandleListener, setToolTipText, setView, trackDoubleClick, updateBounds, viewTransformChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionEndHandle

public ConnectionEndHandle(ConnectionFigure owner)
Constructs the connection handle for the given start figure.

Method Detail

connect

protected void connect(Connector c)
Sets the start of the connection.

Specified by:
connect in class AbstractConnectionHandle

disconnect

protected void disconnect()
Disconnects the start figure.

Specified by:
disconnect in class AbstractConnectionHandle

getTarget

protected Connector getTarget()
Description copied from class: AbstractConnectionHandle
Returns the connector of the change.

Specified by:
getTarget in class AbstractConnectionHandle

setLocation

protected void setLocation(java.awt.geom.Point2D.Double p)
Sets the start point of the connection.

Specified by:
setLocation in class AbstractConnectionHandle

getLocation

protected java.awt.geom.Point2D.Double getLocation()
Returns the start point of the connection.

Specified by:
getLocation in class AbstractConnectionHandle

canConnect

protected boolean canConnect(Connector existingEnd,
                             Connector targetEnd)
Specified by:
canConnect in class AbstractConnectionHandle

getBezierNodeIndex

protected int getBezierNodeIndex()
Specified by:
getBezierNodeIndex in class AbstractConnectionHandle

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.