|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectview.DrawingInfo
public final class DrawingInfo
Collects info on how an object should be drawn. Has at least a color.
Defaults a fill attribute to false, and possibly has a stroke
and composite value. Can be constructed with a StringTool.DOLLAR
separated single string giving at least the color as a MyColor,
followed (all further optional) by 'true' or 'false' as a filling property,
a string giving the composite as a MyAlphaComposite and the
stroke as a MyStroke.
| Field Summary | |
|---|---|
private boolean |
active
Normally true, means that it should be applied. |
private Paint |
color
The color of the data set. |
private Composite |
composite
A composite object for the set, might be null. |
private Stroke |
stroke
A stroke attribute to this set, might be null. |
| Constructor Summary | |
|---|---|
DrawingInfo(Paint col)
Constructs a new data set key. |
|
DrawingInfo(Paint col,
Stroke how)
Constructs a new data set key. |
|
DrawingInfo(Paint col,
Stroke how,
Composite over)
Construct a new data set. |
|
DrawingInfo(String poly)
Constructs a data set from a single line. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
To drawing infos are equal if their unique name matches and all other attributes are equal. |
Paint |
getColor()
Returns the set color. |
Composite |
getComposite()
Returns how this object is drawn on top of other object, that have already been drawn. |
Stroke |
getStroke()
Returns how the outline of this object should be drawn. |
int |
hashCode()
The hash key for this set is derived from its color. |
boolean |
isActive()
Returns true, if this drawing info is active, meaning that it should be applied. |
void |
setActive(boolean to)
Sets the active flag to the desired value. |
private void |
setColor(Paint col)
Sets the color. |
private void |
setComposite(Composite over)
Set hoe this set is drawn over existing figures. |
private void |
setStroke(Stroke how)
Set how the shape of this set is stroked. |
boolean |
toggleActive()
Toggles the active flag and returns the new state. |
String |
toString()
The string representation is parsable from the constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean active
private Paint color
private Composite composite
private Stroke stroke
| Constructor Detail |
|---|
public DrawingInfo(String poly)
MyColor, then, a boolean stating
the fill attribute, and composite and stroke attributes.
public DrawingInfo(Paint col)
public DrawingInfo(Paint col,
Stroke how)
public DrawingInfo(Paint col,
Stroke how,
Composite over)
| Method Detail |
|---|
public boolean isActive()
public boolean toggleActive()
public void setActive(boolean to)
public int hashCode()
hashCode in class Objectprivate void setColor(Paint col)
private void setComposite(Composite over)
private void setStroke(Stroke how)
public Paint getColor()
public Composite getComposite()
public Stroke getStroke()
public boolean equals(Object other)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||