org.eclipse.gmt.umlx.editor.figures
Class StickyNoteFigure

java.lang.Object
  extended by org.eclipse.draw2d.Figure
      extended by org.eclipse.gmt.umlx.editor.figures.BentCornerFigure
          extended by org.eclipse.gmt.umlx.editor.figures.StickyNoteFigure
All Implemented Interfaces:
org.eclipse.draw2d.IFigure, INodeFigure

public class StickyNoteFigure
extends BentCornerFigure
implements INodeFigure

A Figure with a bent corner and an embedded TextFlow within a FlowPage that contains text.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
org.eclipse.draw2d.Figure.FigureIterator
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
org.eclipse.draw2d.IFigure.NoInsets
 
Field Summary
 
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
StickyNoteFigure()
          Creates a new StickyNoteFigure with a default MarginBorder size of DEFAULT_CORNER_SIZE - 3 and a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
StickyNoteFigure(int borderSize)
          Creates a new StickyNoteFigure with a MarginBorder that is the given size and a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
 
Method Summary
 org.eclipse.draw2d.Label getCoLabel()
           
 org.eclipse.draw2d.Label getLabel()
           
 java.lang.String getText()
          Returns the text inside the TextFlow.
 void setText(java.lang.String newText)
          Sets the text of the TextFlow to the given value.
 
Methods inherited from class org.eclipse.gmt.umlx.editor.figures.BentCornerFigure
getCornerSize, setCornerSize
 
Methods inherited from class org.eclipse.draw2d.Figure
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, 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, paint, remove, removeAll, 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, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
 
Methods inherited from class java.lang.Object
equals, 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, 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

StickyNoteFigure

public StickyNoteFigure()
Creates a new StickyNoteFigure with a default MarginBorder size of DEFAULT_CORNER_SIZE - 3 and a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.


StickyNoteFigure

public StickyNoteFigure(int borderSize)
Creates a new StickyNoteFigure with a MarginBorder that is the given size and a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.

Parameters:
borderSize - the size of the MarginBorder
Method Detail

getCoLabel

public org.eclipse.draw2d.Label getCoLabel()
Specified by:
getCoLabel in interface INodeFigure

getLabel

public org.eclipse.draw2d.Label getLabel()
Specified by:
getLabel in interface INodeFigure

getText

public java.lang.String getText()
Returns the text inside the TextFlow.

Returns:
the text flow inside the text.

setText

public void setText(java.lang.String newText)
Sets the text of the TextFlow to the given value.

Parameters:
newText - the new text value.