|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.rolemodelsoft.drawlet.basics.AbstractPaintable
|
+--com.rolemodelsoft.drawlet.basics.AbstractFigure
|
+--com.rolemodelsoft.drawlet.shapes.AbstractShape
|
+--com.rolemodelsoft.drawlet.shapes.FilledShape
This provides basic default functionality for Figures that draw shapes which may be opaque. It provides most of its functionality based on its getBounds(), and forces concrete subclasses to define, at a minimum: paintStrokes(Graphics); paintFilled(Graphics); getBounds(); basicTranslate(int,int); basicReshape(int,int,int,int);
| Field Summary | |
protected java.awt.Color |
fillColor
The fill color for drawing the figure is cached here. |
protected java.awt.Color |
lineColor
The line color for drawing the figure is cached here. |
| Fields inherited from class com.rolemodelsoft.drawlet.basics.AbstractFigure |
listeners,
locationListeners |
| Constructor Summary | |
FilledShape()
|
|
| Method Summary | |
protected void |
basicReshape(int x,
int y,
int width,
int height)
Reshapes the receiver to the specified bounding box. |
protected void |
basicTranslate(int x,
int y)
Moves the receiver in the x and y direction. |
protected java.awt.Color |
defaultFillColor()
Answer the default/initial value for fillColor |
protected java.awt.Color |
defaultLineColor()
Answer the default/initial value for lineColor |
abstract java.awt.Rectangle |
getBounds()
Returns the current bounds of the receiver. |
java.awt.Color |
getFillColor()
Answer the Color to use when filling the shape. |
java.awt.Color |
getLineColor()
Answer the Color to use when drawing lines. |
DrawingStyle |
getStyle()
Answer the DrawingStyle which defines how to paint the figure. |
boolean |
isOpaque()
Answer whether the receiver fills in its inside (obscuring things underneath) or not. |
boolean |
isStroked()
Answer whether the receiver draws its lines (obscuring things underneath) or not. |
void |
paint(java.awt.Graphics g)
Paints the figure. |
void |
paintFilled(java.awt.Graphics g)
Paint the shape, filling all contained area |
void |
paintStrokes(java.awt.Graphics g)
Paint the outline of the shape |
void |
setFillColor(java.awt.Color color)
Set the Color to use when filling the shape. |
void |
setLineColor(java.awt.Color color)
Set the Color to use when drawing lines. |
void |
setStyle(DrawingStyle style)
Set the DrawingStyle defining how to paint the figure. |
| Methods inherited from class com.rolemodelsoft.drawlet.shapes.AbstractShape |
basicResize,
getHandles,
resetBoundsCache,
resetSizeCache,
reshapedPolygon,
reshapedPolygon,
setBounds,
setSize |
| Methods inherited from class com.rolemodelsoft.drawlet.basics.AbstractPaintable |
getBottom,
getHeight,
getLeft,
getRight,
getSize,
getTop,
getWidth |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.awt.Color lineColor
protected java.awt.Color fillColor
| Constructor Detail |
public FilledShape()
| Method Detail |
protected void basicReshape(int x,
int y,
int width,
int height)
x - the x coordinatey - the y coordinatewidth - the width of the figureheight - the height of the figure
protected void basicTranslate(int x,
int y)
x - amount to move in the x directiony - amount to move in the y directionprotected java.awt.Color defaultFillColor()
protected java.awt.Color defaultLineColor()
public abstract java.awt.Rectangle getBounds()
public java.awt.Color getFillColor()
public java.awt.Color getLineColor()
public DrawingStyle getStyle()
public boolean isOpaque()
true if the receiver
fills in its inside;
false otherwise.public boolean isStroked()
true if the receiver draws its lines;
false otherwise.public void paint(java.awt.Graphics g)
g - the specified Graphics windowpublic void paintFilled(java.awt.Graphics g)
g - the specified Graphics windowpublic void paintStrokes(java.awt.Graphics g)
g - the specified Graphics windowpublic void setFillColor(java.awt.Color color)
color - the colorpublic void setLineColor(java.awt.Color color)
color - the colorpublic void setStyle(DrawingStyle style)
style - the specified DrawingStyle.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||