Runtime

## org.eclipse.gmf.runtime.diagram.ui.figures
Class NoteFigure

    java.lang.Object
      org.eclipse.draw2d.Figure
          org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
              org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure
                  org.eclipse.gmf.runtime.diagram.ui.figures.NoteFigure

All Implemented Interfaces:
  HandleBounds, IAnchorableFigure, IFigure

public class NoteFigure
extends DefaultSizeNodeFigure

a figure represents the Note view, this figure had a mode called DiagramLinkMode, if this mode is turned ON then the text alignment will be center instead of left and the border will be rectangle instead of the note border shape, also it will not paint the border

See Also:
  `NoteFigure.setDiagramLinkMode(boolean)`

Nested Class Summary

Nested classes inherited from class org.eclipse.draw2d.Figure
`Figure.FigureIterator, Figure.IdentitySearch`

Nested classes inherited from class org.eclipse.draw2d.IFigure
`IFigure.NoInsets`

Field Summary
`static int` `CLIP_HEIGHT_DP` the clip height constant in device coordinates
`static int` `CLIP_MARGIN_DP` the clip margin constant in device coordinates
`static int` `MARGIN_DP` the margin constant in device coordinates

Fields inherited from class org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
`szAnchor`

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
`NoteFigure(int width, int height, Insets insets)` Constructor

Method Summary
`protected PointList` `getPointList(Rectangle r)` Method getPointList.
`Dimension` `getPreferredSize(int wHint, int hHint)`
`boolean` `isDiagramLinkMode()`
`protected void` `paintBorder(Graphics g)`
`protected void` `paintFigure(Graphics g)`
`boolean` `setDiagramLinkMode(boolean diagramLinkMode)` sets or resets the diagram link mode, in diagram link mode the note will not paint a border or background for itself

Methods inherited from class org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure
`getDefaultSize, setDefaultSize, setDefaultSize`

Methods inherited from class org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
`createAnchor, createConnectionAnchor, createDefaultAnchor, getConnectionAnchor, getConnectionAnchors, getConnectionAnchorTerminal, getDefaultAnchorID, getHandleBounds, getSlidableAnchorArea, getSourceConnectionAnchorAt, getTargetConnectionAnchorAt, isDefaultAnchorArea`

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, paintChildren, paintClientArea, 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`

Field Detail

### CLIP_HEIGHT_DP

    public static final int CLIP_HEIGHT_DP

  the clip height constant in device coordinates

  See Also:
    Constant Field Values

### MARGIN_DP

    public static final int MARGIN_DP

  the margin constant in device coordinates

  See Also:
    Constant Field Values

### CLIP_MARGIN_DP

    public static final int CLIP_MARGIN_DP

  the clip margin constant in device coordinates

  See Also:
    Constant Field Values

Constructor Detail

### NoteFigure

    public NoteFigure(int width,
                      int height,
                      Insets insets)

  Constructor

Parameters:
  `width` - `int` value that is the default width in logical units
  `height` - `int` value that is the default height in logical units
  `insets` - `Insets` that is the empty margin inside the note figure in logical units

Method Detail

### getPointList

    protected PointList getPointList(Rectangle r)

  Method getPointList.

  Parameters:
    `r` -
  Returns:
    PointList

### paintBorder

    protected void paintBorder(Graphics g)

### paintFigure

    protected void paintFigure(Graphics g)

  Overrides:
    `paintFigure` in class `NodeFigure`

### getPreferredSize

    public Dimension getPreferredSize(int wHint,
                                      int hHint)

  Specified by:
    `getPreferredSize` in interface `IFigure`
  Overrides:
    `getPreferredSize` in class `DefaultSizeNodeFigure`
  See Also:
    `IFigure.getPreferredSize(int, int)`

### setDiagramLinkMode

    public boolean setDiagramLinkMode(boolean diagramLinkMode)

  sets or resets the diagram link mode, in diagram link mode the note will not paint a border or background for itself

  Parameters:
    `diagramLinkMode` - , the new diagram link mode state
  Returns:
    the old diagram Link mode state

### isDiagramLinkMode

    public boolean isDiagramLinkMode()

  Returns:
    true is in diagram Link mode, otherwise false

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.