Draw2D v2.0

org.eclipse.draw2d.parts
Class Dock

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--org.eclipse.draw2d.parts.Dock
All Implemented Interfaces:
IFigure

public final class Dock
extends Figure

Hideable, dock-like Figure. This Figure is meant to "dock" itself inside a larger Figure. The Dock will hide/show its contents upon a mouse click. Typical application is an "overview" window, in which the Dock's contents are a Figure's entire contents displayed much smaller than their actual size. This effect can be acheived with the use of a ScrollableThumbnail as the Dock's overview in the constructor Dock(IFigure port, IFigure overview).


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.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
Dock()
           
Dock(IFigure port, IFigure overview)
           
 
Method Summary
 boolean containsPoint(int x, int y)
          Returns true if the point (x, y) is contained within this IFigures bounds.
 IFigure findMouseEventTargetAt(int x, int y)
          Returns the figure located at the given location which will accept mouse events.
 IFigure getHost()
           
 Dimension getPreferredSize()
          Returns the desireable size for this figure.
 void setContents(IFigure fig)
           
 void setHost(IFigure port)
           
 void setTitle(String title)
           
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAtExcluding, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocation, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, 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, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, 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
 

Constructor Detail

Dock

public Dock()

Dock

public Dock(IFigure port,
            IFigure overview)
Method Detail

containsPoint

public boolean containsPoint(int x,
                             int y)
Description copied from interface: IFigure
Returns true if the point (x, y) is contained within this IFigures bounds.
Overrides:
containsPoint in class Figure

findMouseEventTargetAt

public IFigure findMouseEventTargetAt(int x,
                                      int y)
Description copied from interface: IFigure
Returns the figure located at the given location which will accept mouse events.
Overrides:
findMouseEventTargetAt in class Figure

getHost

public IFigure getHost()

getPreferredSize

public Dimension getPreferredSize()
Description copied from interface: IFigure
Returns the desireable size for this figure. The returned value should not be modified.
Overrides:
getPreferredSize in class Figure

setContents

public void setContents(IFigure fig)

setTitle

public void setTitle(String title)

setHost

public void setHost(IFigure port)

Draw2D v2.0