org.kuali.student.common.ui.client.util
Class Elements

java.lang.Object
  extended by org.kuali.student.common.ui.client.util.Elements

public class Elements
extends Object

Utility class for DOM element manipulations, UIObject effects, etc.


Nested Class Summary
static class Elements.EmptyFadeCallback
           
static interface Elements.FadeCallback
           
 
Constructor Summary
Elements()
           
 
Method Summary
static void fadeIn(com.google.gwt.dom.client.Element e, int milliseconds, int maxOpacity, Elements.FadeCallback callback)
           
static void fadeIn(com.google.gwt.user.client.ui.UIObject target, int milliseconds, int maxOpacity, Elements.FadeCallback callback)
          Causes an element to "fade in" via opacity.
static void fadeOut(com.google.gwt.dom.client.Element e, int milliseconds, int minOpacity, Elements.FadeCallback callback)
           
static void fadeOut(com.google.gwt.user.client.ui.UIObject target, int milliseconds, int minOpacity, Elements.FadeCallback callback)
          Causes an element to "fade out" via opacity.
static void setOpacity(com.google.gwt.dom.client.Element e, int percent)
          Sets a DOM element's opacity
static void setOpacity(com.google.gwt.user.client.ui.UIObject u, int percent)
          Sets a UIObject's opacity
static void setTextSelectable(com.google.gwt.dom.client.Element e, boolean selectable)
          Enables/disables text selection for the specified element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elements

public Elements()
Method Detail

fadeIn

public static void fadeIn(com.google.gwt.user.client.ui.UIObject target,
                          int milliseconds,
                          int maxOpacity,
                          Elements.FadeCallback callback)
Causes an element to "fade in" via opacity. Make sure that element to fade is not visible before calling this method. When the callback is invoked with onFadeStart, the element can be set to visible as it is entirely transparent. When onFadeComplete is called, the element will be entirely opaque.

Parameters:
target - the UIObject to be faded in
milliseconds - how long the fade effect should take to process
maxOpacity - final opacity
callback - the callback to be invoked on fade progress

fadeIn

public static void fadeIn(com.google.gwt.dom.client.Element e,
                          int milliseconds,
                          int maxOpacity,
                          Elements.FadeCallback callback)

fadeOut

public static void fadeOut(com.google.gwt.user.client.ui.UIObject target,
                           int milliseconds,
                           int minOpacity,
                           Elements.FadeCallback callback)
Causes an element to "fade out" via opacity. When onFadeComplete is called, the element will be entirely transparent.

Parameters:
target - the UIObject to be faded out
milliseconds - how long the fade effect should take to process
minOpacity - final opacity
callback - the callback to be invoked on fade progress

fadeOut

public static void fadeOut(com.google.gwt.dom.client.Element e,
                           int milliseconds,
                           int minOpacity,
                           Elements.FadeCallback callback)

setOpacity

public static void setOpacity(com.google.gwt.user.client.ui.UIObject u,
                              int percent)
Sets a UIObject's opacity

Parameters:
u -
percent -

setOpacity

public static void setOpacity(com.google.gwt.dom.client.Element e,
                              int percent)
Sets a DOM element's opacity

Parameters:
e -
percent -

setTextSelectable

public static void setTextSelectable(com.google.gwt.dom.client.Element e,
                                     boolean selectable)
Enables/disables text selection for the specified element.

Parameters:
e -
selectable -


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.