com.altair.hwm.beans.hm
Class HMImport

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.altair.hwm.beans.utils.HWMBasePanel
                      extended by com.altair.hwm.beans.hm.HMImport
All Implemented Interfaces:
HWMEventListener, IHWMControl, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Externalizable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class HMImport
extends HWMBasePanel
implements java.io.Externalizable, java.awt.event.ActionListener, java.beans.PropertyChangeListener

Title: HMImport

Description: Imports a model into Hypermesh

Copyright Copyright (c) 2001 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_HM
           
static int METH_IMPORTFILE
          Method ID for which HWMCmdEvent will be fired
static int METH_START_HM
           
static java.lang.String PROP_FILENAME
           
static java.lang.String PROP_FILETYPE
           
static java.lang.String PROP_SESSION_NAME
          List of property names for this bean for which propertyChange event will be fired
static java.lang.String VERSION
           
static java.lang.String VERSION1
           
 
Fields inherited from class com.altair.hwm.beans.utils.HWMBasePanel
BASE_VERSION
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HMImport()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Callback for import model button and file type combo box
 void Disable()
          Disables the UI
 void Enable()
          Enables the UI
 void FillFileTypeCombo()
          Fill combo box for file type
 java.lang.String GetFileBrowserBtnLabel()
          Returns the file browser button label
 java.lang.String GetFileLabel()
          Returns the the File name label
 java.lang.String GetFileName()
          Returns selected file
 java.lang.String GetFileType()
          Returns the selected file type
 java.lang.String GetImportBtnLabel()
          Returns the import button label
 java.lang.String GetSessionName()
          Returns the session name for HM communication
 void ImportModel()
          Imports the selected model into Hypermesh
 void propertyChange(java.beans.PropertyChangeEvent propChangeEvt)
          When the file name is changed either by the file browser or by typing in text in the text field, import panel is updated.
 void readExternal(java.io.ObjectInput objInput)
          Reads the Object
 void ReadProperties()
          Get the required properties from the datamodel and initialize self
 void SaveProperties()
          Save the required properties in the datamodel (so that they persist)
 void setEnabled(boolean bEnable)
          Enables/disable the UI
 void SetFileBrowserBtnLabel(java.lang.String strLabel)
          Sets the file browser button label
 void SetFileLabel(java.lang.String strLabel)
          Sets the File type label
 void SetFileName(java.lang.String szFileName)
          Sets selected file name
 void SetFileType(java.lang.String strFileType)
          Sets the selected file type
 void SetFrameWork(IHWMFrameWork hwmFrameWork)
          Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes
 void SetImportBtnLabel(java.lang.String strLabel)
          Sets the Import button label
 void SetSessionName(java.lang.String strSessionName)
          Sets the session name for HM communication
 void writeExternal(java.io.ObjectOutput objOutput)
          Writes the Object
 
Methods inherited from class com.altair.hwm.beans.utils.HWMBasePanel
addHWMCmdEventListener, GetBeanName, GetFrameWork, HWMEventCallback, OnExit, Play, removeHWMCmdEventListener, Run, setBackground, SetBeanName, setFont, setForeground
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
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, 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, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, 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, setLayout, 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, imageUpdate, 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, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_SESSION_NAME

public static final java.lang.String PROP_SESSION_NAME
List of property names for this bean for which propertyChange event will be fired

See Also:
Constant Field Values

PROP_FILENAME

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

PROP_FILETYPE

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

VERSION

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

VERSION1

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

METH_IMPORTFILE

public static final int METH_IMPORTFILE
Method ID for which HWMCmdEvent will be fired

See Also:
Constant Field Values

METH_START_HM

public static final int METH_START_HM
See Also:
Constant Field Values

HW_APP_HM

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

HMImport

public HMImport()
Constructor

Method Detail

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 HWMBasePanel
Parameters:
hwmFrameWork - The interface which allows the communication between beans and the container frame

FillFileTypeCombo

public void FillFileTypeCombo()
Fill combo box for file type


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Callback for import model button and file type combo box

Specified by:
actionPerformed in interface java.awt.event.ActionListener

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent propChangeEvt)
When the file name is changed either by the file browser or by typing in text in the text field, import panel is updated.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
propChangeEvt -

ImportModel

public void ImportModel()
Imports the selected model into Hypermesh


SaveProperties

public void SaveProperties()
Save the required properties in the datamodel (so that they persist)

Overrides:
SaveProperties in class HWMBasePanel

ReadProperties

public void ReadProperties()
Get the required properties from the datamodel and initialize self

Overrides:
ReadProperties in class HWMBasePanel

writeExternal

public void writeExternal(java.io.ObjectOutput objOutput)
                   throws java.io.IOException
Writes the Object

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class HWMBasePanel
Parameters:
ObjectOutput - The stream to which this instance is to be written into.
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput objInput)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Reads the Object

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class HWMBasePanel
Parameters:
ObjectInput - The stream from which data is to be read from.
Throws:
IOException, - ClassNotFoundException
java.lang.ClassNotFoundException
java.io.IOException

GetSessionName

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

Returns:
String The session name for HM Comm

SetSessionName

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

Parameters:
strSessionName - The session name for HM Comm

GetFileType

public java.lang.String GetFileType()
Returns the selected file type

Returns:
String The file type selected

SetFileType

public void SetFileType(java.lang.String strFileType)
Sets the selected file type

Parameters:
String - The file type selected

SetImportBtnLabel

public void SetImportBtnLabel(java.lang.String strLabel)
Sets the Import button label

Parameters:
strLabel - Import button label

GetImportBtnLabel

public java.lang.String GetImportBtnLabel()
Returns the import button label

Returns:
String Import button label

SetFileBrowserBtnLabel

public void SetFileBrowserBtnLabel(java.lang.String strLabel)
Sets the file browser button label

Parameters:
strLabel - File browser button label

GetFileBrowserBtnLabel

public java.lang.String GetFileBrowserBtnLabel()
Returns the file browser button label

Returns:
String File browser button label

SetFileLabel

public void SetFileLabel(java.lang.String strLabel)
Sets the File type label

Parameters:
strLabel - File type label

GetFileLabel

public java.lang.String GetFileLabel()
Returns the the File name label

Returns:
String File name label

GetFileName

public java.lang.String GetFileName()
Returns selected file

Returns:
Selected file name

SetFileName

public void SetFileName(java.lang.String szFileName)
Sets selected file name

Parameters:
szFileName - The name of the file to open

Enable

public void Enable()
Enables the UI

Overrides:
Enable in class HWMBasePanel

Disable

public void Disable()
Disables the UI

Overrides:
Disable in class HWMBasePanel

setEnabled

public void setEnabled(boolean bEnable)
Enables/disable the UI

Overrides:
setEnabled in class javax.swing.JComponent
Parameters:
bEnable - If true the UI is enabled else disabled