public class SplashScreenshotTransitionContainer extends ScreenshotTransitionContainer
The transition can be parameterized by the way the widget grow or shrink:
This transition can be parameterized by the position from where the widget starts growing (or where it disappears).
forward, newScreenshot, newWidget, step, stop
DURATION
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
SplashScreenshotTransitionContainer(boolean clip)
Creates a splash transition container.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawSplash(GraphicsContext g,
Image widgetImage,
float factor,
int x,
int y,
int width,
int height)
Draws the growing/shrinking widget.
|
protected int |
getStop(int contentWidth,
int contentHeight)
Gets the stop value of the motion.
|
void |
render(GraphicsContext g)
Renders the renderable on the given graphics context.
|
protected void |
resetContext()
Actually shows the new widget (add it as a child) and cleans the fields.
|
void |
setAnchor(int x,
int y)
Sets the anchor position of the splash animation, that means the point around which the widget will grow
(forward) or shrink (backward).
|
protected void |
takeScreenshot(Widget widget,
Rectangle contentBounds)
Takes a screenshot of a widget.
|
isAnimating, isTransparent, show, updateStep
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, 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
public SplashScreenshotTransitionContainer(boolean clip)
clip
- true
if the widget is clipped, false
if the widget is resized.public void setAnchor(int x, int y)
x
- the x coordinate.y
- the y coordinate.public void render(GraphicsContext g)
Renderable
render
in interface Renderable
render
in class StyledComposite
g
- the graphics context to be used to draw the renderable.protected void drawSplash(GraphicsContext g, Image widgetImage, float factor, int x, int y, int width, int height)
g
- the graphics context.widgetImage
- the image of the growing/shrinking widget.factor
- the size factor.x
- the x of the splash.y
- the y of the splash.width
- the width of the splash.height
- the height of the splash.protected int getStop(int contentWidth, int contentHeight)
ScreenshotTransitionContainer
0
.getStop
in class ScreenshotTransitionContainer
contentWidth
- the content width.contentHeight
- the content height.protected void takeScreenshot(Widget widget, Rectangle contentBounds)
ScreenshotTransitionContainer
takeScreenshot
in class ScreenshotTransitionContainer
widget
- the widget.contentBounds
- the content bounds.protected void resetContext()
ScreenshotTransitionContainer
resetContext
in class ScreenshotTransitionContainer