com.altair.hwm.beans.hm
Class HMMesh

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.HMMesh
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 HMMesh
extends HWMBasePanel
implements java.io.Externalizable, java.awt.event.ActionListener, java.beans.PropertyChangeListener

Title: HMMesh

Description: This bean allows the user to mesh the loaded model in HyperMesh

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 ELEMENT_MIXED
          "Mixed" elements will be used to mesh
static java.lang.String ELEMENT_QUAD
          "Quad" elements will be used to mesh
static java.lang.String ELEMENT_TRIAS
          "Trias" elements will be used to mesh
static java.lang.String ENTITY_SURFACES
          The available entity types for meshing.
static int METH_MESH
          Methods ids that fire HWMCmdEvent
static java.lang.String PROP_ELEMENT_TYPE
          The name for the element type property
static java.lang.String PROP_ENTITY_TYPE
          The name for the entity type property
static java.lang.String PROP_MESH_SIZE
          The name for the mesh size property
static java.lang.String PROP_MESH_SIZE_TXT
          The name for the mesh size property in textual format
static java.lang.String PROP_SELECTION_TYPE
          The name for the selection type property
static java.lang.String PROP_SESSION_NAME
          The property name for the session name used to communicate with HyperMesh
static java.lang.String SELECT_ALL
          The scope for meshing is "all".
static java.lang.String SELECT_DISPLAYED
          The scope for meshing is "displayed".
static java.lang.String SELECT_USER
          The scope for meshing is "selected".
static java.lang.String VERSION
          The version ID for this component
 
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
HMMesh()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvt)
          Handler for the event fired when the "Mesh" btn is clicked
 void Disable()
          Disables the UI
 void Enable()
          Enables the UI
 java.lang.String GetElementLabel()
          Sets the label for "Element type" combo box
 java.lang.String GetElementType()
          Gets the elem type used during meshing
 java.lang.String GetEntityLabel()
          Gets the label for "Entity Type" combo box
 java.lang.String GetEntityType()
          Gets the entity type that is meshed
 java.lang.String GetMeshBtnLabel()
          Gets the label for the mesh button
 float GetMeshSize()
          gets the mesh size
 java.lang.String GetMeshSizeAsText()
          Gets the mesh size as a String
 java.lang.String GetMeshSizeLabel()
          Gets the label for "Mesh Size"
 java.lang.String GetSelectionLabel()
          Gets the label "Selection type" combo box
 java.lang.String GetSelectionType()
          Gets the selection for meshing.
 java.lang.String GetSessionName()
          Returns the session name for HM communication
 void Mesh()
          Sends a command to HM asking it to perform meshing It will check if "selected" type of meshing is to be done, in which case it will invoke PerformSelection.
 void propertyChange(java.beans.PropertyChangeEvent propChangeEvt)
          Invoked when either the txt field looses focus or when enter key is pressed.
 void readExternal(java.io.ObjectInput objInput)
          Loads the version and then calls the appropriate read function for the version
 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 SetElementLabel(java.lang.String strLabelName)
          Sets the label for "Element type" combo box
 void SetElementType(java.lang.String strElemType)
          Sets the elem type used during meshing
 void setEnabled(boolean bEnable)
          Enables/disable the UI
 void SetEntityLabel(java.lang.String strLabelName)
          Sets the label for "Entity Type" combo box
 void SetEntityType(java.lang.String strEntity)
          Sets the entity type that is meshed
 void SetFrameWork(IHWMFrameWork hwmFrameWork)
          Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes
 void SetMeshBtnLabel(java.lang.String strLabelName)
          Sets the label for the mesh button
 void SetMeshSize(float fMeshSize)
          sets the mesh size
 void SetMeshSizeAsText(java.lang.String strMeshSize)
          Sets the mesh size as a String
 void SetMeshSizeLabel(java.lang.String strLabelName)
          Sets the label for "Mesh Size" text field
 void SetSelectionLabel(java.lang.String strLabelName)
          Sets the the label "Selection type" combo box
 void SetSelectionType(java.lang.String strScope)
          Sets the selection type for meshing
 void SetSessionName(java.lang.String strSessionName)
          Sets the session name for HM communication
 void writeExternal(java.io.ObjectOutput objOutput)
          Save the persistent properties
 
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

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_MESH_SIZE

public static final java.lang.String PROP_MESH_SIZE
The name for the mesh size property

See Also:
Constant Field Values

PROP_MESH_SIZE_TXT

public static final java.lang.String PROP_MESH_SIZE_TXT
The name for the mesh size property in textual format

See Also:
Constant Field Values

PROP_SELECTION_TYPE

public static final java.lang.String PROP_SELECTION_TYPE
The name for the selection type property

See Also:
Constant Field Values

PROP_ELEMENT_TYPE

public static final java.lang.String PROP_ELEMENT_TYPE
The name for the element type property

See Also:
Constant Field Values

PROP_ENTITY_TYPE

public static final java.lang.String PROP_ENTITY_TYPE
The name for the entity type property

See Also:
Constant Field Values

METH_MESH

public static final int METH_MESH
Methods ids that fire HWMCmdEvent

