zk.eff
Class Shadow

java.lang.Object
  extended by zk.Object
      extended by zk.eff.Shadow

public class Shadow
extends Object

The shadow effect.


Field Summary
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
 void $init(DOMElement element, Map opts)
          Constructor of the Shadow object.
 void destroy()
          Destroys the shadow.
 DOMElement getBottomElement()
          Returns the lowest level of elements of this shadow.
 void hide()
          Hides the shadow, no matter the associated element is visible or not.
 void sync()
          Synchronizes the visual states of the element with shadow.
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

$init

public void $init(DOMElement element,
                  Map opts)
Constructor of the Shadow object.

Notice that you have to invoke destroy(), if the shadow is no longer used.

Parameters:
element - the element to associate the shadow
opts - [optional] the options. Alowed options:
  • left: The margin at left. Default: 4.
  • right: The margin at right. Default: 4.
  • top: the margin at top. Default: 3.
  • bottom: the margin at bottom. Default: 3.
  • stackup: whether to create a stackup (see jqzk#makeStackup)

destroy

public void destroy()
Destroys the shadow. You cannot use this object any more.


hide

public void hide()
Hides the shadow, no matter the associated element is visible or not.

Notice this method is rarely used. Rather, sync() is more convenient to use.


sync

public void sync()
Synchronizes the visual states of the element with shadow. The visual states include the visibility, location, dimensions and z-index. When the associated element is changed, you have to invoke this method to synchronize the visual states.


getBottomElement

public DOMElement getBottomElement()
Returns the lowest level of elements of this shadow. By lowest level, we mean the element is displayed at the botton in the z order. The bottom element is the stackup element if #$init is called with the stackup option. Otherwise, it is the shadow element.

Returns:
DOMElement


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo