public abstract class GFAbstractShape extends org.eclipse.draw2d.Shape implements org.eclipse.gef.handles.HandleBounds, IVisualStateHolder, IVisualStateChangeListener
createPath(Rectangle, Graphics, boolean)
Constructor and Description |
---|
GFAbstractShape(IPictogramElementDelegate pictogramElementDelegate,
GraphicsAlgorithm graphicsAlgorithm)
Creates a new GFAbstractShape.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsPoint(int x,
int y)
Returns true, if the given point is contained inside this Shape.
|
org.eclipse.draw2d.geometry.Rectangle |
getHandleBounds()
Returns the selection handle bounds of this Shape.
|
IVisualState |
getVisualState()
Returns the visual state of this shape.
|
void |
paintFigure(org.eclipse.draw2d.Graphics graphics)
First initializes the given Graphics with settings like alpha-value,
antialias-value, ...
|
void |
setClickArea(GraphicsAlgorithm[] clickArea) |
void |
setSelectionBorder(GraphicsAlgorithm selectionBorder) |
void |
visualStateChanged(VisualStateChangedEvent e)
Is called after the visual state changed.
|
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidth, setLineWidthFloat, setOutline, setOutlineXOR, setXOR
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, 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, setClippingStrategy, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, 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
public GFAbstractShape(IPictogramElementDelegate pictogramElementDelegate, GraphicsAlgorithm graphicsAlgorithm)
pictogramElementDelegate
- The PictogramElementDelegate which provides the
GraphicsAlgorithm.graphicsAlgorithm
- The GraphicsAlgorithm which provides the values to paint this
Shape. It is either the immediate GraphicsAlgorithm of the
PictogramElementDelegate or a child of that immediate
GraphicsAlgorithm. It must not be null.public void paintFigure(org.eclipse.draw2d.Graphics graphics)
super.paintFigure(graphics)
to continue with the default
painting mechanisms.paintFigure
in class org.eclipse.draw2d.Shape
graphics
- The Graphics on which to paint.public final boolean containsPoint(int x, int y)
containsPointInArea(int, int)
to check if there is a
special selection-area defined for this Shape. If not, it returns
containsPointInFigure(int, int)
.
This method is final. Override containsPointInFigure(int, int)
if needed.
containsPoint
in interface org.eclipse.draw2d.IFigure
containsPoint
in class org.eclipse.draw2d.Figure
x
- The x-coordinate of the point to check.y
- The y-coordinate of the point to check.public org.eclipse.draw2d.geometry.Rectangle getHandleBounds()
getSelectionBorder()
. Otherwise it just returns the bounds of
this Shape.getHandleBounds
in interface org.eclipse.gef.handles.HandleBounds
public IVisualState getVisualState()
getVisualState
in interface IVisualStateHolder
public void visualStateChanged(VisualStateChangedEvent e)
visualStateChanged
in interface IVisualStateChangeListener
public void setSelectionBorder(GraphicsAlgorithm selectionBorder)
selectionBorder
- the selectionBorder to setpublic void setClickArea(GraphicsAlgorithm[] clickArea)
clickArea
- the clickArea to set