Class Desktop

  extended by zk.Object
      extended by zk.Widget
          extended by zk.Desktop

public class Desktop
extends Widget

A desktop. Unlike the component at the server, a desktop is a widget.

However, the desktop are different from normal widgets:

  1. The desktop is a conceptual widget. It is never attached with the DOM tree. Its desktop field is always null. In addition, calling zk.Widget#appendChild won't cause the child to be attached to the DOM tree automatically.
  2. The desktop's ID and UUID are the same.

Field Summary
static Map all
          A map of all desktops (readonly).
 String className
          The class name (zk.Desktop).
 String requestPath
          The request path.
 String widgetName
          The widget name (desktop).
Fields inherited from class zk.Widget
$weave, auDelay, autag, bindLevel, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid
Fields inherited from class zk.Object
$class, $oid
Method Summary
static Desktop $(Object o)
          Returns the desktop of the specified desktop ID, widget, widget UUID, or DOM element.
 void $init(String dtid, String contextURI, String updateURI, String reqURI, boolean stateless)
 Widget setId(String id)
          This method is voided (does nothing) since the desktop's ID can be changed.
static Desktop sync(int timeout)
          Checks if any desktop becomes invalid, and removes the invalid desktops.
Methods inherited from class zk.Widget
$, $f, $f, $f, $init, $n, $n, $o, $s, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedraw_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseEnter_, doMouseLeave_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doResizeScroll_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealElement, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onAfterSize, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, scrollIntoView, sendAU_, set, set, setAction, setChildren, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
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

Field Detail


public String className
The class name (zk.Desktop).


public String widgetName
The widget name (desktop).



public String requestPath
The request path.


public static Map all
A map of all desktops (readonly). The key is the desktop ID and the value is the desktop.

Method Detail


public void $init(String dtid,
                  String contextURI,
                  String updateURI,
                  String reqURI,
                  boolean stateless)

dtid - the ID of the desktop
contextURI - the context URI, such as /zkdemo
updateURI - the URI of ZK Update Engine, such as /zkdemo/zkau
reqURI - the URI of the request path.
stateless - whether this desktop is used for a stateless page. Specify true if you want to use the client-centric approach.


public Widget setId(String id)
This method is voided (does nothing) since the desktop's ID can be changed.

setId in class Widget
id - the ID
zk.Widget this widget


public static Desktop $(Object o)
Returns the desktop of the specified desktop ID, widget, widget UUID, or DOM element.

Notice that the desktop's ID and UUID are the same.

o - a desktop's ID, a widget, a widget's UUID, or a DOM element. If not specified, the default desktop is assumed.


public static Desktop sync(int timeout)
Checks if any desktop becomes invalid, and removes the invalid desktops. This method is called automatically when a new desktop is added. Application developers rarely need to access this method.

timeout - how many miliseconds to wait before doing the synchronization
zk.Desktop the first desktop, or null if no desktop at all.

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