com.altair.hwm.beans.utils
Class HWMBeanUtils

java.lang.Object
  extended by com.altair.hwm.beans.utils.HWMBeanUtils

public class HWMBeanUtils
extends java.lang.Object

Title: HWMBeanUtils

Description: This is the utility class for the beans. It will contain the generic helper methods common to some beans and constants

Company: Altair Engineering, Inc.


Field Summary
static int ALTAIR_BTN_WIDTH
          The constant for button width
static int ALTAIR_COMBO_WIDTH
          The constant for combo box width
static int ALTAIR_CTRL_HEIGHT
          The constant for control height
static int ALTAIR_CTRL_MIN_WIDTH
          The minimum width for Altair widgets
static int ALTAIR_LABEL_WIDTH
          The constant for label width
static int ALTAIR_SPC_CTRL
          The constant for space between a ctrl and another ctrl
static int ALTAIR_SPC_EDGE
          The constant for space between a ctrl and an edge
static int ALTAIR_SPINNER_WIDTH
          The constant for spinner width
static int ALTAIR_TXT_WIDTH
          The constant for text field width
static java.lang.String BEANS_DIR_NAME
          The dir name under which we should serach for beans
static java.lang.String BIN_DIR_NAME
          The name for the directory where all the executable jars are placed
static java.lang.String DB_DIR_SUFFIX
          The dir name for the DB
static boolean DEBUG_MODE
          Set to true if its in debug mode else false.
static java.lang.String DEBUG_PROP_NAME
          The property name set via the cmd line -D option for setting the debug mode
static java.lang.String DEF_HM_SESSION
          The default HyperMesh session name
static java.lang.String DEF_HW_SESSION
          The default HyperWorks session name
static java.lang.String DEF_TPL_PROP_NAME
          The property name set via the cmd line -D option for setting the default template to use while creatinga project
static java.lang.String HELP_DIR_NAME
          The name of the help file folder
static java.lang.String ICON_DIR_NAME
          The name of the icon file folder
static java.lang.String INSTANCE_FILE_EXT
          The extension used for insatnce files
static java.lang.String JAVA_VERSION
          The java version being used
static java.lang.String LIB_DIR_NAME
          The name for the directory where all the library jars are placed
static java.lang.String MODULE_DIR_NAME
          The name of the TCL modules file folder
static java.lang.String MODULEINC_DIR_NAME
          The name of the TCL include modules file folder
static java.lang.String PAGE_FILE_EXT
          The extension used for insatnce files
static java.lang.String PAGE_FILE_TCL_EXT
          The extension used for exporting TCL files
static java.lang.String PROP_EPIC_HOME
          The sys property name for epic home
static java.lang.String PROP_EPIC_ICONS_DIR
          The sys property name for epic icons dir path
static java.lang.String PROP_EPIC_LIB_DIR
          The sys property name for epic lib dir path
static java.lang.String PROP_HWPM
          The property name expected with the -D flag
static java.lang.String SCRIPT_EXT
          The extension used for script files used to create a database.
static java.lang.String TCL_WIDGET_PREFIX
          As a page is automatially written as a TCL file, each widget gets name based on the instance name.
static java.lang.String TEMPLATE_FILE_EXT
          The extension used for template files
static java.awt.Dimension TOOLBAR_BTN_SIZE
          The constant for the button size for toolbar
static java.lang.String TREE_FILE_EXT
          The extension used for files used to define the generic tree view.
 
Constructor Summary
HWMBeanUtils()
           
 
Method Summary
static java.awt.Component GetMainComponent()
          Gets one of the winodw/frame/dialogs for this app
static java.awt.Window GetWindow(java.awt.Component comp)
          Gets the winodw/frame or dialog this component is present in
static boolean IsExternalizable(java.lang.Class classBean)
          Test whether the class is externalizable
static void KeepWindowOnTop(java.awt.Window window, boolean bTop)
          If Java 5.0 is being used, get the setAlywasOnTop method on the component using reflection.
static javax.swing.ImageIcon LoadIcon(java.lang.String strIconName)
          Loads the given icon
static void SetMnemonic(javax.swing.JComponent comp, int nMnemonic)
          Set the mnemonics for the component.
static java.lang.Process ShowHelpFile(java.lang.String strHelpFile)
          Show the given help topic
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIB_DIR_NAME

public static final java.lang.String LIB_DIR_NAME
The name for the directory where all the library jars are placed

See Also:
Constant Field Values

BIN_DIR_NAME

public static final java.lang.String BIN_DIR_NAME
The name for the directory where all the executable jars are placed

See Also:
Constant Field Values

DEBUG_PROP_NAME

public static final java.lang.String DEBUG_PROP_NAME
The property name set via the cmd line -D option for setting the debug mode

See Also:
Constant Field Values

DEF_TPL_PROP_NAME

public static final java.lang.String DEF_TPL_PROP_NAME
The property name set via the cmd line -D option for setting the default template to use while creatinga project

See Also:
Constant Field Values

BEANS_DIR_NAME

public static final java.lang.String BEANS_DIR_NAME
The dir name under which we should serach for beans

See Also:
Constant Field Values

DB_DIR_SUFFIX

public static final java.lang.String DB_DIR_SUFFIX
The dir name for the DB

See Also:
Constant Field Values

PROP_HWPM

public static final java.lang.String PROP_HWPM
The property name expected with the -D flag

See Also:
Constant Field Values

DEBUG_MODE

public static boolean DEBUG_MODE
Set to true if its in debug mode else false. If true, DebugOutput method will print the message passed to it else it does nothing.


PROP_EPIC_HOME

public static final java.lang.String PROP_EPIC_HOME
The sys property name for epic home

See Also:
Constant Field Values

PROP_EPIC_ICONS_DIR

