Draw2D v2.0

org.eclipse.draw2d
Class PolylineConnection

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--org.eclipse.draw2d.Shape
              |
              +--org.eclipse.draw2d.Polyline
                    |
                    +--org.eclipse.draw2d.PolylineConnection
All Implemented Interfaces:
AnchorListener, Connection, IFigure

public class PolylineConnection
extends Polyline
implements Connection, AnchorListener

Connection based on polyline. The layout of the connection is handled by routers.


Inner classes inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator
 
Inner classes inherited from class org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Fields inherited from class org.eclipse.draw2d.Shape
lineStyle, lineWidth
 
Fields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
 
Fields inherited from interface org.eclipse.draw2d.Connection
PROPERTY_CONNECTION_ROUTER, PROPERTY_POINTS
 
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
PolylineConnection()
           
 
Method Summary
 void addNotify()
          Called after this figure is added to its parent.
 void anchorMoved(ConnectionAnchor anchor)
          Called when an anchor has moved to a new location.
 Rectangle getBounds()
          Returns the smallest rectangle completely enclosing the figure.
 ConnectionRouter getConnectionRouter()
          Returns the ConnectionRouter used to route this Connection.
 ConnectionAnchor getEndAnchor()
          Deprecated.  
protected  RotatableDecoration getEndDecoration()
          Deprecated. Use getTargetDecoration().
 PointList getPoints()
          Returns the PointList containing the Points that make up this Connection.
 Object getRoutingConstraint()
          Returns the routing constraint or null.
 ConnectionAnchor getSourceAnchor()
          Returns the ConnectionAnchor at the source end of this Connection.
protected  RotatableDecoration getSourceDecoration()
           
 ConnectionAnchor getStartAnchor()
          Deprecated.  
protected  RotatableDecoration getStartDecoration()
          Deprecated.  
 ConnectionAnchor getTargetAnchor()
          Returns the ConnectionAnchor at the target end of this Connection.
protected  RotatableDecoration getTargetDecoration()
          Returns the RotatableDecoration at the target end of the Connection.
 void layout()
          Lays out this figure using its LayoutManager.
 void removeNotify()
          Called just before the receiver is being removed from its parent.
 void setConnectionRouter(ConnectionRouter cr)
          Sets the ConnectionRouter for this Connection.
 void setEndAnchor(ConnectionAnchor anchor)
          Deprecated.  
 void setEndDecoration(RotatableDecoration dec)
          Deprecated.  
 void setRoutingConstraint(Object cons)
          Sets the routing constraint used by the router.
 void setSourceAnchor(ConnectionAnchor anchor)
          Sets the ConnectionAnchor to be used at the Source end of this Connection.
 void setSourceDecoration(RotatableDecoration dec)
          Sets the decoration to be used at the start of the Connection.
 void setStartAnchor(ConnectionAnchor anchor)
          Deprecated.  
 void setStartDecoration(RotatableDecoration dec)
          Deprecated.  
 void setTargetAnchor(ConnectionAnchor anchor)
          Sets the ConnectionAnchor to be used at the target end of this Connection.
 void setTargetDecoration(RotatableDecoration dec)
          Sets the decoration to be used at the end of the Connection.
 
Methods inherited from class org.eclipse.draw2d.Polyline
addPoint, containsPoint, fillShape, getEnd, getStart, insertPoint, isOpaque, outlineShape, primTranslate, removeAllPoints, removePoint, setEnd, setEndpoints, setLineWidth, setPoint, setPoints, setStart, useLocalCoordinates
 
Methods inherited from class org.eclipse.draw2d.Shape
getLineStyle, getLineWidth, paintFigure, setFill, setFillXOR, setLineStyle, setOutline, setOutlineXOR, setXOR
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocation, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, isEnabled, isFocusTraversable, isMouseEventTarget, isRequestFocusEnabled, isValid, isValidationRoot, isVisible, paint, paintBorder, paintChildren, paintClientArea, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setUpdateManager, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d.Connection
setPoints
 
Methods inherited from interface org.eclipse.draw2d.IFigure
add, add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getChildren, getClientArea, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, isEnabled, isFocusTraversable, isOpaque, isRequestFocusEnabled, isVisible, paint, remove, removeAncestorListener, removeFigureListener, removeFocusListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setUpdateManager, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
 

Constructor Detail

PolylineConnection

public PolylineConnection()
Method Detail

addNotify

