|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.AbstractPaintable
edu.neu.ccs.gui.PaintableSequenceComposite
The class PaintableSequenceComposite is a base
class for the construction of Paintable classes.
Although the class is not abstract, nothing useful can be done
with it directly.
A derived class can control exactly what is inserted into the
internal PaintableSequence via the protected access
method getPaintableSequence() but this sequence is
not visible to a public caller. Thus, all features of a
PaintableSequence are available to a derived class
without public exposure of this implementation.
In 2.3.5, the class was refactored to be consistent with
the new Paintable interface and
the new AbstractPaintable class.
In 2.4.0, this class was updated to be consistent with
refinements to the Paintable interface.
In 2.6.0, this class was refactored to directly extend
AbstractPaintable. This implementation is much
easier and also has the advantages of the Tile
wrapper class, namely, this class maintains mutator data
independent of the internal paintable sequence. This turned
out to be critical in the definition of a new derived class
MultiLineTextPaintable. In effect, this class
is now a wrapper class similar to Tile but what
is wrapped is an internal paintable sequence not a paintable
supplied by the caller.
Since the internal paintable sequence is not available to a normal caller, this class provides methods to permit the caller to set or get the background paint and background tile of that sequence. This may be useful for certain effects.
Tile,
MultiLineTextPaintable| Field Summary | |
private PaintableSequence |
sequence
The internal paintable sequence. |
| Fields inherited from class edu.neu.ccs.gui.AbstractPaintable |
SET_BACKGROUND_PAINT, SET_BACKGROUND_TILE |
| Fields inherited from interface edu.neu.ccs.gui.Paintable |
REMOVE_PAINTABLE, SET_CLIPPING_SHAPE, SET_DEFAULT_BOUNDS2D, SET_DEFAULT_CENTER, SET_DEFAULT_ORIGINAL_BOUNDS2D, SET_DEFAULT_ORIGINAL_CENTER, SET_MUTATOR, SET_OPACITY, SET_PAINTABLE, SET_VISIBLE, SHIFT_PAINTABLE |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
PaintableSequenceComposite()
|
|
| Method Summary | |
void |
clearBothInnerBackgrounds()
Clears both the background paint and the background tile of the internal paintable sequence. |
void |
clearInnerBackgroundPaint()
Clears the background paint of the internal paintable sequence. |
void |
clearInnerBackgroundTile()
Clears the background tile of the internal paintable sequence. |
XRect |
getActualBounds2D()
Implements getActualBounds2D on this object
by calling getBounds2D
on the internal paintable sequence. |
Paint |
getInnerBackgroundPaint()
Gets the background paint of the internal paintable sequence. |
Paintable |
getInnerBackgroundTile()
Gets the background tile of the internal paintable sequence. |
protected PaintableSequence |
getPaintableSequence()
Returns the internal paintable sequence for use by a derived class. |
boolean |
originalContains(double x,
double y)
Implements originalContains on this object
by calling contains
on the internal paintable sequence. |
void |
originalPaint(Graphics g)
Implements originalPaint on this object
by calling paint
on the internal paintable sequence. |
void |
setInnerBackgroundPaint(Paint paint)
Sets the background paint of the internal paintable sequence. |
void |
setInnerBackgroundTile(Object object)
Sets the background tile of the internal paintable sequence. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private PaintableSequence sequence
| Constructor Detail |
public PaintableSequenceComposite()
| Method Detail |
protected PaintableSequence getPaintableSequence()
Returns the internal paintable sequence for use by a derived class.
public void originalPaint(Graphics g)
Implements originalPaint on this object
by calling paint
on the internal paintable sequence.
originalPaint in interface PaintableoriginalPaint in class AbstractPaintableg - the graphics context on which to paintpublic XRect getActualBounds2D()
Implements getActualBounds2D on this object
by calling getBounds2D
on the internal paintable sequence.
getActualBounds2D in interface PaintablegetActualBounds2D in class AbstractPaintable
public boolean originalContains(double x,
double y)
Implements originalContains on this object
by calling contains
on the internal paintable sequence.
originalContains in interface PaintableoriginalContains in class AbstractPaintablex - the x-coordinate of the pointy - the y-coordinate of the point
public void setInnerBackgroundPaint(Paint paint)
Sets the background paint of the internal paintable sequence.
paint - the inner background paint to setpublic Paint getInnerBackgroundPaint()
Gets the background paint of the internal paintable sequence.
public void clearInnerBackgroundPaint()
Clears the background paint of the internal paintable sequence.
public void setInnerBackgroundTile(Object object)
Sets the background tile of the internal paintable sequence.
The object passed should be a paintable or be
convertible to a paintable via the method
ComponentFactory.makePaintable.
object - the background tile objectpublic Paintable getInnerBackgroundTile()
Gets the background tile of the internal paintable sequence.
public void clearInnerBackgroundTile()
Clears the background tile of the internal paintable sequence.
public void clearBothInnerBackgrounds()
Clears both the background paint and the background tile of the internal paintable sequence.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||