public abstract class GFAbstractPointListShape extends GFAbstractShape
This abstract class only adds the point-list and the setter/getter methods for it. It also takes care to reset the bounds and repaint the figure when the point-list changes. But it does not add any details how the Shape is outlined.
Constructor and Description |
---|
GFAbstractPointListShape(IPictogramElementDelegate pictogramElementDelegate,
GraphicsAlgorithm graphicsAlgorithm)
Creates a new GFAbstractPointListShape.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(org.eclipse.draw2d.geometry.Point pt)
Adds the passed point to the point-list.
|
org.eclipse.draw2d.geometry.Point |
getEnd()
Returns the last point in the point-list.
|
org.eclipse.draw2d.geometry.PointList |
getPoints()
Returns the points in this Shape by reference.
|
org.eclipse.draw2d.geometry.Point |
getStart()
Returns the first point in the point-list.
|
void |
insertPoint(org.eclipse.draw2d.geometry.Point pt,
int index)
Inserts a given point at a specified index in the point-list.
|
void |
removeAllPoints()
This method results in a recalculation of the Shapes bounding box.
|
void |
removePoint(int index)
Removes a point at a given index from the point-list.
|
void |
setEnd(org.eclipse.draw2d.geometry.Point end)
Sets the end point of the point-list.
|
void |
setPoint(org.eclipse.draw2d.geometry.Point pt,
int index)
Overwrites the point at
index with the Point pt
. |
void |
setPoints(org.eclipse.draw2d.geometry.PointList points)
Sets the list of points to be used by this Shape by reference.
|
void |
setStart(org.eclipse.draw2d.geometry.Point start)
Sets the start point of the point-list.
|
containsPoint, getHandleBounds, getVisualState, paintFigure, setClickArea, setSelectionBorder, visualStateChanged
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 GFAbstractPointListShape(IPictogramElementDelegate pictogramElementDelegate, GraphicsAlgorithm graphicsAlgorithm)
pictogramElementDelegate
- The PictogramElementDelegate which provides the
GraphicsAlgorithm.graphicsAlgorithm
- The GraphicsAlgorithm which provides the values to paint this
Shape.public final org.eclipse.draw2d.geometry.PointList getPoints()
setPoints(PointList)
. Failure to do so will result in layout and
paint problems.public org.eclipse.draw2d.geometry.Point getStart()
public org.eclipse.draw2d.geometry.Point getEnd()
public void addPoint(org.eclipse.draw2d.geometry.Point pt)
pt
- The Point to be added to the point-list.public void insertPoint(org.eclipse.draw2d.geometry.Point pt, int index)
pt
- The point to be added.index
- the position in the point-list where the point is to be added.public void setPoint(org.eclipse.draw2d.geometry.Point pt, int index)
index
with the Point pt
. If you're going to set multiple Points, use
setPoints(PointList)
. This method results in a recalculation of
the Shapes bounding box.pt
- The point to set.index
- The index, at which to set the point.public void setPoints(org.eclipse.draw2d.geometry.PointList points)
points
- The new PointList used by this Shape.public void setStart(org.eclipse.draw2d.geometry.Point start)
start
- The point that will become the first point in the point-list.public void setEnd(org.eclipse.draw2d.geometry.Point end)
end
- The point that will become the last point in the point-list.public void removePoint(int index)
index
- The position of the point to be removed.public void removeAllPoints()