Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d
Class PolygonDecoration

java.lang.Object
  extended by

org.eclipse.draw2d.Figure
      extended by

org.eclipse.draw2d.Shape
          extended by

org.eclipse.draw2d.AbstractPointListShape
              extended by

org.eclipse.draw2d.Polyline
                  extended by

org.eclipse.draw2d.Polygon
                      extended by
org.eclipse.draw2d.PolygonDecoration
All Implemented Interfaces:
IFigure, RotatableDecoration

public class PolygonDecoration
extends Polygon
implements RotatableDecoration

A rotatable, polygon shaped decoration most commonly used for decorating the ends of polylines.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d. Figure
Figure.FigureIterator, Figure.IdentitySearch
 
Nested classes inherited from class org.eclipse.draw2d. IFigure
IFigure.NoInsets
 
Field Summary
static  PointList INVERTED_TRIANGLE_TIP
          Template for a triangle that points to the left when the rotation angle is 0
static  PointList TRIANGLE_TIP
          Template for a triangle that points to the right when the rotation angle is 0
 
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
PolygonDecoration ()
          Constructs a PolygonDecoration.
 
Method Summary
 Color getLocalBackgroundColor ()
          Returns the background Color of this Figure.
  PointList getPoints ()
          Returns the points in the PolygonDecoration as a PointList.
 void setLocation ( Point p)
          Sets the location of this PolygonDecoration.
 void setReferencePoint ( Point ref)
          Sets the rotation of this decoration so that the decoration points toward the given reference point.
 void setRotation (double angle)
          Sets the angle by which rotation is to be done on the PolygonDecoration.
 void setScale (double x, double y)
          Sets the amount of scaling to be done along X and Y axes on the PolygonDecoration's template.
 void setTemplate ( PointList pl)
          Sets the PolygonDecorations point template to the passed PointList.
 
Methods inherited from class org.eclipse.draw2d. Polygon
containsPoint, fillShape, outlineShape, shapeContainsPoint
 
Methods inherited from class org.eclipse.draw2d. Polyline
getBounds, isOpaque, primTranslate, removeAllPoints, repaint, setLineWidth, setPoints, setTolerance
 
Methods inherited from class org.eclipse.draw2d. AbstractPointListShape
addPoint, childrenContainsPoint, getEnd, getStart, insertPoint, removePoint, setEnd, setEndpoints, setPoint, setStart
 
Methods inherited from class org.eclipse.draw2d. Shape
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, paintFigure, 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, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, 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, 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, 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, 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, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, 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, 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
Template for a triangle that points to the right when the rotation angle is 0


INVERTED_TRIANGLE_TIP

public static final 
PointList INVERTED_TRIANGLE_TIP
Template for a triangle that points to the left when the rotation angle is 0

Constructor Detail

PolygonDecoration

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

Since:
2.0
Method Detail

getLocalBackgroundColor

public Color getLocalBackgroundColor()
Description copied from interface: IFigure
Returns the background Color of this Figure. Does not inherit this Color from the parent, may return null.

Specified by:
getLocalBackgroundColor in interface IFigure
Overrides:
getLocalBackgroundColor in class Figure
Returns:
bgColor null or the local background Color
See Also:
IFigure.getBackgroundColor()

getPoints

public 
PointList getPoints()
Returns the points in the PolygonDecoration as a PointList.

Overrides:
getPoints in class AbstractPointListShape
Returns:
the points in this PolygonDecoration
Since:
2.0

setLocation

public void setLocation(
Point p)
Sets the location of this PolygonDecoration.

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

setTemplate

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

Parameters:
pl - the PointList outline to use as the PolygonDecoration's region
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 PolygonDecoration's template.

Parameters:
x - X scaling
y - Y scaling
Since:
2.0

setReferencePoint

public void setReferencePoint(
Point ref)
Sets the rotation of this decoration so that the decoration points toward the given reference point.

Specified by:
setReferencePoint in interface RotatableDecoration
Parameters:
ref - the reference point

setRotation

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

Parameters:
angle - Angle of rotation
Since:
2.0

Eclipse Draw2d
3.3

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire