com.altair.hwm.beans.hm
Class HMStart

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.AbstractButton
                  extended by javax.swing.JButton
                      extended by com.altair.hwm.beans.utils.HWMButton
                          extended by com.altair.hwm.beans.hm.HMStart
All Implemented Interfaces:
HWMEventListener, IHWMControl, ITCLCodeCreator, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Externalizable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants

public class HMStart
extends HWMButton
implements java.io.Externalizable, java.beans.PropertyChangeListener

Title: HMStart

Description: This bean allows the user to stat Hypermesh and establish communication channel with it.

Company: Altair Engineering, Inc.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static java.lang.String HW_APP_HF
           
static java.lang.String HW_APP_HG
           
static java.lang.String HW_APP_HM
          The app type
static java.lang.String HW_APP_HV
           
static java.lang.String HW_APP_HYPERGRAPH3D
           
static java.lang.String HW_APP_MEDIAVIEW
           
static java.lang.String HW_APP_MV
           
static java.lang.String HW_APP_TEXTVIEW
           
static int METH_START_HM
          List of Method IDs that will fire HWMCmdEvent
static java.lang.String PROP_APP_TYPE
           
static java.lang.String PROP_HM_AUTOMODE
          Property for automatic mode
static java.lang.String PROP_HM_PATH
          The property name for the HM path
static java.lang.String PROP_SESSION_NAME
          The property name for the session name used to communicate with HyperMesh
static java.lang.String PROP_WORKING_DIR
          The property name for the Working dir to use
static java.lang.String VERSION
          The version ID for this component
 
Fields inherited from class com.altair.hwm.beans.utils.HWMButton
BTNTYPE_APPLY, BTNTYPE_APPLY_AND_NEXT, BTNTYPE_CANCEL, BTNTYPE_GENERIC, BTNTYPE_NEXT, BTNTYPE_PREV
 
Fields inherited from class javax.swing.AbstractButton
BORDER_PAINTED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HMStart()
          Constructor
 
Method Summary
 java.lang.String GetAppType()
          Returns the HW App Type (HM/HV/HG/MV/etc.)
 boolean GetAutoMode()
          Find out whether the bean has been designed to start HM automatically
 java.lang.String GetHMPath()
          Returns the HM path
 java.lang.String GetSessionName()
          Returns the session name for HM communication
 java.lang.String GetWorkingDir()
          Returns the working directory
 void OnAction()
          Starts HM when the button is pressed
 void OnExit()
          The OnExit method is called when this bean is being removed.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          This method gets called when a bound property is changed.
 void readExternal(java.io.ObjectInput objInput)
          Loads the version and then calls the appropriate read function for the version
 void SetAppType(java.lang.String strAppType)
          Sets the HW App Type (HM/HV/HG/MV/etc.)
 void SetAutoMode(boolean bAutoMode)
          Setup the bean to start HM automatically or not
 void SetAutoMode(boolean bAutoMode, boolean bUpdateDataModel)
          Setup the bean to start HM automatically or not
 void SetBeanName(java.lang.String strBeanName)
          Set the name of the bean
 void SetFrameWork(IHWMFrameWork hwmFrameWork)
          Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes
 void SetHMPath(java.lang.String strHMPath)
          Sets the HM path
 void SetSessionName(java.lang.String strSessionName)
          Sets the session name for HM communication
 void SetWorkingDir(java.lang.String strWorkingDir)
          Sets the working directory
 java.lang.String TCLCreateAdditionalEventProcs()
          This method rerurns the TCL statement string for any additional procedures that is requred for the bean.
 void writeExternal(java.io.ObjectOutput objOutput)
          Save the persistent properties
 
Methods inherited from class com.altair.hwm.beans.utils.HWMButton
actionPerformed, addHWMCmdEventListener, Disable, Enable, GetActionScript, GetBeanName, GetButtonType, GetFrameWork, GetImageAlignment, GetImageFilename, GetImageVisibilityStatus, getToolTipText, HWMEventCallback, Play, ReadProperties, removeHWMCmdEventListener, Run, SaveProperties, SetActionScript, SetButtonType, SetButtonType, setEnabled, SetIconOnButton, SetImageAlignment, SetImageFilename, SetImageFilename, SetImageVisibilityStatus, setPreferredSize, setSize, setText, setToolTipText, setVisible, TCLCreateExec, TCLCreateGetDataFromDataModel, TCLCreateMemberVariables, TCLCreateOnDataModelChanged, TCLCreateSetDataInDataModel, TCLCreateUI
 
Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, removeNotify, setDefaultCapable, updateUI
 
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, doClick, doClick, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setUI, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
The version ID for this component

See Also:
Constant Field Values

PROP_SESSION_NAME

public static final java.lang.String PROP_SESSION_NAME
The property name for the session name used to communicate with HyperMesh

See Also:
Constant Field Values

PROP_HM_PATH

public static final java.lang.String PROP_HM_PATH
The property name for the HM path

See Also:
Constant Field Values

PROP_APP_TYPE

public static final java.lang.String PROP_APP_TYPE
See Also:
Constant Field Values

PROP_HM_AUTOMODE

public static final java.lang.String PROP_HM_AUTOMODE
Property for automatic mode

