|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.rit.numeric.plot.DisplayableList
public class DisplayableList
Class DisplayableList provides an object that combines a list of separate
Displayable objects into a single
displayable object.
Note: Class DisplayableList is multiple thread safe.
| Constructor Summary | |
|---|---|
DisplayableList()
Construct a new, empty displayable list. |
|
| Method Summary | |
|---|---|
void |
add(Displayable theDisplayable)
Add the given displayable object to the end of this displayable list. |
void |
clear()
Clear this displayable list. |
void |
draw(Graphics2D g2d)
Draw this drawable object in the given graphics context. |
Paint |
getBackgroundPaint()
Returns this displayable object's background paint. |
Rectangle2D |
getBoundingBox()
Returns this displayable object's bounding box. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DisplayableList()
| Method Detail |
|---|
public void clear()
public void add(Displayable theDisplayable)
theDisplayable - Displayable object.
NullPointerException - (unchecked exception) Thrown if theDisplayable is null.public void draw(Graphics2D g2d)
The displayable objects in this displayable list are drawn in the order they were added.
draw in interface Drawableg2d - 2-D graphics context.public Rectangle2D getBoundingBox()
This method returns the union of the bounding boxes of the displayable objects in this displayable list. If this displayable list is empty, an empty rectangle is returned.
getBoundingBox in interface Displayablepublic Paint getBackgroundPaint()
This method returns the background paint of the first displayable object in this displayable list. If this displayable list is empty, the color white is returned.
getBackgroundPaint in interface Displayable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||