public abstract class ScreenshotTransitionContainer extends TransitionContainer
Modifier and Type | Field and Description |
---|---|
protected boolean |
forward
true if going forward, false otherwise. |
protected Image |
newScreenshot
The screenshot of the new widget.
|
protected Widget |
newWidget
The new widget to show.
|
protected int |
step
The current step value of the motion.
|
protected int |
stop
The stop value of the motion.
|
DURATION
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
ScreenshotTransitionContainer() |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
getStop(int contentWidth,
int contentHeight)
Gets the stop value of the motion.
|
protected boolean |
isAnimating()
Gets whether the transition container is doing the transition or not.
|
boolean |
isTransparent()
Gets whether this widget is transparent or not.
|
protected void |
resetContext()
Actually shows the new widget (add it as a child) and cleans the fields.
|
void |
show(Widget widget,
boolean forward)
Shows a new widget.
|
protected void |
takeScreenshot(Widget widget,
Rectangle contentBounds)
Takes a screenshot of a widget.
|
protected void |
updateStep(int step)
Updates the current step.
|
addAnimationStepListener, cancelAnimation, createMotion, getDuration, getMotionFactory, hideNotify, notifyAnimationStepListeners, notifyAnimationStepListeners, removeAnimationStepListener, setBoundsContent, setChildBounds, setDuration, setMotionFactory, startAnimation, stopAnimation, tick, validateContent
add, addClassSelector, contains, gainFocus, getAttribute, getChild, getChildrenCount, getChildrenElements, getParentElement, getStyle, hasClassSelector, isInState, lostFocus, mergeStyle, removeAllClassSelectors, removeClassSelector, removeInstanceStyle, render, renderContent, setBounds, setClassSelectors, setEnabled, updateStyle, updateStyleOnly, validate
getFocus, getFocusIndex, getNext, getWidget, getWidgetAt, getWidgets, getWidgetsCount, handleEvent, iterator, remove, removeAllWidgets, requestFocus, requestFocus, requestFocusFrom, showNotify
getAbsoluteX, getAbsoluteX, getAbsoluteY, getAbsoluteY, getEventHandler, getHeight, getPanel, getParent, getPreferredHeight, getPreferredWidth, getRelativeX, getRelativeY, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isShown, isValid, isVisible, repaint, repaint, revalidate, revalidateSubTree, setEventHandler, setLocation, setPreferredSize, setSize, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventHandler, getHeight, getWidth, getX, getY, handleEvent, isShown, repaint, repaint, setEventHandler, showNotify
protected boolean forward
true
if going forward, false
otherwise.show(Widget, boolean)
@Nullable protected Widget newWidget
show(Widget, boolean)
@Nullable protected Image newScreenshot
protected int stop
getStop(int, int)
protected int step
public boolean isTransparent()
Widget
By default, a widget is transparent.
A transparent widget means that it will not repaint ALL the rectangular zone defined by its bounds. Then each
time it needs to be repainted, its parent (recursively if also transparent) will be repainted within the bounds
of the widget.
Each time a non-transparent widget needs to be repainted, it is the only one to be repainted.
isTransparent
in class StyledComposite
true
if this widget is transparent, false
otherwise.Widget.contains(int, int)
public void show(Widget widget, boolean forward)
TransitionContainer
show
in class TransitionContainer
widget
- the new widget to show.forward
- true
if going forward, false
otherwise.protected void takeScreenshot(Widget widget, Rectangle contentBounds)
widget
- the widget.contentBounds
- the content bounds.protected abstract int getStop(int contentWidth, int contentHeight)
0
.contentWidth
- the content width.contentHeight
- the content height.protected boolean isAnimating()
true
during the animation, false
otherwise.protected void resetContext()
resetContext
in class TransitionContainer
protected void updateStep(int step)
TransitionContainer
Called during the animation using the current value of the motion.
updateStep
in class TransitionContainer
step
- the current step.