Class GFPolylineDecoration
- java.lang.Object
-
- org.eclipse.draw2d.Figure
-
- org.eclipse.draw2d.Shape
-
- org.eclipse.graphiti.ui.internal.figures.GFAbstractShape
-
- org.eclipse.graphiti.ui.internal.figures.GFAbstractPointListShape
-
- org.eclipse.graphiti.ui.internal.figures.GFPolyline
-
- org.eclipse.graphiti.ui.internal.figures.GFPolylineDecoration
-
- All Implemented Interfaces:
org.eclipse.draw2d.IFigure
,org.eclipse.draw2d.RotatableDecoration
,org.eclipse.gef.handles.HandleBounds
,IVisualStateChangeListener
,IVisualStateHolder
public class GFPolylineDecoration extends GFPolyline implements org.eclipse.draw2d.RotatableDecoration
A Graphiti Polyline Rotatable Decoration.Idea: a decorator-template defines the form of the shape. Whenever the decorator-location or decorator-reference-point is set, the decorator-template is translated/rotated depending on them. This transformed decorator-template is then set as the points of this Polyline. Afterwards the real functionality comes from the super-class GFPolyline.
-
-
Constructor Summary
Constructors Constructor Description GFPolylineDecoration(IPictogramElementDelegate pictogramElementDelegate, GraphicsAlgorithm graphicsAlgorithm)
Creates a new GFPolylineDecoration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.draw2d.geometry.Point
getDecoratorLocation()
Returns the decorator-location.protected org.eclipse.draw2d.geometry.Point
getDecoratorReferencePoint()
Returns the decorator-reference-point.protected org.eclipse.draw2d.geometry.PointList
getDecoratorTemplate()
Returns the decorator-template by reference.protected void
processRotatableDecorationValues()
After the decorator-location or decorator-reference-point changed, the translated/rotated points have to be re-calculated and set.void
setDecoratorTemplate(org.eclipse.draw2d.geometry.PointList points)
Sets the decorator-template which defines the form of the shape.void
setLocation(org.eclipse.draw2d.geometry.Point p)
Sets the decorator-location.void
setReferencePoint(org.eclipse.draw2d.geometry.Point ref)
Sets the decorator-reference-point.-
Methods inherited from class org.eclipse.graphiti.ui.internal.figures.GFPolyline
containsPointInFigure, createPath, fillShape, getAdjustedPointList, getAdjustedPointListWithoutZoom, getBezierPoints, getBounds, getGeneralBezierDistance, getSpecificBezierDistances, primTranslate, setGeneralBezierDistance, setLineWidth, setMinimumSelectionLineWidth, setSpecificBezierDistances, setSuppressFilling
-
Methods inherited from class org.eclipse.graphiti.ui.internal.figures.GFAbstractPointListShape
addPoint, getEnd, getPoints, getStart, insertPoint, removeAllPoints, removePoint, setEnd, setPoint, setPoints, setStart
-
Methods inherited from class org.eclipse.graphiti.ui.internal.figures.GFAbstractShape
containsPoint, containsPointInArea, fillPath, getClickArea, getConfigurationProvider, getGraphicsAlgorithm, getHandleBounds, getLineWidth, getPictogramElementDelegate, getPreferences, getSelectionBorder, getVisualState, getZoomLevel, outlineShape, paintFigure, paintShape, setClickArea, setSelectionBorder, transformToFillBounds, visualStateChanged
-
Methods inherited from class org.eclipse.draw2d.Shape
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidthFloat, setOutline, setOutlineXOR, setXOR
-
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, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, 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, 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, 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, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
-
-
-
-
Constructor Detail
-
GFPolylineDecoration
public GFPolylineDecoration(IPictogramElementDelegate pictogramElementDelegate, GraphicsAlgorithm graphicsAlgorithm)
Creates a new GFPolylineDecoration.- Parameters:
pictogramElementDelegate
- The PictogramElementDelegate which provides the GraphicsAlgorithm.graphicsAlgorithm
- The GraphicsAlgorithm which provides the values to paint this Shape.
-
-
Method Detail
-
setDecoratorTemplate
public void setDecoratorTemplate(org.eclipse.draw2d.geometry.PointList points)
Sets the decorator-template which defines the form of the shape.- Parameters:
pointList
- The points to set as template.
-
setLocation
public void setLocation(org.eclipse.draw2d.geometry.Point p)
Sets the decorator-location.- Specified by:
setLocation
in interfaceorg.eclipse.draw2d.IFigure
- Specified by:
setLocation
in interfaceorg.eclipse.draw2d.RotatableDecoration
- Overrides:
setLocation
in classorg.eclipse.draw2d.Figure
- Parameters:
p
- The decorator-location to set.- See Also:
getDecoratorLocation()
-
setReferencePoint
public void setReferencePoint(org.eclipse.draw2d.geometry.Point ref)
Sets the decorator-reference-point.- Specified by:
setReferencePoint
in interfaceorg.eclipse.draw2d.RotatableDecoration
- Parameters:
ref
- The decorator-reference-point to set.- See Also:
getDecoratorReferencePoint()
-
processRotatableDecorationValues
protected void processRotatableDecorationValues()
After the decorator-location or decorator-reference-point changed, the translated/rotated points have to be re-calculated and set.
-
getDecoratorLocation
protected final org.eclipse.draw2d.geometry.Point getDecoratorLocation()
Returns the decorator-location. The decorator-location is the start-point of the connection. This means that at this point the decorator and the figure shall touch.- Returns:
- The decorator-location.
- See Also:
setLocation(Point)
-
getDecoratorReferencePoint
protected final org.eclipse.draw2d.geometry.Point getDecoratorReferencePoint()
Returns the decorator-reference-point. The decorator-reference-point is the end-point of the connection.- Returns:
- The decorator-reference-point.
- See Also:
setReferencePoint(Point)
-
getDecoratorTemplate
protected final org.eclipse.draw2d.geometry.PointList getDecoratorTemplate()
Returns the decorator-template by reference. It must not be changed, usesetDecoratorTemplate(PointList)
instead. The decorator-template defines the form of this Shape.- Returns:
- The decorator-template.
- See Also:
setDecoratorTemplate(PointList)
-
-