Draw2D v2.0

org.eclipse.draw2d
Class ConnectionLayer

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--org.eclipse.draw2d.TransparentFigure
              |
              +--org.eclipse.draw2d.Layer
                    |
                    +--org.eclipse.draw2d.FreeformLayer
                          |
                          +--org.eclipse.draw2d.ConnectionLayer
All Implemented Interfaces:
FreeformFigure, IFigure

public class ConnectionLayer
extends FreeformLayer

Layer designed specifically to handle the presence of connections. This is done due to the necessity of having a router for the connections added.


Inner classes inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator
 
Inner classes inherited from class org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Field Summary
protected  ConnectionRouter connectionRouter
           
 
Fields inherited from class org.eclipse.draw2d.Layer
nextLayer, prevLayer
 
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.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
ConnectionLayer()
           
 
Method Summary
 void add(IFigure figure, Object constraint, int index)
          Adds the given figure with the given contraint at the given index.
 ConnectionRouter getConnectionRouter()
          Returns the connection router being used by this layer.
 void remove(IFigure figure)
          Removes the given figure from this figure's list of children.
 void setConnectionRouter(ConnectionRouter router)
          Sets the connection router for this layer.
 
Methods inherited from class org.eclipse.draw2d.FreeformLayer
fireMoved, primTranslate, updateFreeformBounds
 
Methods inherited from class org.eclipse.draw2d.Layer
containsPoint, findFigureAtExcluding, getNextLayer, getPreviousLayer, getUpdateManager, paint, setNextLayer, setPreviousLayer
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findMouseEventTargetAt, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocation, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, isEnabled, isFocusTraversable, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isValid, isValidationRoot, isVisible, layout, paintBorder, paintChildren, paintClientArea, paintFigure, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, 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, useLocalCoordinates, 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.IFigure
add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, 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, removeAncestorListener, removeFigureListener, removeFocusListener, removeMouseListener, removeMouseMotionListener, removeNotify, 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
 

Field Detail

connectionRouter

protected ConnectionRouter connectionRouter
Constructor Detail

ConnectionLayer

public ConnectionLayer()
Method Detail

add

public void add(IFigure figure,
                Object constraint,
                int index)
Adds the given figure with the given contraint at the given index. If the figure is a Connection, its connection router is set.
Overrides:
add in class FreeformLayer
Parameters:
figure - Figure being added.
constraint - Constraint of the figure being added.
index - Index where the figure is to be added.
Since:
2.0

getConnectionRouter

public ConnectionRouter getConnectionRouter()
Returns the connection router being used by this layer.
Returns:
Connection router being used by this layer.
Since:
2.0
See Also:
setConnectionRouter(ConnectionRouter)

remove

public void remove(IFigure figure)
Description copied from interface: IFigure
Removes the given figure from this figure's list of children.
Overrides:
remove in class FreeformLayer

setConnectionRouter

public void setConnectionRouter(ConnectionRouter router)
Sets the connection router for this layer. The set router is added to all the child connections of this figure.
Parameters:
router - Connection router of this figure.
Since:
2.0
See Also:
getConnectionRouter()

Draw2D v2.0