org.jupe.editors.classdiagram.graphics.nodes.atomics
Class MethodFigure

java.lang.Object
  extended by org.eclipse.draw2d.Figure
      extended by org.eclipse.draw2d.Label
          extended by org.jupe.editors.classdiagram.graphics.nodes.atomics.MethodFigure
All Implemented Interfaces:
org.eclipse.draw2d.IFigure, org.eclipse.draw2d.PositionConstants

public class MethodFigure
extends org.eclipse.draw2d.Label

Figure that represents either an uml2-method

Author:
Steffen Klüpfel

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.PositionConstants
ALWAYS_LEFT, ALWAYS_RIGHT, BOTTOM, CENTER, EAST, EAST_WEST, HORIZONTAL, LEFT, LEFT_CENTER_RIGHT, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_SOUTH, NORTH_WEST, NSEW, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TOP_MIDDLE_BOTTOM, VERTICAL, WEST
 
Fields inherited from interface org.eclipse.draw2d.IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
MethodFigure()
           
 
Method Summary
 void fillMethod(java.lang.String text, java.lang.String visibility)
          Fills a method (that represents a line) with content.
 void highlightProblem(boolean isProblem)
          Highlight a problem within this method.
 void setAbstract(boolean isAbstract)
          Set if a method should be abstract or not.
 void setStatic(boolean isStatic)
          Set if a method is static or not.
 
Methods inherited from class org.eclipse.draw2d.Label
getIcon, getIconAlignment, getIconBounds, getIconTextGap, getMinimumSize, getPreferredSize, getSubStringText, getText, getTextAlignment, getTextBounds, getTextPlacement, invalidate, isTextTruncated, setIcon, setIconAlignment, setIconDimension, setIconTextGap, setLabelAlignment, setText, setTextAlignment, setTextPlacement
 
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, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, 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
 

Constructor Detail

MethodFigure

public MethodFigure()
Method Detail

fillMethod

public void fillMethod(java.lang.String text,
                       java.lang.String visibility)
Fills a method (that represents a line) with content.

Parameters:
text - The text of the line.
visibility - The visibility of this line (symbol will be chosen following the given configuration).

setAbstract

public void setAbstract(boolean isAbstract)
Set if a method should be abstract or not.

Parameters:
isAbstract - True to set the method abstract, false otherwise.

setStatic

public void setStatic(boolean isStatic)
Set if a method is static or not.

Parameters:
isStatic - True to set the method static, false otherwise.

highlightProblem

public void highlightProblem(boolean isProblem)
Highlight a problem within this method. A red line is drawn under the method in order to show the problem.

Parameters:
isProblem - if isProblem is true the red line is drawn.