|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.awt.ShapeDecorator
public class ShapeDecorator
The ShapeDecorator class : in charge of drawing repeatedly several stored decorations along a path (a polyline or a complex shape)
Field Summary | |
---|---|
static double |
FLATNESS
The flatness used for Shape.getPathIterator() |
Constructor Summary | |
---|---|
ShapeDecorator()
Default constructor |
Method Summary | |
---|---|
void |
addDecoration(ShapeDecoration decoration)
Adds a Decoration at the end of the list. |
void |
draw(java.awt.Graphics g,
float[] xcoords,
float[] ycoords)
Draws a decorated polyline |
void |
draw(java.awt.Graphics g,
int[] xcoords,
int[] ycoords)
Draws a decorated polyline |
protected void |
draw(java.awt.Graphics g,
java.util.LinkedList<java.awt.geom.Point2D> points)
Draws a decorated polyline Calls ShapeDecoration.draw(...) for each decoration on an subsetted polyline with the same length than the decoration, cycling until all the path is consumed. |
void |
draw(java.awt.Graphics g,
java.awt.geom.Point2D[] points)
Draws a decorated polyline |
void |
draw(java.awt.Graphics g,
java.awt.Shape s)
Draws a decorated shape |
java.util.List<ShapeDecoration> |
getDecorations()
Returns the decorations. |
void |
insertDecoration(int index,
ShapeDecoration decoration)
Inserts a Decoration. |
ShapeDecoration |
removeDecoration(int index)
Removes a Decoration. |
boolean |
removeDecoration(ShapeDecoration decoration)
Removes a Decoration. |
void |
revert()
Reverts all the decorations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double FLATNESS
Constructor Detail |
---|
public ShapeDecorator()
Method Detail |
---|
public java.util.List<ShapeDecoration> getDecorations()
public void insertDecoration(int index, ShapeDecoration decoration)
index
- the index where to insert the new decorationdecoration
- the new decorationpublic void addDecoration(ShapeDecoration decoration)
decoration
- the new decorationpublic ShapeDecoration removeDecoration(int index)
index
- the index of the Decoration to be removed
public boolean removeDecoration(ShapeDecoration decoration)
decoration
- the decoration to remove
public void revert()
revert
in interface Revertable
Revertable.revert()
public void draw(java.awt.Graphics g, java.awt.Shape s)
g
- the Graphics to uses
- the shape to renderpublic void draw(java.awt.Graphics g, float[] xcoords, float[] ycoords)
g
- the Graphics to usexcoords
- array of x floating coordinatesycoords
- array of y floating coordinatespublic void draw(java.awt.Graphics g, int[] xcoords, int[] ycoords)
g
- the Graphics to usexcoords
- array of x integer coordinatesycoords
- array of y integer coordinatespublic void draw(java.awt.Graphics g, java.awt.geom.Point2D[] points)
g
- the Graphics to usepoints
- array of pointsprotected void draw(java.awt.Graphics g, java.util.LinkedList<java.awt.geom.Point2D> points)
g
- the Graphics to usepoints
- array of points (instances of Point2D)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |