| com.gwtext.client.core.Fx
All known Subclasses: com.gwtext.client.core.BaseElement,
Fx | public interface Fx (Code) | | 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(String color, int count, FxConfig config) Shows a ripple of exploding, attenuating borders to draw attention to an Element.
// 3 red ripples lasting 3 seconds total
el.frame("ff0000", 3, new FxConfig() {
{
setDurtion(3);
}));
Parameters: color - he color of the border. | Fx | ghost() Slides the element while fading it out of view. | Fx | ghost(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(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.
Parameters: color - The highlight color. | Fx | highlight(String color, String attr, 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.
If no original color is available, you should provide the "endColor" config option which will be cleared after the animation.
// highlight foreground text to blue for 2 seconds
el.highlight("0000ff", "color", "ffffff", new FxConfig() {{
setDuration(3)
}});
Parameters: color - The highlight 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(String anchorPosition, FxConfig config) Slides the element into view. | Fx | slideOut() Slides the element out of view. | Fx | slideOut(boolean remove, 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. |
fadeIn | Fx fadeIn()(Code) | | Fade an element in (from transparent to opaque).
// default: fade in from opacity 0 to 100%
el.fadeIn();
this |
fadeIn | Fx fadeIn(FxConfig config)(Code) | | Fade an element in (from transparent to opaque). The ending opacity can be specified using the "endOpacity" config option.
// fade in from opacity 0 to 75% over 2 seconds
el.fadeIn(new FxConfig() {
{
setEndOpacity(0.75);
setDuration(2);
});
Parameters: config - the Fx config this |
fadeOut | Fx fadeOut()(Code) | | Fade an element out (from opaque to transparent) from the element's current opacity to 0.
this |
fadeOut | Fx fadeOut(FxConfig config)(Code) | | Fade an element out (from opaque to transparent). The ending opacity can be specified using the "endOpacity" config option.
// fade out from the element's current opacity to 25% over 2 seconds
el.fadeOut(new FxConfig() {
{
setEndOpacity(0.25);
setDuration(2);
});
Parameters: config - the Fx config this |
frame | Fx frame()(Code) | | Shows a ripple of exploding, attenuating borders to draw attention to an Element.
this |
frame | Fx frame(String color, int count, FxConfig config)(Code) | | Shows a ripple of exploding, attenuating borders to draw attention to an Element.
// 3 red ripples lasting 3 seconds total
el.frame("ff0000", 3, new FxConfig() {
{
setDurtion(3);
}));
Parameters: color - he color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9'). Parameters: count - The number of ripples to display (defaults to 1) Parameters: config - the Fx config this |
ghost | Fx ghost()(Code) | | Slides the element while fading it out of view.
this |
ghost | Fx ghost(String anchorPosition, FxConfig config)(Code) | | Slides the element while fading it out of view.
Parameters: anchorPosition - the anchor position Parameters: config - the Fx config true |
hasActiveFx | boolean hasActiveFx()(Code) | | Returns true if the element has any effects actively running or queued, else returns false.
True if element has active effects, else false |
hasFxBlock | boolean hasFxBlock()(Code) | | 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. This is commonly used to ensure that an effect initiated by a user action runs to completion prior to the same effect being restarted (e.g., firing only one effect even if the user clicks several times).
True if blocking, else false |
highlight | Fx highlight()(Code) | | 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.
this |
highlight | Fx highlight(String color, FxConfig config)(Code) | | 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.
Parameters: color - The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c') Parameters: config - the Fx config this |
highlight | Fx highlight(String color, String attr, String endColor, FxConfig config)(Code) | | 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.
If no original color is available, you should provide the "endColor" config option which will be cleared after the animation.
// highlight foreground text to blue for 2 seconds
el.highlight("0000ff", "color", "ffffff", new FxConfig() {{
setDuration(3)
}});
Parameters: color - The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c') Parameters: attr - the attribute. Can be any valid CSS property (attribute) that supports a color value. Default is 'background-color' Parameters: endColor - the end color Parameters: config - the Fx config this |
pause | Fx pause(int seconds)(Code) | | Creates a pause before any subsequent queued effects begin. If there are no effects queued after the pause it will have no effect.
Parameters: seconds - The length of time to pause (in seconds) this |
puff | Fx puff()(Code) | | Fades the element out while slowly expanding it in all directions. When the effect is completed, the element will be hidden (visibility = 'hidden')
but block elements will still take up space in the document.
this |
puff | Fx puff(boolean remove, FxConfig config)(Code) | | Fades the element out while slowly expanding it in all directions. When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
The element can be removed from the DOM using the 'remove' config option if desired.
Parameters: remove - true to remove element Parameters: config - the Fx config this |
scale | Fx scale(int width, int height)(Code) | | Animates the transition of an element's dimensions from a starting height/width to an ending height/width.
Parameters: width - The new width Parameters: height - The new height this |
scale | Fx scale(int width, int height, FxConfig config)(Code) | | Animates the transition of an element's dimensions from a starting height/width to an ending height/width.
Parameters: width - The new width Parameters: height - The new height Parameters: config - the Fx config this |
sequenceFx | Fx sequenceFx()(Code) | | Ensures that all effects queued after sequenceFx is called on the element are run in sequence. This is the opposite of syncFx.
this |
shift | Fx shift(int x, int y, int width, int height, FxConfig config)(Code) | | Animates the transition of any combination of an element's dimensions, xy position and/or opacity. Any of these
properties not specified in the config object will not be changed. This effect requires that at least one new dimension, position or opacity setting must be passed in on the config object in order for the function to have any effect.
Parameters: x - X postionion Parameters: y - Y position Parameters: width - the new width Parameters: height - the new height Parameters: config - the Fx config this |
slideIn | Fx slideIn()(Code) | | Slides the element into view. An anchor point can be optionally passed to set the point of origin for the slide effect.
This function automatically handles wrapping the element with a fixed-size container if needed.
Slides in from top by default.
this |
slideIn | Fx slideIn(String anchorPosition, FxConfig config)(Code) | | Slides the element into view. An anchor point can be optionally passed to set the point of origin for the slide effect.
This function automatically handles wrapping the element with a fixed-size container if needed.
Parameters: anchorPosition - the anchor position Parameters: config - the Fx config this |
slideOut | Fx slideOut()(Code) | | Slides the element out of view. An anchor point can be optionally passed to set the end point for the slide effect.
When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
This function automatically handles wrapping the element with a fixed-size container if needed.
this |
slideOut | Fx slideOut(boolean remove, String anchorPosition, FxConfig config)(Code) | | Slides the element out of view. An anchor point can be optionally passed to set the end point for the slide effect.
When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
This function automatically handles wrapping the element with a fixed-size container if needed.
Parameters: remove - true to remove element from the DOM Parameters: anchorPosition - the anchor position Parameters: config - the Fx config this |
stopFx | Fx stopFx()(Code) | | Stops any running effects and clears the element's internal effects queue if it contains any additional effects
that haven't started yet.
this |
switchOff | Fx switchOff()(Code) | | Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
this |
switchOff | Fx switchOff(boolean remove, FxConfig config)(Code) | | Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still take up space in the document.
Parameters: remove - true to remove element from the DOM Parameters: config - the Fx config this |
syncFx | Fx syncFx()(Code) | | Ensures that all effects queued after syncFx is called on the element are run concurrently. This is the opposite of sequenceFx.
this |
|
|