Package org.eclipse.draw2d
Class LayeredPane
java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.draw2d.Layer
org.eclipse.draw2d.LayeredPane
- All Implemented Interfaces:
IFigure
- Direct Known Subclasses:
FreeformLayeredPane,ScalableLayeredPane
A figure capable of holding any number of layers. Only layers can be added to
this figure. Layers are added to this figure with thier respective keys,
which are used to identify them.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator, Figure.IdentitySearch, Figure.ReverseFigureChildrenIteratorNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
IFigure.NoInsets -
Field Summary
Fields inherited from class org.eclipse.draw2d.Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipFields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given layer figure, identifiable with the given key, at the specified index.voidaddLayerAfter(Layer layer, Object key, Object after) Adds the given layer, identifiable with the given key, under the after layer provided in the input.voidaddLayerBefore(Layer layer, Object key, Object before) Adds the given layer, identifiable with the given key, above the before layer provided in the input.protected LayergetLayer(int index) Returns the layer at the specified index in this pane.Returns the layer identified by the key given in the input.voidRemoves the given child Figure from this Figure's hierarchy and revalidates this Figure.protected voidremoveLayer(int index) Removes the layer at the specified index from the list of layers in this layered pane.voidremoveLayer(Object key) Removes the layer identified by the given key from this layered pane.voidremoveLayer(IFigure layer) Deprecated.Methods inherited from class org.eclipse.draw2d.Layer
containsPoint, findFigureAtMethods inherited from class org.eclipse.draw2d.Figure
add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, 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, handleMouseWheelScrolled, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, optimizeClip, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
-
Constructor Details
-
LayeredPane
public LayeredPane()Constructs a new layered pane with no layers in it.
-
-
Method Details
-
add
Adds the given layer figure, identifiable with the given key, at the specified index. While adding the layer, it informs the surrounding layers of the addition. -
addLayerAfter
Adds the given layer, identifiable with the given key, under the after layer provided in the input.- Parameters:
layer- the layerkey- the layer's keyafter- the layer under which the input layer should be added- Since:
- 2.0
-
addLayerBefore
Adds the given layer, identifiable with the given key, above the before layer provided in the input.- Parameters:
layer- the layerkey- the layer's keybefore- the layer above which the input layer should be added- Since:
- 2.0
-
getLayer
Returns the layer identified by the key given in the input.- Parameters:
key- the key to identify the desired layer- Returns:
- the desired layer
- Since:
- 2.0
-
getLayer
Returns the layer at the specified index in this pane.- Parameters:
index- the index of the desired layer- Returns:
- the desired layer
- Since:
- 2.0
-
remove
Description copied from class:FigureRemoves the given child Figure from this Figure's hierarchy and revalidates this Figure. The child Figure'sFigure.removeNotify()method is also called. -
removeLayer
Removes the layer identified by the given key from this layered pane.- Parameters:
key- the key of the layer to be removed- Since:
- 2.0
-
removeLayer
Deprecated.callIFigure.remove(IFigure)insteadRemoves the given layer from this layered pane.- Parameters:
layer- the layer to be removed- Since:
- 2.0
-
removeLayer
protected void removeLayer(int index) Removes the layer at the specified index from the list of layers in this layered pane. It collapses the layers, occupying the space vacated by the removed layer.- Parameters:
index- the index of the layer to be removed- Since:
- 2.0
-
IFigure.remove(IFigure)instead