public static final java.lang.String PROP_EPIC_ICONS_DIR
The sys property name for epic icons dir path

See Also:
Constant Field Values

PROP_EPIC_LIB_DIR

public static final java.lang.String PROP_EPIC_LIB_DIR
The sys property name for epic lib dir path

See Also:
Constant Field Values

HELP_DIR_NAME

public static final java.lang.String HELP_DIR_NAME
The name of the help file folder

See Also:
Constant Field Values

ICON_DIR_NAME

public static final java.lang.String ICON_DIR_NAME
The name of the icon file folder

See Also:
Constant Field Values

MODULE_DIR_NAME

public static final java.lang.String MODULE_DIR_NAME
The name of the TCL modules file folder

See Also:
Constant Field Values

MODULEINC_DIR_NAME

public static final java.lang.String MODULEINC_DIR_NAME
The name of the TCL include modules file folder

See Also:
Constant Field Values

TCL_WIDGET_PREFIX

public static final java.lang.String TCL_WIDGET_PREFIX
As a page is automatially written as a TCL file, each widget gets name based on the instance name. Thw widget name is obtained by prefixing the instance nameTCL_WIDGET_PREFIX

See Also:
Constant Field Values

TOOLBAR_BTN_SIZE

public static final java.awt.Dimension TOOLBAR_BTN_SIZE
The constant for the button size for toolbar


SCRIPT_EXT

public static final java.lang.String SCRIPT_EXT
The extension used for script files used to create a database.

See Also:
Constant Field Values

TREE_FILE_EXT

public static final java.lang.String TREE_FILE_EXT
The extension used for files used to define the generic tree view.

See Also:
Constant Field Values

JAVA_VERSION

public static java.lang.String JAVA_VERSION
The java version being used


DEF_HW_SESSION

public static final java.lang.String DEF_HW_SESSION
The default HyperWorks session name

See Also:
Constant Field Values

DEF_HM_SESSION

public static final java.lang.String DEF_HM_SESSION
The default HyperMesh session name

See Also:
Constant Field Values

TEMPLATE_FILE_EXT

public static final java.lang.String TEMPLATE_FILE_EXT
The extension used for template files

See Also:
Constant Field Values

INSTANCE_FILE_EXT

public static final java.lang.String INSTANCE_FILE_EXT
The extension used for insatnce files

See Also:
Constant Field Values

PAGE_FILE_EXT

public static final java.lang.String PAGE_FILE_EXT
The extension used for insatnce files

See Also:
Constant Field Values

PAGE_FILE_TCL_EXT

public static final java.lang.String PAGE_FILE_TCL_EXT
The extension used for exporting TCL files

See Also:
Constant Field Values

ALTAIR_CTRL_HEIGHT

public static final int ALTAIR_CTRL_HEIGHT
The constant for control height

See Also:
Constant Field Values

ALTAIR_BTN_WIDTH

public static final int ALTAIR_BTN_WIDTH
The constant for button width

See Also:
Constant Field Values

ALTAIR_LABEL_WIDTH

public static final int ALTAIR_LABEL_WIDTH
The constant for label width

See Also:
Constant Field Values

ALTAIR_TXT_WIDTH

public static final int ALTAIR_TXT_WIDTH
The constant for text field width

See Also:
Constant Field Values

ALTAIR_COMBO_WIDTH

public static final int ALTAIR_COMBO_WIDTH
The constant for combo box width

See Also:
Constant Field Values

ALTAIR_SPC_CTRL

public static final int ALTAIR_SPC_CTRL
The constant for space between a ctrl and another ctrl

See Also:
Constant Field Values

ALTAIR_SPC_EDGE

public static final int ALTAIR_SPC_EDGE
The constant for space between a ctrl and an edge

See Also:
Constant Field Values

ALTAIR_CTRL_MIN_WIDTH

public static final int ALTAIR_CTRL_MIN_WIDTH
The minimum width for Altair widgets

See Also:
Constant Field Values

ALTAIR_SPINNER_WIDTH

public static final int ALTAIR_SPINNER_WIDTH
The constant for spinner width

See Also:
Constant Field Values
Constructor Detail

HWMBeanUtils

public HWMBeanUtils()
Method Detail

LoadIcon

public static javax.swing.ImageIcon LoadIcon(java.lang.String strIconName)
Loads the given icon

Parameters:
strIconName - the file name for the icon
Returns:
ImageIcon The image icon object

IsExternalizable

public static boolean IsExternalizable(java.lang.Class classBean)
Test whether the class is externalizable

Parameters:
classBean - The class to test
Returns:
boolean True if externalizable, false if not.

SetMnemonic

public static void SetMnemonic(javax.swing.JComponent comp,
                               int nMnemonic)
Set the mnemonics for the component. This ignores the call on UNIX platforms as there is bug on unix platforms in setting mnmonics.

Parameters:
comp - The component to set mnemonic. can be one of: JButton, JMenuItem, JMenu
nMnemonic - The mnemonic to use

GetWindow

public static java.awt.Window GetWindow(java.awt.Component comp)
Gets the winodw/frame or dialog this component is present in

Parameters:
comp - Component whose container should be returned.
Returns:
Window the window in which comp is contained.

GetMainComponent

public static java.awt.Component GetMainComponent()
Gets one of the winodw/frame/dialogs for this app

Returns:
Component the component for this application. It can be null.

ShowHelpFile

public static java.lang.Process ShowHelpFile(java.lang.String strHelpFile)
Show the given help topic

Parameters:
strHelpFile - The help file to show
Returns:
Process The help process

KeepWindowOnTop

public static void KeepWindowOnTop(java.awt.Window window,
                                   boolean bTop)
If Java 5.0 is being used, get the setAlywasOnTop method on the component using reflection.

Parameters:
window -
bTop -