Package 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
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/interfaces inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator, Figure.IdentitySearch, Figure.ReverseFigureChildrenIterator
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
IFigure.NoInsets
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given figure with the given contraint at the given index.Returns the ConnectionRouter being used by this layer.void
Paints this Figure and its children.void
Removes the figure from this Layer.void
setAntialias
(int antialias) Sets whether antialiasing should be enabled for the connection 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, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, getLocalBackgroundColor, getLocalFont, 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, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, optimizeClip, paintBorder, paintChildren, paintClientArea, paintFigure, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, 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, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, 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, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setClippingStrategy, 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 Details
-
connectionRouter
The ConnectionRouter used to route all connections on this layer.
-
-
Constructor Details
-
ConnectionLayer
public ConnectionLayer()
-
-
Method Details
-
add
Adds the given figure with the given contraint at the given index. If the figure is aConnection
, itsConnectionRouter
is set.- Specified by:
add
in interfaceIFigure
- Overrides:
add
in classFreeformLayer
- Parameters:
figure
- Figure being addedconstraint
- Constraint of the figure being addedindex
- Index where the figure is to be added- Since:
- 2.0
- See Also:
-
getConnectionRouter
Returns the ConnectionRouter being used by this layer.- Returns:
- ConnectionRouter being used by this layer
- Since:
- 2.0
-
paint
Description copied from class:Figure
Paints this Figure and its children. -
remove
Removes the figure from this Layer. If the figure is aConnection
, that Connection'sConnectionRouter
is set tonull
.- Specified by:
remove
in interfaceIFigure
- Overrides:
remove
in classFreeformLayer
- Parameters:
figure
- The figure to remove- See Also:
-
setConnectionRouter
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
-
setAntialias
public void setAntialias(int antialias) Sets whether antialiasing should be enabled for the connection layer. If this value is set to something other thanSWT.DEFAULT
,Graphics.setAntialias(int)
will be called with the given value when painting this layer.- Parameters:
antialias
- the antialias setting- Since:
- 3.1
-