|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Fx
Interface that provide basic animation and visual effects support.
It is important to note that although the Fx methods and many non-Fx Element methods support
"method chaining" in that they return the Element object itself as the method return value, it is
not always possible to mix the two in a single method chain. The Fx methods use an internal effects
queue so that each effect can be properly timed and sequenced. Non-Fx methods, on the other hand, have
no such internal queueing and will always execute immediately. For this reason, while it may be possible
to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the expected
results and should be done with care.
Method Summary | |
---|---|
Fx |
fadeIn()
Fade an element in (from transparent to opaque). |
Fx |
fadeIn(FxConfig config)
Fade an element in (from transparent to opaque). |
Fx |
fadeOut()
Fade an element out (from opaque to transparent) from the element's current opacity to 0. |
Fx |
fadeOut(FxConfig config)
Fade an element out (from opaque to transparent). |
Fx |
frame()
Shows a ripple of exploding, attenuating borders to draw attention to an Element. |
Fx |
frame(java.lang.String color,
int count,
FxConfig config)
Shows a ripple of exploding, attenuating borders to draw attention to an Element. |
Fx |
ghost()
Slides the element while fading it out of view. |
Fx |
ghost(java.lang.String anchorPosition,
FxConfig config)
Slides the element while fading it out of view. |
boolean |
hasActiveFx()
Returns true if the element has any effects actively running or queued, else returns false. |
boolean |
hasFxBlock()
Returns true if the element is currently blocking so that no other effect can be queued until this effect is finished, else returns false if blocking is not set. |
Fx |
highlight()
Highlights the Element by setting a color (applies to the background-color by default, but can be changed using the "attr" config option) and then fading back to the original color. |
Fx |
highlight(java.lang.String color,
FxConfig config)
Highlights the Element by setting a color (applies to the background-color by default, but can be changed using the "attr" config option) and then fading back to the original color. |
Fx |
highlight(java.lang.String color,
java.lang.String attr,
java.lang.String endColor,
FxConfig config)
Highlights the Element by setting a color (applies to the background-color by default, but can be changed using the "attr" config option) and then fading back to the original color. |
Fx |
pause(int seconds)
Creates a pause before any subsequent queued effects begin. |
Fx |
puff()
Fades the element out while slowly expanding it in all directions. |
Fx |
puff(boolean remove,
FxConfig config)
Fades the element out while slowly expanding it in all directions. |
Fx |
scale(int width,
int height)
Animates the transition of an element's dimensions from a starting height/width to an ending height/width. |
Fx |
scale(int width,
int height,
FxConfig config)
Animates the transition of an element's dimensions from a starting height/width to an ending height/width. |
Fx |
sequenceFx()
Ensures that all effects queued after sequenceFx is called on the element are run in sequence. |
Fx |
shift(int x,
int y,
int width,
int height,
FxConfig config)
Animates the transition of any combination of an element's dimensions, xy position and/or opacity. |
Fx |
slideIn()
Slides the element into view. |
Fx |
slideIn(java.lang.String anchorPosition,
FxConfig config)
Slides the element into view. |
Fx |
slideOut()
Slides the element out of view. |
Fx |
slideOut(boolean remove,
java.lang.String anchorPosition,
FxConfig config)
Slides the element out of view. |
Fx |
stopFx()
Stops any running effects and clears the element's internal effects queue if it contains any additional effects that haven't started yet. |
Fx |
switchOff()
Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television). |
Fx |
switchOff(boolean remove,
FxConfig config)
Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television). |
Fx |
syncFx()
Ensures that all effects queued after syncFx is called on the element are run concurrently. |
Method Detail |
---|
Fx fadeIn()
// default: fade in from opacity 0 to 100% el.fadeIn();
Fx fadeIn(FxConfig config)
// fade in from opacity 0 to 75% over 2 seconds el.fadeIn(new FxConfig() { { setEndOpacity(0.75); setDuration(2); });
config
- the Fx config
Fx fadeOut()
Fx fadeOut(FxConfig config)
// fade out from the element's current opacity to 25% over 2 seconds el.fadeOut(new FxConfig() { { setEndOpacity(0.25); setDuration(2); });
config
- the Fx config
Fx frame()
Fx frame(java.lang.String color, int count, FxConfig config)
// 3 red ripples lasting 3 seconds total el.frame("ff0000", 3, new FxConfig() { { setDurtion(3); }));
color
- he color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').count
- The number of ripples to display (defaults to 1)config
- the Fx config
Fx ghost()
Fx ghost(java.lang.String anchorPosition, FxConfig config)
anchorPosition
- the anchor positionconfig
- the Fx config
boolean hasActiveFx()
boolean hasFxBlock()
Fx highlight()
Fx highlight(java.lang.String color, FxConfig config)
color
- The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')config
- the Fx config
Fx highlight(java.lang.String color, java.lang.String attr, java.lang.String endColor, FxConfig config)
// highlight foreground text to blue for 2 seconds el.highlight("0000ff", "color", "ffffff", new FxConfig() {{ setDuration(3) }});
color
- The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')attr
- the attribute. Can be any valid CSS property (attribute) that supports a color value. Default is 'background-color'endColor
- the end colorconfig
- the Fx config
Fx pause(int seconds)
seconds
- The length of time to pause (in seconds)
Fx puff()
Fx puff(boolean remove, FxConfig config)
remove
- true to remove elementconfig
- the Fx config
Fx scale(int width, int height)
width
- The new widthheight
- The new height
Fx scale(int width, int height, FxConfig config)
width
- The new widthheight
- The new heightconfig
- the Fx config
Fx sequenceFx()
Fx shift(int x, int y, int width, int height, FxConfig config)
x
- X postioniony
- Y positionwidth
- the new widthheight
- the new heightconfig
- the Fx config
Fx slideIn()
Fx slideIn(java.lang.String anchorPosition, FxConfig config)
anchorPosition
- the anchor positionconfig
- the Fx config
Fx slideOut()
Fx slideOut(boolean remove, java.lang.String anchorPosition, FxConfig config)
remove
- true to remove element from the DOManchorPosition
- the anchor positionconfig
- the Fx config
Fx stopFx()
Fx switchOff()
Fx switchOff(boolean remove, FxConfig config)
remove
- true to remove element from the DOMconfig
- the Fx config
Fx syncFx()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |