|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.image.painter.AbstractPainter | +--oracle.cabo.image.painter.AbstractWrappingPainter | +--oracle.cabo.image.painter.AbstractPainterSwitcher
Abstract base class for painters that switch between two painters depending
only the value returned by the method useTruePainter
.
subclasses need to implement useTruePainter
.
useTruePainter(oracle.cabo.image.painter.PaintContext)
Fields inherited from interface oracle.cabo.image.painter.Painter |
STATE_ACTIVE_CHANGED, STATE_ARMED_CHANGED, STATE_BACKGROUND_CHANGED, STATE_ENABLED_CHANGED, STATE_FOCUSED_CHANGED, STATE_FONT_CHANGED, STATE_FOREGROUND_CHANGED, STATE_ISDEFAULT_CHANGED, STATE_MOUSE_OVER_CHANGED, STATE_READING_DIRECTION_CHANGED, STATE_SELECTED_CHANGED, STATE_SET_CHANGED, STATE_SIZE_CHANGED, STATE_XALIGNMENT_CHANGED, STATE_YALIGNMENT_CHANGED |
Constructor Summary | |
AbstractPainterSwitcher(Painter truePainter)
Create an AbstAbstractPainterSwitcher that uses the truePainter when useTruePainter evaluates to true, and the
NullPainter otherwise. |
|
AbstractPainterSwitcher(Painter truePainter,
Painter falsePainter)
Create an AbstAbstractPainterSwitcher that uses the truePainter when useTruePainter evaluates to true, and the
falsePainter otherwise. |
Method Summary | |
protected Painter |
getWrappedPainter(PaintContext context)
Override to return the correct painter. |
protected abstract boolean |
useTruePainter(PaintContext context)
Returns true if the true painter should be used. |
Methods inherited from class oracle.cabo.image.painter.AbstractWrappingPainter |
getInvalidateFlags, getMaximumSize, getMinimumSize, getPainterAt, getPreferredSize, getRepaintFlags, getSize, isTransparent, paint |
Methods inherited from class oracle.cabo.image.painter.AbstractPainter |
contains, getData, getDataKey |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractPainterSwitcher(Painter truePainter)
useTruePainter
evaluates to true, and the
NullPainter
otherwise.
truePainter
- Painter to use when useTruePainter
is true.
useTruePainter(oracle.cabo.image.painter.PaintContext)
public AbstractPainterSwitcher(Painter truePainter, Painter falsePainter)
useTruePainter
evaluates to true, and the
falsePainter otherwise.
truePainter
- Painter to use when useTruePainter
is true.falsePainter
- Painter to use when useTruePainter
is false.
useTruePainter(oracle.cabo.image.painter.PaintContext)
Method Detail |
protected abstract boolean useTruePainter(PaintContext context)
protected final Painter getWrappedPainter(PaintContext context)
getWrappedPainter
in class AbstractWrappingPainter
oracle.cabo.image.painter.AbstractWrappingPainter
context
- Context to use for determining the wrapped painter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |