public abstract class AbstractShapeDecoration extends java.lang.Object implements ShapeDecoration
LEFT, RIGHT
Constructor and Description |
---|
AbstractShapeDecoration(float length,
float width,
int orientation)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
float |
getLength()
Returns the length.
|
int |
getOrientation()
Returns the orientation.
|
java.awt.Paint |
getPaint()
Returns the paint.
|
java.awt.Stroke |
getStroke()
Returns the stroke.
|
float |
getWidth()
Returns the width.
|
protected void |
restoreGraphics(java.awt.Graphics g)
Restores previous settings to the Graphics.
|
void |
revert()
Reverts the orientation
|
protected void |
setGraphics(java.awt.Graphics g)
Applies stroke and paint to the Graphics, saving previous
settings
|
void |
setLength(float length)
Sets the length.
|
void |
setOrientation(int orientation)
Sets the orientation.
|
void |
setPaint(java.awt.Paint paint)
Sets the paint.
|
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke.
|
void |
setWidth(float width)
Sets the width.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
draw
public AbstractShapeDecoration(float length, float width, int orientation)
length
- width
- orientation
- public float getLength()
getLength
in interface ShapeDecoration
public void setLength(float length)
length
- The length to setpublic float getWidth()
getWidth
in interface ShapeDecoration
public void setWidth(float width)
width
- The width to setpublic int getOrientation()
getOrientation
in interface ShapeDecoration
public void setOrientation(int orientation)
setOrientation
in interface ShapeDecoration
orientation
- The orientation to setpublic void revert()
revert
in interface Revertable
revert
in interface ShapeDecoration
ShapeDecoration.revert()
public java.awt.Paint getPaint()
public java.awt.Stroke getStroke()
public void setPaint(java.awt.Paint paint)
paint
- The paint to setpublic void setStroke(java.awt.Stroke stroke)
stroke
- The stroke to setprotected void setGraphics(java.awt.Graphics g)
g
- protected void restoreGraphics(java.awt.Graphics g)
g
- Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details