Enterprise Information Portal APIs

com.ibm.mm.beans.util
Class CMBUtil

java.lang.Object
  |
  +--com.ibm.mm.beans.util.CMBUtil

public class CMBUtil
extends java.lang.Object

Utilities provides GUI-specific and this package-specific resource locating functions.

Since:
6.1

Field Summary
static int BOTTOM
          Frame/window location position
static int CENTER
           
static int LEFT
           
static int RIGHT
           
static int TOP
           
static java.lang.String UTIL_LITERAL_BUNDLE
          The resource file containing literals displayed in builder tools, including poperty display name, and short description.
static java.lang.String UTIL_MESSAGE_BUNDLE
          The message resource file containing design time and default runtime messages.
 
Constructor Summary
CMBUtil()
           
 
Method Summary
static java.lang.String getLiteralString(java.lang.String key)
          Get the literal string from resource bundle.
static java.lang.String getMessageString(java.lang.String key)
          Get the message string from resource bundle.
static void setLocation(java.awt.Window window, int pos)
          Set the window location in a screen.
static void setLocation(java.awt.Window window, int xPos, int yPos)
          Set the window location in a screen.
static void setWindowIconFromFile(java.awt.Frame frame, java.lang.String fileName)
          Set window icon from image file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTIL_LITERAL_BUNDLE

public static final java.lang.String UTIL_LITERAL_BUNDLE
The resource file containing literals displayed in builder tools, including poperty display name, and short description. The files are:
    CMBUtilLiteral.properties       - for default locale and English
    CMBUtilLiteral_it_IT.properties - for Italian
    CMBUtilLiteral_ja_JP.properties - for Japanese
    CMBUtilLiteral_zh_CN.properties - for simplified Chinese
    etc.
 
Application designer can modify these files to provide default values global to all applications.

UTIL_MESSAGE_BUNDLE

public static final java.lang.String UTIL_MESSAGE_BUNDLE
The message resource file containing design time and default runtime messages. The files are:
    CMBUtilMessage.properties       - for default locale and English
    CMBUtilMessage_it_IT.properties - for Italian
    CMBUtilMessage_ja_JP.properties - for Japanese
    CMBUtilMessage_zh_CN.properties - for simplified Chinese
    etc.
 
Application designer can modify these files to provide default values global to all applications.

CENTER

public static final int CENTER

TOP

public static final int TOP

BOTTOM

public static final int BOTTOM
Frame/window location position

LEFT

public static final int LEFT

RIGHT

public static final int RIGHT
Constructor Detail

CMBUtil

public CMBUtil()
Method Detail

getLiteralString

public static java.lang.String getLiteralString(java.lang.String key)
Get the literal string from resource bundle. Return "**Missing Resource**" if resource not found.
Parameters:
key - the resource ID
Returns:
the resource value

getMessageString

public static java.lang.String getMessageString(java.lang.String key)
Get the message string from resource bundle. Return "**Missing Resource**" if resource not found.
Parameters:
key - the resource ID
Returns:
the resource value

setLocation

public static void setLocation(java.awt.Window window,
                               int pos)
Set the window location in a screen. If position specified is horizontal, the vertical position will be centered; if position specified is vertical, the horizontal position will be centered.
Parameters:
window - the GUI object to set location for
pos - the position, can be CENTER, LEFT, RIGHT, TOP, or BOTTOM

setLocation

public static void setLocation(java.awt.Window window,
                               int xPos,
                               int yPos)
Set the window location in a screen.
Parameters:
window - the GUI object to set location for
xPos - the horizontal position, CENTER, LEFT, or RIGHT,
yPos - the vertical position, CENTER, TOP, or BOTTOM

setWindowIconFromFile

public static void setWindowIconFromFile(java.awt.Frame frame,
                                         java.lang.String fileName)
                                  throws java.lang.Exception
Set window icon from image file. JDK1.1 only supports GIF format.
Parameters:
frame - the window to set icon for
fileName - the image file name
Throws:
java.lang.Exception - if create image file failed

EIP JavaBeans

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.