|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimtools.shapes.AbstractShape
simtools.shapes.BasicShape
public class BasicShape
A class to draw basic shapes such as rectangle, ellipse, arc and round rectangle The drawing includes the definition of the color for both the bounds and the filling
Nested Class Summary |
---|
Nested classes/interfaces inherited from class simtools.shapes.AbstractShape |
---|
AbstractShape.AbstractShapePropertiesNames |
Field Summary | |
---|---|
protected java.awt.Color |
_bColor
|
protected java.awt.Color |
_fColor
|
protected java.awt.geom.RectangularShape |
_shape
|
static int |
ARC
|
static int |
ELLIPSE
|
static int |
RECTANGLE
|
static int |
ROUND_RECTANGLE
|
Fields inherited from class simtools.shapes.AbstractShape |
---|
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD |
Constructor Summary | |
---|---|
BasicShape(int type,
int ox,
int oy,
int width,
int height,
double param1,
double param2)
Creates a new shape |
Method Summary | |
---|---|
protected AbstractShape |
cloneShape()
Performs a copy of the shape |
void |
draw(java.awt.Graphics2D g)
Draws the shape |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
|
void |
resize(int dx,
int dy)
Resizes the shape |
void |
setAnchor(java.awt.Point p)
Sets shape anchor |
java.awt.Color |
setBorderColor()
Get border color |
void |
setBorderColor(java.awt.Color c)
Set border color |
java.awt.Color |
setFillerColor()
Get filler color |
void |
setFillerColor(java.awt.Color c)
Set filler color |
void |
translate(int dx,
int dy)
Translates the shape |
Methods inherited from class simtools.shapes.AbstractShape |
---|
addListener, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPropertyNames, getPropertyValue, intersects, intersects, notifyChange, notifyChange, refresh, removeListener, setAnchor, setProperties, setPropertyValue, wipeOff |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RECTANGLE
public static final int ELLIPSE
public static final int ARC
public static final int ROUND_RECTANGLE
protected java.awt.geom.RectangularShape _shape
protected java.awt.Color _bColor
protected java.awt.Color _fColor
Constructor Detail |
---|
public BasicShape(int type, int ox, int oy, int width, int height, double param1, double param2)
Method Detail |
---|
protected AbstractShape cloneShape()
cloneShape
in class AbstractShape
public void setBorderColor(java.awt.Color c)
the
- colorpublic java.awt.Color setBorderColor()
public void setFillerColor(java.awt.Color c)
the
- colorpublic java.awt.Color setFillerColor()
public void resize(int dx, int dy)
resize
in interface Resizable
dx
- value on x axisdy
- value on y axispublic void setAnchor(java.awt.Point p)
setAnchor
in class AbstractShape
p
- the originpublic void translate(int dx, int dy)
translate
in class AbstractShape
public void draw(java.awt.Graphics2D g)
draw
in class AbstractShape
g
- the graphics contextpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
getPathIterator
in class AbstractShape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
getPathIterator
in class AbstractShape
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |