Eclipse Draw2d
2.1

org.eclipse.draw2d
Class ConnectionLayer

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--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.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator
 
Nested classes inherited from class org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Field Summary
protected  ConnectionRouter connectionRouter
          The ConnectionRouter used to route all connections on this layer.
 
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 ConnectionRouter being used by this layer.
 void remove(IFigure figure)
          Removes the figure from this Layer.
 void setConnectionRouter(ConnectionRouter router)
          Sets the ConnectionRouter for this layer.
 
Methods inherited from class org.eclipse.draw2d.FreeformLayer
addFreeformListener, fireExtentChanged, fireMoved, getFreeformExtent, primTranslate, removeFreeformListener, setFreeformBounds
 
Methods inherited from class org.eclipse.draw2d.Layer
containsPoint, findFigureAt
 
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, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isEnabled, isFocusTraversable, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, paintFigure, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, 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, 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, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isEnabled, isFocusTraversable, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, 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, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
 

Field Detail

connectionRouter

protected ConnectionRouter connectionRouter
The ConnectionRouter used to route all connections on this layer.

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 ConnectionRouter is set.

Specified by:
add in interface IFigure
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
See Also:
IFigure.add(IFigure, Object, int)

getConnectionRouter

public ConnectionRouter getConnectionRouter()
Returns the ConnectionRouter being used by this layer.

Returns:
ConnectionRouter being used by this layer
Since:
2.0

remove

public void remove(IFigure figure)
Removes the figure from this Layer. If the figure is a Connection, that Connection's ConnectionRouter is set to null.

Specified by:
remove in interface IFigure
Overrides:
remove in class FreeformLayer
Parameters:
figure - The figure to remove
See Also:
IFigure.remove(IFigure)

setConnectionRouter

public void setConnectionRouter(ConnectionRouter router)
Sets the ConnectionRouter for this layer. This router is set as the ConnectionRouter for all the child connections of this Layer.

Parameters:
router - The ConnectionRouter to set for this Layer
Since:
2.0

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.