org.zkoss.zk.au
Class AuRequests

java.lang.Object
  extended by org.zkoss.zk.au.AuRequests

public class AuRequests
extends java.lang.Object

Utilities to convert AuRequest to Event or its deriving classes.

Since:
5.0.0
Author:
tomyeh

Constructor Summary
AuRequests()
           
 
Method Summary
static
<T extends Component>
java.util.Set<T>
convertToItems(Desktop desktop, java.util.List<java.lang.String> uuids)
          Converts the data of the specified request to a set of Component.
static boolean getBoolean(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.String key)
          Returns whether the specified key is defined.
static java.lang.String getInnerWidth(AuRequest request)
          Returns the inner width of an AU request representing the update of inner width.
static int getInt(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.String key, int defVal)
          Returns the integer value of the specified key in the data.
static int getInt(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.String key, int defVal, boolean silent)
          Returns the integer value of the specified key in the data.
static long getLong(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.String key, long defVal)
          Returns the integer value of the specified key in the data.
static long getLong(java.util.Map<java.lang.String,java.lang.Object> data, java.lang.String key, long defVal, boolean silent)
          Returns the integer value of the specified key in the data.
static java.lang.Object getUpdateResult(AuRequest request)
          Returns the result of an AU request representing the update result.
static int parseKeys(java.util.Map<java.lang.String,java.lang.Object> data)
          Parses the key flags of a mouse event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuRequests

public AuRequests()
Method Detail

convertToItems

public static <T extends Component> java.util.Set<T> convertToItems(Desktop desktop,
                                                                    java.util.List<java.lang.String> uuids)
Converts the data of the specified request to a set of Component. The data is assumed to contain a list of item ID in the comman-separated format

Returns:
a set of components.

parseKeys

public static int parseKeys(java.util.Map<java.lang.String,java.lang.Object> data)
Parses the key flags of a mouse event.

Returns:
a combination of MouseEvent.ALT_KEY, MouseEvent.SHIFT_KEY and MouseEvent.CTRL_KEY,

getInnerWidth

public static java.lang.String getInnerWidth(AuRequest request)
                                      throws UiException
Returns the inner width of an AU request representing the update of inner width.

Throws:
UiException

getUpdateResult

public static java.lang.Object getUpdateResult(AuRequest request)
                                        throws UiException
Returns the result of an AU request representing the update result.

Throws:
UiException

getInt

public static int getInt(java.util.Map<java.lang.String,java.lang.Object> data,
                         java.lang.String key,
                         int defVal)
Returns the integer value of the specified key in the data. It is the same as getInt(data, key, defVal, false).

Parameters:
defVal - the default value; used if not found.

getLong

public static long getLong(java.util.Map<java.lang.String,java.lang.Object> data,
                           java.lang.String key,
                           long defVal)
Returns the integer value of the specified key in the data. It is the same as getLong(data, key, defVal, false).

Parameters:
defVal - the default value; used if not found.

getInt

public static int getInt(java.util.Map<java.lang.String,java.lang.Object> data,
                         java.lang.String key,
                         int defVal,
                         boolean silent)
Returns the integer value of the specified key in the data.

Parameters:
defVal - the default value; used if not found.
silent - whether not to throw an exception if failed to convert
Since:
5.0.2

getLong

public static long getLong(java.util.Map<java.lang.String,java.lang.Object> data,
                           java.lang.String key,
                           long defVal,
                           boolean silent)
Returns the integer value of the specified key in the data.

Parameters:
defVal - the default value; used if not found.
silent - whether not to throw an exception if failed to convert
Since:
5.0.2

getBoolean

public static boolean getBoolean(java.util.Map<java.lang.String,java.lang.Object> data,
                                 java.lang.String key)
Returns whether the specified key is defined.



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