org.zkoss.zk.ui.ext
Interface Native.Helper

All Known Implementing Classes:
HtmlNativeComponent.HtmlHelper
Enclosing interface:
Native

public static interface Native.Helper

The helper to generate the output for the native component. It usually depends on the client (i.e., Desktop.getDevice().


Method Summary
 void appendText(java.lang.StringBuffer sb, java.lang.String text)
          Appends the text.
 void getFirstHalf(java.lang.StringBuffer sb, java.lang.String tag, java.util.Map props, java.util.Collection namespaces)
          Generates the first half of the device-dependent content for the specified tag and properties, and appends it to the specified string buffer.
 void getSecondHalf(java.lang.StringBuffer sb, java.lang.String tag)
          Appends the first half of the device-dependent content for the specified tag and properties, and appends it to the specified string buffer.
 Component newNative(java.lang.String text)
          Creates a native component with the specified content.
 

Method Detail

newNative

Component newNative(java.lang.String text)
Creates a native component with the specified content.


getFirstHalf

void getFirstHalf(java.lang.StringBuffer sb,
                  java.lang.String tag,
                  java.util.Map props,
                  java.util.Collection namespaces)
Generates the first half of the device-dependent content for the specified tag and properties, and appends it to the specified string buffer.

For example, getFirstHalf(sb, "tr", null) appends "<tr>" to sb, and getFirstHalf(sb, "br", ) appends "<br/>".

Parameters:
sb - the string buffer to append the result (never null)
tag - the tag name (never null)
props - a map of name and value pairs or null if no properties at all. Note: the value doesn't contain any EL expression.
namespaces - a list of Namespace to be generated, or null if not. Note: EL expressions is not allowed

getSecondHalf

void getSecondHalf(java.lang.StringBuffer sb,
                   java.lang.String tag)
Appends the first half of the device-dependent content for the specified tag and properties, and appends it to the specified string buffer.

For example, appendSecpmdHalf(sb, "tr") appends "</tr>" to sb, and getSecondHalf(sb, "br") appends "".

Parameters:
sb - the string buffer to append the result (never null)
tag - the tag name (never null)

appendText

void appendText(java.lang.StringBuffer sb,
                java.lang.String text)
Appends the text.

Parameters:
text - the text content to append


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.