Modelers

org.topcased.draw2d.figures
Class PackageFigure

java.lang.Object
  extended by org.eclipse.draw2d.Figure
      extended by org.topcased.draw2d.figures.PackageFigure
All Implemented Interfaces:
org.eclipse.draw2d.IFigure, IContainerFigure, ILabelFigure

public class PackageFigure
extends org.eclipse.draw2d.Figure
implements IContainerFigure, ILabelFigure

A Figure that will represent a Package. The header is an EditableLabel aligned to the left, the contentPane is an XYLayout Created 21 June 2005


Nested Class Summary
static class PackageFigure.PackageHeaderFigureBorder
          A Border at the left, top and right of the label
 
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.IFigure.NoInsets
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.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, toolTip
 
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
PackageFigure()
          Constructor
 
Method Summary
protected  org.eclipse.draw2d.IFigure createContainer()
          Creates the container figure
protected  org.eclipse.draw2d.IFigure createHeader()
          Deprecated. use createLabel instead
protected  ILabel createLabel()
          Create the edited label
protected  void drawFigure()
          Initialize ToolbarLayout and its children Figures Suclasses may overrides this to provides their own background figure.
 org.eclipse.draw2d.IFigure getContentPane()
          Return the contentPane figure
 org.eclipse.draw2d.IFigure getHeader()
          Deprecated. use getLabel() instead
 ILabel getLabel()
           
 org.eclipse.draw2d.geometry.Dimension getPreferredSize(int wHint, int hHint)
           
protected  void setContentPane(org.eclipse.draw2d.IFigure c)
          Set the container.
protected  void setLabel(ILabel l)
          Set the label.
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, 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, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, 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, 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, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, 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, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, 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
 
Methods inherited from interface org.eclipse.draw2d.IFigure
add, 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, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, 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, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, 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
 

Constructor Detail

PackageFigure

public PackageFigure()
Constructor

Method Detail

drawFigure

protected void drawFigure()
Initialize ToolbarLayout and its children Figures Suclasses may overrides this to provides their own background figure.


createHeader

protected org.eclipse.draw2d.IFigure createHeader()
Deprecated. use createLabel instead

Create the edited label

Returns:
the edited label

createLabel

protected ILabel createLabel()
Create the edited label

Returns:
the edited label

setLabel

protected void setLabel(ILabel l)
Set the label. This function will only be used by extending classes.

Parameters:
l - the new label figure

createContainer

protected org.eclipse.draw2d.IFigure createContainer()
Creates the container figure

Returns:
the container figure

setContentPane

protected void setContentPane(org.eclipse.draw2d.IFigure c)
Set the container. This function will only be used by extending classes.

Parameters:
c - the new container figure

getHeader

public org.eclipse.draw2d.IFigure getHeader()
Deprecated. use getLabel() instead

Return the Header figure

Returns:
returns the figure used to edit the name

getLabel

public ILabel getLabel()
Specified by:
getLabel in interface ILabelFigure
Returns:
the Label Figure
See Also:
ILabelFigure.getLabel()

getContentPane

public org.eclipse.draw2d.IFigure getContentPane()
Return the contentPane figure

Specified by:
getContentPane in interface IContainerFigure
Returns:
the Container Figure

getPreferredSize

public org.eclipse.draw2d.geometry.Dimension getPreferredSize(int wHint,
                                                              int hHint)
Specified by:
getPreferredSize in interface org.eclipse.draw2d.IFigure
Overrides:
getPreferredSize in class org.eclipse.draw2d.Figure
See Also:
Figure.getPreferredSize(int, int)

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.