Package org.eclipse.draw2d
Class AbstractPointListShape
java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.draw2d.Shape
org.eclipse.draw2d.AbstractPointListShape
- All Implemented Interfaces:
- IFigure
- Direct Known Subclasses:
- PolygonShape,- Polyline,- PolylineShape,- ScalablePolygonShape
Base superclass for all polylines/polygons
- Since:
- 3.5
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.draw2d.FigureFigure.FigureIterator, Figure.IdentitySearch, Figure.ReverseFigureChildrenIteratorNested classes/interfaces inherited from interface org.eclipse.draw2d.IFigureIFigure.NoInsets
- 
Field SummaryFields inherited from class org.eclipse.draw2d.FigurebgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTipFields inherited from interface org.eclipse.draw2d.IFigureMAX_DIMENSION, MIN_DIMENSION, NO_INSETS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the passed point to this figure.protected booleanchildrenContainsPoint(int x, int y) Returnstrueif the point(x, y)is contained within one of the child figures.booleancontainsPoint(int x, int y) Returnstrueif the point(x, y)is contained within this IFigure's bounds.getEnd()Returns the last point in this Figure.Returns the points in this figure by reference.getStart()voidinsertPoint(Point pt, int index) Inserts a given point at a specified index in this figure.voidErases this figure and removes all of itsPoints.voidremovePoint(int index) Removes a point from this figure.voidSets the end point of this figurevoidsetEndpoints(Point start, Point end) Sets the points at both extremes of this figurevoidSets the point atindexto the Pointpt.voidSets the list of points to be used by this figure.voidSets the start point of this figureprotected abstract booleanshapeContainsPoint(int x, int y) Returnstrueif the point(x, y)is contained within this figure.Methods inherited from class org.eclipse.draw2d.ShapefillShape, getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, outlineShape, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidth, setLineWidthFloat, setOutline, setOutlineXOR, setXORMethods inherited from class org.eclipse.draw2d.Figureadd, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, 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, handleMouseWheelScrolled, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, optimizeClip, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
- 
Constructor Details- 
AbstractPointListShapepublic AbstractPointListShape()
 
- 
- 
Method Details- 
containsPointpublic boolean containsPoint(int x, int y) Description copied from interface:IFigureReturnstrueif the point(x, y)is contained within this IFigure's bounds.- Specified by:
- containsPointin interface- IFigure
- Overrides:
- containsPointin class- Figure
- Parameters:
- x- The X coordinate
- y- The Y coordinate
- Returns:
- trueif the point (x,y) is contained in this IFigure's bounds
- See Also:
 
- 
childrenContainsPointprotected boolean childrenContainsPoint(int x, int y) Returnstrueif the point(x, y)is contained within one of the child figures.- Parameters:
- x- The X coordinate
- y- The Y coordinate
- Returns:
- trueif the point (x,y) is contained in one of the child figures
 
- 
shapeContainsPointprotected abstract boolean shapeContainsPoint(int x, int y) Returnstrueif the point(x, y)is contained within this figure.- Parameters:
- x- The X coordinate
- y- The Y coordinate
- Returns:
- trueif the point (x,y) is contained in this figure
 
- 
addPointAdds the passed point to this figure.- Parameters:
- pt- the Point to be added to this figure
 
- 
getStart- Returns:
- the first point in this figure
 
- 
getEndReturns the last point in this Figure.- Returns:
- the last point
 
- 
getPointsReturns the points in this figure by reference. If the returned list is modified, this figure must be informed by callingsetPoints(PointList). Failure to do so will result in layout and paint problems.- Returns:
- this Polyline's points
 
- 
insertPointInserts a given point at a specified index in this figure.- Parameters:
- pt- the point to be added
- index- the position in this figure where the point is to be added
 
- 
removeAllPointspublic void removeAllPoints()Erases this figure and removes all of itsPoints.
- 
removePointpublic void removePoint(int index) Removes a point from this figure.- Parameters:
- index- the position of the point to be removed
 
- 
setStartSets the start point of this figure- Parameters:
- start- the point that will become the first point in this figure
 
- 
setEndSets the end point of this figure- Parameters:
- end- the point that will become the last point in this figure
 
- 
setEndpointsSets the points at both extremes of this figure- Parameters:
- start- the point to become the first point in this figure
- end- the point to become the last point in this figure
 
- 
setPointSets the point atindexto the Pointpt. If you're going to set multiple Points, usesetPoints(PointList).- Parameters:
- pt- the point
- index- the index
 
- 
setPointsSets the list of points to be used by this figure. Removes any previously existing points. This figure will hold onto the given list by reference.- Parameters:
- points- new set of points
 
 
-