See Also:
Constant Field Values

SELECT_ALL

public static final java.lang.String SELECT_ALL
The scope for meshing is "all". i.e. All surfaces/components will be meshed

See Also:
Constant Field Values

SELECT_DISPLAYED

public static final java.lang.String SELECT_DISPLAYED
The scope for meshing is "displayed". i.e. All displayed surfaces/ components will be meshed

See Also:
Constant Field Values

SELECT_USER

public static final java.lang.String SELECT_USER
The scope for meshing is "selected". i.e. The user will select the surfaces/components that will be meshed

See Also:
Constant Field Values

ELEMENT_QUAD

public static final java.lang.String ELEMENT_QUAD
"Quad" elements will be used to mesh

See Also:
Constant Field Values

ELEMENT_TRIAS

public static final java.lang.String ELEMENT_TRIAS
"Trias" elements will be used to mesh

See Also:
Constant Field Values

ELEMENT_MIXED

public static final java.lang.String ELEMENT_MIXED
"Mixed" elements will be used to mesh

See Also:
Constant Field Values

ENTITY_SURFACES

public static final java.lang.String ENTITY_SURFACES
The available entity types for meshing. Today we are supporting only surfaces.

See Also:
Constant Field Values
Constructor Detail

HMMesh

public HMMesh()
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

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
Save the persistent properties

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class HWMBasePanel
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 HWMBasePanel
Parameters:
objInput - The stream from which data will be read
Throws:
IOException, - ClassNotFoundException
java.lang.ClassNotFoundException
java.io.IOException

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvt)
Handler for the event fired when the "Mesh" btn is clicked

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
actionEvt - The action event object (See Java docs for help)

Mesh

public void Mesh()
Sends a command to HM asking it to perform meshing It will check if "selected" type of meshing is to be done, in which case it will invoke PerformSelection.


SetSelectionType

public void SetSelectionType(java.lang.String strScope)
Sets the selection type for meshing

Parameters:
strScope - The selection type for meshing

GetSelectionType

public java.lang.String GetSelectionType()
Gets the selection for meshing. Can be: all, displayed or selected

Returns:
String The selection type for meshing

SetElementType

public void SetElementType(java.lang.String strElemType)
Sets the elem type used during meshing

Parameters:
strElemType - The element type used during meshing

GetElementType

public java.lang.String GetElementType()
Gets the elem type used during meshing

Returns:
String The element type used during meshing

SetEntityType

public void SetEntityType(java.lang.String strEntity)
Sets the entity type that is meshed

Parameters:
strEntity - entity type that is meshed

GetEntityType

public java.lang.String GetEntityType()
Gets the entity type that is meshed

Returns:
String entity type that is meshed

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

SetElementLabel

public void SetElementLabel(java.lang.String strLabelName)
Sets the label for "Element type" combo box

Parameters:
strLabel - Name Label for "Element type" combo box

GetElementLabel

public java.lang.String GetElementLabel()
Sets the label for "Element type" combo box

Returns:
String label for "Element type" combo box

SetSelectionLabel

public void SetSelectionLabel(java.lang.String strLabelName)
Sets the the label "Selection type" combo box

Parameters:
strLabelName - Label "Selection type" combo box

GetSelectionLabel

public java.lang.String GetSelectionLabel()
Gets the label "Selection type" combo box

Returns:
String Label for "Selection type" combo box

SetEntityLabel

public void SetEntityLabel(java.lang.String strLabelName)
Sets the label for "Entity Type" combo box

Parameters:
strLabelName - Label for "Entity Type" combo box

GetEntityLabel

public java.lang.String GetEntityLabel()
Gets the label for "Entity Type" combo box

Returns:
String Label for "Entity Type" combo box

SetMeshSizeLabel

public void SetMeshSizeLabel(java.lang.String strLabelName)
Sets the label for "Mesh Size" text field

Parameters:
strLabelName - Label for "Mesh Size" text field

GetMeshSizeLabel

public java.lang.String GetMeshSizeLabel()
Gets the label for "Mesh Size"

Returns:
String label for "Mesh Size"

SetMeshBtnLabel

public void SetMeshBtnLabel(java.lang.String strLabelName)
Sets the label for the mesh button

Parameters:
strLabelName - Label for the mesh button

GetMeshBtnLabel

public java.lang.String GetMeshBtnLabel()
Gets the label for the mesh button

Returns:
String Label for the mesh button

SetMeshSize

public void SetMeshSize(float fMeshSize)
sets the mesh size

Parameters:
fMeshSize - The size for meshing

GetMeshSize

public float GetMeshSize()
gets the mesh size

Returns:
float The size for meshing

SetMeshSizeAsText

public void SetMeshSizeAsText(java.lang.String strMeshSize)
Sets the mesh size as a String

Parameters:
strMeshSize - The size for meshing as a String

GetMeshSizeAsText

public java.lang.String GetMeshSizeAsText()
Gets the mesh size as a String

Returns:
String The size for meshing as a String

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

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent propChangeEvt)
Invoked when either the txt field looses focus or when enter key is pressed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
propChangeEvt - The property change event object (See Java docs for help)