zk.wgt
Class WidgetInfo

java.lang.Object
  extended by zk.wgt.WidgetInfo

public class WidgetInfo
extends java.lang.Object

Information of widgets.

Whne this package (zk.wgt) is loaded, all widget informations defined in the server are loaded automatically.


Field Summary
static Map all
          A map (Map) of widget informations (readonly).
 
Method Summary
static String getClassName(String wgtnm)
          Returns the class name of the widget.
static void loadAll(Function f, boolean weave)
          Loads all packages requires by all widgets.
static void register(Array infs)
          Registers an arry of widget information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

all

public static Map all
A map (Map) of widget informations (readonly). The key is the widget name, such as textbox, and the value is the class name. However the value might be changed in the future, so it is better to iterate only the keys.

To add a mapping, use register(_global_.Array).

Method Detail

getClassName

public static String getClassName(String wgtnm)
Returns the class name of the widget.

Parameters:
wgtnm - the widget name, such as textbox
Returns:
String the class name, such as zul.inp.Textbox

register

public static void register(Array infs)
Registers an arry of widget information.

Parameters:
infs - an array of widget class names. For example, ['zul.wnd.Window', 'zul.inp.Textbox'].

loadAll

public static void loadAll(Function f,
                           boolean weave)
Loads all packages requires by all widgets. It is usually used in a visual designer, such as ZK Weaver, to make sure the classes of all widgets are available to use.

Parameters:
f - the function to run after all packages are loaded
weave - whether to load the package used for ZK weaver. For example, if a package is called zul.wnd, then we assume zul.wnd.wv is the package for widgets defined in zul.wnd to communicate with ZK Weaver.


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