See Also:
Constant Field Values

PROP_WORKING_DIR

public static final java.lang.String PROP_WORKING_DIR
The property name for the Working dir to use

See Also:
Constant Field Values

METH_START_HM

public static final int METH_START_HM
List of Method IDs that will fire HWMCmdEvent

See Also:
Constant Field Values

HW_APP_HM

public static final java.lang.String HW_APP_HM
The app type

See Also:
Constant Field Values

HW_APP_HF

public static final java.lang.String HW_APP_HF
See Also:
Constant Field Values

HW_APP_HV

public static final java.lang.String HW_APP_HV
See Also:
Constant Field Values

HW_APP_HG

public static final java.lang.String HW_APP_HG
See Also:
Constant Field Values

HW_APP_MV

public static final java.lang.String HW_APP_MV
See Also:
Constant Field Values

HW_APP_HYPERGRAPH3D

public static final java.lang.String HW_APP_HYPERGRAPH3D
See Also:
Constant Field Values

HW_APP_MEDIAVIEW

public static final java.lang.String HW_APP_MEDIAVIEW
See Also:
Constant Field Values

HW_APP_TEXTVIEW

public static final java.lang.String HW_APP_TEXTVIEW
See Also:
Constant Field Values
Constructor Detail

HMStart

public HMStart()
Constructor

Method Detail

SetBeanName

public void SetBeanName(java.lang.String strBeanName)
Set the name of the bean

Specified by:
SetBeanName in interface IHWMControl
Overrides:
SetBeanName in class HWMButton
Parameters:
strBeanName - The name of this bean as the framework knows it to be. Will be useful, if the bean chooses to scope its data in the datamodel - especially if multiple instances of the same bean appear in the process

SetFrameWork

public void SetFrameWork(IHWMFrameWork hwmFrameWork)
Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes

Specified by:
SetFrameWork in interface IHWMControl
Overrides:
SetFrameWork in class HWMButton
Parameters:
hwmFrameWork - The interface which allows the communication between beans and the container frame

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
This method gets called when a bound property is changed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class HWMButton
Parameters:
evt - - A PropertyChangeEvent object describing the event source and the property that has changed.

OnAction

public void OnAction()
Starts HM when the button is pressed

Overrides:
OnAction in class HWMButton
Parameters:
actionEvt - The action event object (See Java docs for help)

writeExternal

public void writeExternal(java.io.ObjectOutput objOutput)
                   throws java.io.IOException
Save the persistent properties

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class HWMButton
Parameters:
objOutput - The stream to which data will be written
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput objInput)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Loads the version and then calls the appropriate read function for the version

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class HWMButton
Parameters:
objInput - The stream from which data will be read
Throws:
IOException, - ClassNotFoundException
java.lang.ClassNotFoundException
java.io.IOException

SetHMPath

public void SetHMPath(java.lang.String strHMPath)
Sets the HM path

Parameters:
strHMPath - The path name to HM

GetHMPath

public java.lang.String GetHMPath()
Returns the HM path

Returns:
String The path name to HM

SetAppType

public void SetAppType(java.lang.String strAppType)
Sets the HW App Type (HM/HV/HG/MV/etc.)

Parameters:
strAppType - The app type

GetAppType

public java.lang.String GetAppType()
Returns the HW App Type (HM/HV/HG/MV/etc.)

Returns:
String The app type

SetSessionName

public void SetSessionName(java.lang.String strSessionName)
Sets the session name for HM communication

Parameters:
strSessionName - The session name for HM Comm

GetSessionName

public java.lang.String GetSessionName()
Returns the session name for HM communication

Returns:
String The session name for HM Comm

SetWorkingDir

public void SetWorkingDir(java.lang.String strWorkingDir)
Sets the working directory

Parameters:
strWorkingDir - The working dir

GetWorkingDir

public java.lang.String GetWorkingDir()
Returns the working directory

Parameters:
String - The working dir

SetAutoMode

public void SetAutoMode(boolean bAutoMode)
Setup the bean to start HM automatically or not


SetAutoMode

public void SetAutoMode(boolean bAutoMode,
                        boolean bUpdateDataModel)
Setup the bean to start HM automatically or not

Parameters:
bUpdateDataModel - Flag denoting whether this needs to be updated in the datamodel

GetAutoMode

public boolean GetAutoMode()
Find out whether the bean has been designed to start HM automatically

Returns:
boolean The auto mode flag

OnExit

public void OnExit()
The OnExit method is called when this bean is being removed. It is a part of the IHWMControl interface implemented by the base class.

Specified by:
OnExit in interface IHWMControl
Overrides:
OnExit in class HWMButton

TCLCreateAdditionalEventProcs

public java.lang.String TCLCreateAdditionalEventProcs()
This method rerurns the TCL statement string for any additional procedures that is requred for the bean. For e.g: In the case of a "Browse" button, there should be a "OnBrowseFile" procedure which is the callback for the "Browse" button. The TCL equivalent code ffor creating that proceudre will be returned by this methos. The bean in question will implement the required procediures code generation.

Specified by:
TCLCreateAdditionalEventProcs in interface ITCLCodeCreator
Overrides:
TCLCreateAdditionalEventProcs in class HWMButton