com.ibm.di.admin
Class UserInterface

java.lang.Object
  extended by com.ibm.di.admin.UserInterface

public class UserInterface
extends Object

This class is used by miadmin to obtain the class name and other properties of the component responsible for viewing/editing a configuration object. When a configuration object is about to be opened, miadmin calls the getUserInterfaceFor() method passing the configuration object. This class will then consult the ui.properties resource for a keyword that is either the configuration object's class name or one of its implemented interface names. The resulting value (or the class name) is then expected to have a number of properties defined for it:


Field Summary
static String UI_CLASS
          Key property name for Class
static String UI_FONT
          Key property name for Font
static String UI_SMALL_ICON
          Key property name for Icon
static String UI_TITLE
          Key property name for Title
static String UI_TYPE
          Key property name for Type
 
Constructor Summary
UserInterface()
          Constructor for the UserInterface object
UserInterface(String implClass, String implType, Icon implIcon, String title, Font font)
          Constructor for the UserInterface object
 
Method Summary
static void checkConfigParams(UserInterface ui, String name, String leaf, Object config)
          Checks the config object's parameters for further expansion of parameters.
 String getClassName()
          Gets the className attribute of the UserInterface object
 Font getFont()
          Gets the font attribute of the UserInterface object
static Font getFontFor(String name, String leaf)
          Gets the fontFor attribute of the UserInterface class
static Icon getIconFor(String name, String leaf)
          Gets the iconFor attribute of the UserInterface class
 Object getProperty(Object key)
          Gets the property attribute of the UserInterface object
 Icon getSmallIcon()
          Gets the smallIcon attribute of the UserInterface object
static String getStringFor(String name, String leaf, String key)
          Returns the string for a given key.
 String getTitle()
          Gets the title attribute of the UserInterface object
 String getType()
          Gets the type attribute of the UserInterface object
static UserInterface getUserInterfaceFor(String name, Object config)
          This method resolves the configuration object into a UI component that will handle visual display of the object.
 void setProperty(Object key, Object value)
          Sets the property attribute of the UserInterface object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_CLASS

public static final String UI_CLASS
Key property name for Class

See Also:
Constant Field Values

UI_TYPE

public static final String UI_TYPE
Key property name for Type

See Also:
Constant Field Values

UI_SMALL_ICON

public static final String UI_SMALL_ICON
Key property name for Icon

See Also:
Constant Field Values

UI_TITLE

public static final String UI_TITLE
Key property name for Title

See Also:
Constant Field Values

UI_FONT

public static final String UI_FONT
Key property name for Font

See Also:
Constant Field Values
Constructor Detail

UserInterface

public UserInterface()
Constructor for the UserInterface object


UserInterface

public UserInterface(String implClass,
                     String implType,
                     Icon implIcon,
                     String title,
                     Font font)
Constructor for the UserInterface object

Parameters:
implClass - specifies Class name
implType - specifies implementation Type
implIcon - specifies Icon to be used with this user interface
title - specifies title
font - specifies font
Method Detail

getUserInterfaceFor

public static UserInterface getUserInterfaceFor(String name,
                                                Object config)
This method resolves the configuration object into a UI component that will handle visual display of the object.

Parameters:
name - specifies name for this user interface
config - specifies configuration object
Returns:
User Interface component for this config object

checkConfigParams

public static void checkConfigParams(UserInterface ui,
                                     String name,
                                     String leaf,
                                     Object config)
Checks the config object's parameters for further expansion of parameters.


getStringFor

public static String getStringFor(String name,
                                  String leaf,
                                  String key)
Returns the string for a given key.

Parameters:
name - specifies name to be used with this key
leaf - specifies leaf to be used with this key
key - specifies key
Returns:
String for a given key

getIconFor

public static Icon getIconFor(String name,
                              String leaf)
Gets the iconFor attribute of the UserInterface class

Parameters:
name - specifies name for icon
leaf - specifies leaf for icon
Returns:
Icon for given name

getFontFor

public static Font getFontFor(String name,
                              String leaf)
Gets the fontFor attribute of the UserInterface class

Parameters:
name - specifies name for font
leaf - specifies leaf for font
Returns:
Font for given name

setProperty

public void setProperty(Object key,
                        Object value)
Sets the property attribute of the UserInterface object

Parameters:
key - The new property value
value - The new property value

getClassName

public String getClassName()
Gets the className attribute of the UserInterface object

Returns:
The className value

getType

public String getType()
Gets the type attribute of the UserInterface object

Returns:
The type value

getSmallIcon

public Icon getSmallIcon()
Gets the smallIcon attribute of the UserInterface object

Returns:
The smallIcon value

getTitle

public String getTitle()
Gets the title attribute of the UserInterface object

Returns:
The title value

getFont

public Font getFont()
Gets the font attribute of the UserInterface object

Returns:
The font value

getProperty

public Object getProperty(Object key)
Gets the property attribute of the UserInterface object

Parameters:
key - specifies key
Returns:
The property value for given key