Eclipse Draw2d
2.1

org.eclipse.draw2d
Class PolylineDecoration

java.lang.Object
  |
  +--org.eclipse.draw2d.Figure
        |
        +--org.eclipse.draw2d.Shape
              |
              +--org.eclipse.draw2d.Polyline
                    |
                    +--org.eclipse.draw2d.PolylineDecoration
All Implemented Interfaces:
IFigure, RotatableDecoration

public class PolylineDecoration
extends Polyline
implements RotatableDecoration

A decorative Figure intended to be placed on a Polyline. It has the default shape of right-pointing triangle.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d.Figure
Figure.FigureIterator
 
Nested classes inherited from class org.eclipse.draw2d.IFigure
IFigure.NoInsets
 
Field Summary
static PointList TRIANGLE_TIP
          A triangle template
 
Fields inherited from class org.eclipse.draw2d.Shape
lineStyle, lineWidth
 
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
PolylineDecoration()
          Constructs a PolylineDecoration.
 
Method Summary
 PointList getPoints()
          Returns the points in this Polyline by reference.
 void setLocation(Point p)
          Sets the location of this figure.
 void setReferencePoint(Point ref)
          Sets the reference point used to determine the rotation angle.
 void setRotation(double angle)
          Sets the angle by which rotation is to be done on the PolylineDecoration.
 void setScale(double x, double y)
          Sets the amount of scaling to be done along X and Y axes on the PolylineDecoration's template.
 void setTemplate(PointList pl)
          Sets the PolylineDecoration's point template.
 
Methods inherited from class org.eclipse.draw2d.Polyline
addPoint, containsPoint, fillShape, getBounds, getEnd, getStart, insertPoint, isOpaque, outlineShape, primTranslate, removeAllPoints, removePoint, setEnd, setEndpoints, setLineWidth, setPoint, setPoints, setStart, useLocalCoordinates
 
Methods inherited from class org.eclipse.draw2d.Shape
getLineStyle, getLineWidth, paintFigure, setFill, setFillXOR, setLineStyle, setOutline, setOutlineXOR, setXOR
 
Methods inherited from class org.eclipse.draw2d.Figure
add, add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, 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, isEnabled, isFocusTraversable, isMouseEventTarget, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, 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, 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, addFigureListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, 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, isEnabled, isFocusTraversable, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
 

Field Detail

TRIANGLE_TIP

public static final PointList TRIANGLE_TIP
A triangle template

Constructor Detail

PolylineDecoration

public PolylineDecoration()
Constructs a PolylineDecoration. Defaults the PolylineDecoration to fill its region with black.

Since:
2.0
Method Detail

getPoints

public PointList getPoints()
Description copied from class: Polyline
Returns the points in this Polyline by reference. If the returned list is modified, this Polyline must be informed by calling Polyline.setPoints(PointList). Failure to do so will result in layout and paint problems.

Overrides:
getPoints in class Polyline
Returns:
this Polyline's points
See Also:
Polyline.getPoints()

setLocation

public void setLocation(Point p)
Description copied from interface: RotatableDecoration
Sets the location of this figure.

Specified by:
setLocation in interface RotatableDecoration
Overrides:
setLocation in class Figure
Parameters:
p - The location
See Also:
IFigure.setLocation(Point)

setTemplate

public void setTemplate(PointList pl)
Sets the PolylineDecoration's point template. This template is an outline of the PolylineDecoration's region. (The default value is TRIANGLE_TIP which is a triangle whose tip is pointing to the right).

Parameters:
pl - the template
Since:
2.0

setScale

public void setScale(double x,
                     double y)
Sets the amount of scaling to be done along X and Y axes on the PolylineDecoration's template.

Parameters:
x - the x scale
y - the y scale
Since:
2.0

setReferencePoint

public void setReferencePoint(Point ref)
Description copied from interface: RotatableDecoration
Sets the reference point used to determine the rotation angle.

Specified by:
setReferencePoint in interface RotatableDecoration
Parameters:
ref - The reference point
See Also:
RotatableDecoration.setReferencePoint(Point)

setRotation

public void setRotation(double angle)
Sets the angle by which rotation is to be done on the PolylineDecoration.

Parameters:
angle - the angle of rotation
Since:
2.0

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.