org.zkoss.zk.ui.impl
Class Utils

java.lang.Object
  extended by org.zkoss.zk.ui.impl.Utils

public class Utils
extends java.lang.Object

Utilities to implement ZK.

Since:
5.0.7
Author:
tomyeh

Constructor Summary
Utils()
           
 
Method Summary
static ComponentInfo getComponentInfo(Component comp)
          Returns the component info associated with the given component, or null if not available.
static XMLResourcesLocator getXMLResourcesLocator()
          Returns the XML resources locator to locate metainfo/zk/config.xml, metainfo/zk/lang.xml, and metainfo/zk/lang-addon.xml
static boolean markClientInfoPerDesktop(Desktop desktop, java.lang.String key)
          Marks the per-desktop information of the given key will be generated, and returns true if the information is not generated yet (i.e., this method is NOT called with the given key).
static Composer newComposer(Page page, java.lang.Object o)
          Instantiates a composer of the given object.
static void setComponentInfo(Component comp, ComponentInfo info)
          Sets the component info for the given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

markClientInfoPerDesktop

public static boolean markClientInfoPerDesktop(Desktop desktop,
                                               java.lang.String key)
Marks the per-desktop information of the given key will be generated, and returns true if the information is not generated yet (i.e., this method is NOT called with the given key). You could use this method to minimize the bytes to be sent to the client if the information is required only once per desktop.


getXMLResourcesLocator

public static XMLResourcesLocator getXMLResourcesLocator()
Returns the XML resources locator to locate metainfo/zk/config.xml, metainfo/zk/lang.xml, and metainfo/zk/lang-addon.xml


newComposer

public static Composer newComposer(Page page,
                                   java.lang.Object o)
                            throws java.lang.Exception
Instantiates a composer of the given object. This method will invoke UiFactory.newComposer(org.zkoss.zk.ui.Page, java.lang.Class) to instantiate the composer if page is not null.

Parameters:
page - the page that the composer will be created for. Ignored if null.
o - the composer instance, the class of the composer to instantiate, or the name of the class of the composer. If o is an instance of Composer, it is returned directly.
Throws:
java.lang.Exception

getComponentInfo

public static ComponentInfo getComponentInfo(Component comp)
Returns the component info associated with the given component, or null if not available.

It is used only internally.


setComponentInfo

public static void setComponentInfo(Component comp,
                                    ComponentInfo info)
Sets the component info for the given component.

It is used only internally.



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