de.cau.cs.kieler.core.model.gmf.figures
Class RoundedRectangleFigure

java.lang.Object
  extended by org.eclipse.draw2d.Figure
      extended by org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
          extended by de.cau.cs.kieler.core.model.gmf.figures.RoundedRectangleFigure
All Implemented Interfaces:
IRoundedRectangleAnchorableFigure, IFigure, HandleBounds, IAnchorableFigure, IPolygonAnchorableFigure

public class RoundedRectangleFigure
extends NodeFigure
implements IRoundedRectangleAnchorableFigure

A 2D figure which provides anchoring on the outline of a rounded rectangle.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator, Figure.IdentitySearch
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Field Summary
 
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
RoundedRectangleFigure()
          Constructs a RoundedRectangleFigure.
 
Method Summary
protected  ConnectionAnchor createAnchor(PrecisionPoint p)
          
protected  ConnectionAnchor createDefaultAnchor()
          
 Dimension getCornerDimensions()
          Returns the rounded rectangles corner dimensions.
 Rectangle getRoundedRectangleBounds()
          Returns the rounded rectangles bounds.
protected  void paintFigure(Graphics g)
          
 void setCornerDimensions(Dimension d)
          Sets the dimensions of each corner.
 
Methods inherited from class org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
applyTransparency, createConnectionAnchor, fillGradient, fillGradient, fillGradient, fillGradient, getConnectionAnchor, getConnectionAnchors, getConnectionAnchorTerminal, getDefaultAnchorID, getGradientColor1, getGradientColor2, getGradientStyle, getHandleBounds, getLineStyle, getLineWidth, getPath, getPolygonPoints, getSlidableAnchorArea, getSourceConnectionAnchorAt, getTargetConnectionAnchorAt, getTransparency, isDefaultAnchorArea, isUsingGradient, setGradientData, setIsUsingGradient, setLineStyle, setLineWidth, setTransparency
 
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, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, 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, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, 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, setClippingStrategy, 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, getClippingStrategy, 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, setClippingStrategy, 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

RoundedRectangleFigure

public RoundedRectangleFigure()
Constructs a RoundedRectangleFigure.

Method Detail

paintFigure

protected void paintFigure(Graphics g)

Overrides:
paintFigure in class NodeFigure

createAnchor

protected ConnectionAnchor createAnchor(PrecisionPoint p)

Overrides:
createAnchor in class NodeFigure

createDefaultAnchor

protected ConnectionAnchor createDefaultAnchor()

Overrides:
createDefaultAnchor in class NodeFigure

setCornerDimensions

public void setCornerDimensions(Dimension d)
Sets the dimensions of each corner. This will form the radii of the arcs which form the corners.

Parameters:
d - the dimensions of the corner

getRoundedRectangleBounds

public Rectangle getRoundedRectangleBounds()
Returns the rounded rectangles bounds.

Specified by:
getRoundedRectangleBounds in interface IRoundedRectangleAnchorableFigure
Returns:
the bounds

getCornerDimensions

public Dimension getCornerDimensions()
Returns the rounded rectangles corner dimensions.

Specified by:
getCornerDimensions in interface IRoundedRectangleAnchorableFigure
Returns:
the corner dimensions