SPT Core API

com.sptci.echo2
Class Dimensions

java.lang.Object
  extended by com.sptci.echo2.Dimensions

public class Dimensions
extends Object

A utility class that is used to load and retrieve the localised configurable dimensions for UI components. This class needs an active ApplicationInstance to be properly initialised.

Note: Always use getExtent( String ) variant over getInt( String ) variant as the former is more flexible in terms of configuring units.

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: Dimensions.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2006-11-23
See Also:
ExtentKit

Method Summary
static Extent getExtent(Class source, String key)
          Returns an Extent corresponding to the configured value for the key for the specified source object.
static Extent getExtent(Object source, String key)
          Returns an Extent corresponding to the configured value for the key for the specified source object.
static Extent getExtent(String key)
          Returns configured extent value for the key.
static int getInt(Class source, String key)
          Returns configured integer value for the key for the specified source object.
static int getInt(Object source, String key)
          Returns configured integer value for the key for the specified source object.
static int getInt(String key)
          Returns configured integer value for the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInt

public static int getInt(Object source,
                         String key)
Returns configured integer value for the key for the specified source object. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The object whose configured localised value is to be retrieved.
key - The key of the integer value to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)
See Also:
getInt( Class, String )

getInt

public static int getInt(Class source,
                         String key)
Returns configured integer value for the key for the specified source object. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The class whose configured localised value is to be retrieved.
key - The key of the integer value to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)
See Also:
getInt( String )

getInt

public static int getInt(String key)
Returns configured integer value for the key.

Parameters:
key - The key of the integer value to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)

getExtent

public static Extent getExtent(Object source,
                               String key)
Returns an Extent corresponding to the configured value for the key for the specified source object. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The object whose configured localised value is to be retrieved.
key - The key of the extent to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)
See Also:
getExtent( Class, String )

getExtent

public static Extent getExtent(Class source,
                               String key)
Returns an Extent corresponding to the configured value for the key for the specified source object. Look for a key that is named after the fully qualified class name of the source object.

Parameters:
source - The class whose configured localised value is to be retrieved.
key - The key of the extent to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)
See Also:
getExtent( String )

getExtent

public static Extent getExtent(String key)
Returns configured extent value for the key.

Parameters:
key - The key of the extent to be returned
Returns:
The appropriate value (if the key is not defined, the value 0 is returned)

SPT Core API