|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.Transition
public abstract class Transition
Realizes a graphical transition from something 'old' to something 'new'.
Copyright Enough Software 2008
| Field Summary | |
|---|---|
protected boolean |
isFinished
|
protected RgbImage |
newState
|
protected RgbImage |
newStateRgbImage
RGB image containing RGB data of the new state, this is initialized by the Transition base class when useNewStateRgb is set to true |
protected int |
newX
|
protected int |
newY
|
protected RgbImage |
oldState
|
protected RgbImage |
oldStateRgbImage
RGB image containing RGB data of the old state, this is initialized by the Transition base class when useOldStateRgb is set to true |
protected int |
oldX
|
protected int |
oldY
|
protected UiElement |
parent
|
protected Style |
style
|
protected boolean |
useNewStateRgb
set to true in subclasses for populating newStateRgbImage |
protected boolean |
useOldStateRgb
set to true in subclasses for populating oldStateRgbImage |
| Constructor Summary | |
|---|---|
Transition()
Creates a new transition |
|
| Method Summary | |
|---|---|
void |
addRelativeToContentRegion(ClippingRegion repaintRegion,
int x,
int y,
int width,
int height)
Adds a region relative to this item's content x/y start position. |
void |
addRepaintArea(ClippingRegion repaintArea)
Adds a repaint request for this user interface component's space. |
abstract boolean |
animate()
Animates this transition |
void |
animate(long currentTime,
ClippingRegion repaintRegion)
Animates this element. |
Style |
getStyle()
Retrieves the currently used style |
void |
initTransition(RgbImage oldStateRgbImage,
RgbImage newStateRgbImage,
UiElement transitionParent)
Initializes this transition shortly before it is shown. |
boolean |
isFinished()
Determines whether this transition is finished. |
abstract void |
paint(int x,
int y,
Graphics g)
Paints the transition |
void |
setStyle(Style style)
Sets the style of this user interface element. |
void |
setStyle(Style style,
boolean resetStyle)
Sets the style with animatable CSS attributes of this user interface element. |
abstract void |
start(boolean isForward)
|
abstract void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RgbImage oldState
protected RgbImage newState
protected boolean useOldStateRgb
protected RgbImage oldStateRgbImage
protected boolean useNewStateRgb
protected RgbImage newStateRgbImage
protected int oldX
protected int oldY
protected int newX
protected int newY
protected Style style
protected UiElement parent
protected boolean isFinished
| Constructor Detail |
|---|
public Transition()
| Method Detail |
|---|
public void initTransition(RgbImage oldStateRgbImage,
RgbImage newStateRgbImage,
UiElement transitionParent)
oldStateRgbImage - the old state of the parentnewStateRgbImage - the new state of the parenttransitionParent - the parentpublic void addRepaintArea(ClippingRegion repaintArea)
UiElement
addRepaintArea in interface UiElementrepaintArea - the clipping rectangle to which the repaint area should be added
public void addRelativeToContentRegion(ClippingRegion repaintRegion,
int x,
int y,
int width,
int height)
UiElement
addRelativeToContentRegion in interface UiElementrepaintRegion - the clipping regionx - horizontal start relative to this item's content positiony - vertical start relative to this item's content positionwidth - widthheight - heightpublic Style getStyle()
UiElement
getStyle in interface UiElementpublic void setStyle(Style style)
UiElement
setStyle in interface UiElementstyle - the new style for this element.
public void setStyle(Style style,
boolean resetStyle)
UiElement
setStyle in interface UiElementstyle - the new style for this element.resetStyle - true when style settings should be resetted. This is not the case
when styles are animated, for example.
public abstract void paint(int x,
int y,
Graphics g)
x - horizontal start positiony - vertical start positiong - Graphics contextpublic abstract boolean animate()
public abstract void start(boolean isForward)
public abstract void stop()
public void animate(long currentTime,
ClippingRegion repaintRegion)
Animatable
animate in interface AnimatablecurrentTime - the current time in millisecondsrepaintRegion - the repaint area that needs to be updated when this item is animatedItem.addRelativeToContentRegion(ClippingRegion, int, int, int, int)public boolean isFinished()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||