public void addNotify()
Description copied from interface: IFigure
Called after this figure is added to its parent.
Specified by:
addNotify in interface IFigure
Overrides:
addNotify in class Figure

anchorMoved

public void anchorMoved(ConnectionAnchor anchor)
Description copied from interface: AnchorListener
Called when an anchor has moved to a new location.
Specified by:
anchorMoved in interface AnchorListener

getBounds

public Rectangle getBounds()
Description copied from interface: IFigure
Returns the smallest rectangle completely enclosing the figure. Implementation may return the Rectangle by reference. For this reason, callers of this method must not modify the returned Rectangle.
Specified by:
getBounds in interface IFigure
Overrides:
getBounds in class Polyline

getConnectionRouter

public ConnectionRouter getConnectionRouter()
Description copied from interface: Connection
Returns the ConnectionRouter used to route this Connection. Does not return null.
Specified by:
getConnectionRouter in interface Connection

getEndAnchor

public ConnectionAnchor getEndAnchor()
Deprecated.  

Specified by:
getEndAnchor in interface Connection

getEndDecoration

protected RotatableDecoration getEndDecoration()
Deprecated. Use getTargetDecoration().


getPoints

public PointList getPoints()
Description copied from interface: Connection
Returns the PointList containing the Points that make up this Connection. This may be returned by reference.
Specified by:
getPoints in interface Connection
Overrides:
getPoints in class Polyline

getRoutingConstraint

public Object getRoutingConstraint()
Description copied from interface: Connection
Returns the routing constraint or null.
Specified by:
getRoutingConstraint in interface Connection

getSourceAnchor

public ConnectionAnchor getSourceAnchor()
Description copied from interface: Connection
Returns the ConnectionAnchor at the source end of this Connection.
Specified by:
getSourceAnchor in interface Connection

getSourceDecoration

protected RotatableDecoration getSourceDecoration()

getStartAnchor

public ConnectionAnchor getStartAnchor()
Deprecated.  

Specified by:
getStartAnchor in interface Connection

getStartDecoration

protected RotatableDecoration getStartDecoration()
Deprecated.  


getTargetAnchor

public ConnectionAnchor getTargetAnchor()
Description copied from interface: Connection
Returns the ConnectionAnchor at the target end of this Connection.
Specified by:
getTargetAnchor in interface Connection

getTargetDecoration

protected RotatableDecoration getTargetDecoration()
Returns the RotatableDecoration at the target end of the Connection.
Since:
2.0

layout

public void layout()
Description copied from class: Figure
Lays out this figure using its LayoutManager.
Overrides:
layout in class Figure

removeNotify

public void removeNotify()
Called just before the receiver is being removed from its parent. Results in removing itself from the connection router.
Specified by:
removeNotify in interface IFigure
Overrides:
removeNotify in class Figure
Since:
2.0

setConnectionRouter

public void setConnectionRouter(ConnectionRouter cr)
Description copied from interface: Connection
Sets the ConnectionRouter for this Connection.
Specified by:
setConnectionRouter in interface Connection

setEndAnchor

public void setEndAnchor(ConnectionAnchor anchor)
Deprecated.  

Specified by:
setEndAnchor in interface Connection

setEndDecoration

public void setEndDecoration(RotatableDecoration dec)
Deprecated.  


setRoutingConstraint

public void setRoutingConstraint(Object cons)
Description copied from interface: Connection
Sets the routing constraint used by the router.
Specified by:
setRoutingConstraint in interface Connection

setStartDecoration

public void setStartDecoration(RotatableDecoration dec)
Deprecated.  


setSourceAnchor

public void setSourceAnchor(ConnectionAnchor anchor)
Description copied from interface: Connection
Sets the ConnectionAnchor to be used at the Source end of this Connection.
Specified by:
setSourceAnchor in interface Connection

setSourceDecoration

public void setSourceDecoration(RotatableDecoration dec)
Sets the decoration to be used at the start of the Connection.
Since:
2.0

setStartAnchor

public void setStartAnchor(ConnectionAnchor anchor)
Deprecated.  

Specified by:
setStartAnchor in interface Connection

setTargetAnchor

public void setTargetAnchor(ConnectionAnchor anchor)
Description copied from interface: Connection
Sets the ConnectionAnchor to be used at the target end of this Connection.
Specified by:
setTargetAnchor in interface Connection

setTargetDecoration

public void setTargetDecoration(RotatableDecoration dec)
Sets the decoration to be used at the end of the Connection.

Draw2D v2.0