com.altair.hwm.beans.hm
Class HMReflect

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.HMReflect
All Implemented Interfaces:
HWMEventListener, IHWMControl, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Externalizable, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class HMReflect
extends HWMBasePanel
implements java.awt.event.ActionListener, java.io.Externalizable

Title: HMReflect

Description: This bean allows the user to reflect the elements/surfaces of the 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 int METH_REFLECT
          Methods ids that fire HWMCmdEvent
static java.lang.String PROP_BASE_NODE
          The property name for the base node
static java.lang.String PROP_BASE_POINT
          The property name for the base point
static java.lang.String PROP_COPY_REFLECT
          The property name for the copy reflect property
static java.lang.String PROP_NODE1
          The property name for the first node (when N1,N2,N3 is the type of relection)
static java.lang.String PROP_NODE2
          The property name for the second node (when N1,N2,N3 is the type of relection)
static java.lang.String PROP_NODE3
          The property name for the third node (when N1,N2,N3 is the type of relection)
static java.lang.String PROP_POINT1
          The property name for the first point (when N1,N2,N3 is the type of relection)
static java.lang.String PROP_POINT2
          The property name for the second point (when N1,N2,N3 is the type of relection)
static java.lang.String PROP_POINT3
          The property name for the third point (when N1,N2,N3 is the type of relection)
static java.lang.String PROP_REFLECT_ABOUT
          The property name for the reflection type
static java.lang.String PROP_SESSION_NAME
          The property name for the session name used to communicate with HyperMesh
static java.lang.String REFLECT_N1N2N3
          Reflection is done about a vector defined by N1, N2 and N3
static java.lang.String REFLECT_X_AXIS
          Reflection is done about X axis
static java.lang.String REFLECT_Y_AXIS
          Reflection is done about Y axis
static java.lang.String REFLECT_Z_AXIS
          Reflection is done about Z axis
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
HMReflect()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvt)
          Called when the combo box selecion is changed, when select is pressed or when reflect is pressed
 void Disable()
          This is called when the user wants to disable the reflect button.
 void Enable()
          Enable the reflect button.
 java.lang.String GetBaseNode()
          Gets the selected base node's id
 HWMPoint GetBasePoint()
          Gets the base point
 java.lang.String GetCopyBtnLabel()
          Gets the label of "Copy" chk box
 java.lang.String GetNode1()
          Gets the first selected node's id
 java.lang.String GetNode2()
          Gets the second selected node's id
 java.lang.String GetNode3()
          Gets the third selected node's id
 HWMPoint GetPoint1()
          Gets the first point
 HWMPoint GetPoint2()
          Gets the second point
 HWMPoint GetPoint3()
          Gets the third point
 java.lang.String GetReflectBtnLabel()
          Gets label of "Reflect" button
 java.lang.String GetReflectType()
          Gets the reflect type
 java.lang.String GetReflectTypeLabel()
          Gets label of "Reflect Type" combo box
 java.lang.String GetSelectBtnLabel()
          Gets label of "Select" button
 java.lang.String GetSelectedLabel()
          Gets label of "Selected Nodes" label
 java.lang.String GetSessionName()
          Returns the session name for HM communication
 boolean IsCopy()
          Returns true if the original model should also be shown along with reflection else false.
 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 Reflect()
          Performs the reflection
 void SaveProperties()
          Save the required properties in the datamodel (so that they persist)
 void setBackground(java.awt.Color colBckGround)
          Sets the background color
 void SetBaseNode(java.lang.String strNodeID)
          Sets the selected base node's id
 void SetBasePoint(HWMPoint hwmPoint)
          Sets the base point
 void SetCopy(boolean bCopy)
          Sets/Resets the copy before reflect flag
 void SetCopyBtnLabel(java.lang.String strLabelName)
          Sets the label of "Copy" chk box
 void setEnabled(boolean bEnable)
          This is called when the user wants to enable/disable the reflect button.
 void setFont(java.awt.Font font)
          Sets the font for all the controls in the panel
 void setForeground(java.awt.Color colForeGround)
          Sets the foreground color
 void SetFrameWork(IHWMFrameWork hwmFrameWork)
          Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes
 void SetNode1(java.lang.String strNodeID)
          Sets the first selected node's id
 void SetNode2(java.lang.String strNodeID)
          Sets the second selected node's id
 void SetNode3(java.lang.String strNodeID)
          Sets the third selected node's id
 void SetPoint1(HWMPoint hwmPoint)
          Sets the first point
 void SetPoint2(HWMPoint hwmPoint)
          Sets the second point
 void SetPoint3(HWMPoint hwmPoint)
          Sets the third point
 void SetReflectBtnLabel(java.lang.String strLabelName)
          Sets the label of "Reflect" button
 void SetReflectType(java.lang.String strReflectType)
          Sets the reflect type
 void SetReflectTypeLabel(java.lang.String strLabelName)
          Sets the label of "Reflect type" combo box
 void SetSelectBtnLabel(java.lang.String strLabelName)
          Sets the label of "Select" button
 void SetSelectedLabel(java.lang.String strLabelName)
          Sets the label of "Selected Nodes" label
 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, SetBeanName
 
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_REFLECT_ABOUT

public static final java.lang.String PROP_REFLECT_ABOUT
The property name for the reflection type

See Also:
Constant Field Values

PROP_COPY_REFLECT

public static final java.lang.String PROP_COPY_REFLECT
The property name for the copy reflect property

See Also:
Constant Field Values

PROP_NODE1

public static final java.lang.String PROP_NODE1
The property name for the first node (when N1,N2,N3 is the type of relection)

See Also:
Constant Field Values

PROP_NODE2

public static final java.lang.String PROP_NODE2
The property name for the second node (when N1,N2,N3 is the type of relection)

See Also:
Constant Field Values

PROP_NODE3

public static final java.lang.String PROP_NODE3
The property name for the third node (when N1,N2,N3 is the type of relection)

See Also:
Constant Field Values

PROP_BASE_NODE

public static final java.lang.String PROP_BASE_NODE
The property name for the base node

See Also:
Constant Field Values

PROP_POINT1

public static final java.lang.String PROP_POINT1
The property name for the first point (when N1,N2,N3 is the type of relection)

See Also:
Constant Field Values

PROP_POINT2

public static final java.lang.String PROP_POINT2
The property name for the second point (when N1,N2,N3 is the type of relection)

See Also:
Constant Field Values

PROP_POINT3

public static final java.lang.String PROP_POINT3
The property name for the third point (when N1,N2,N3 is the type of relection)

See Also:
Constant Field Values

PROP_BASE_POINT

public static final java.lang.String PROP_BASE_POINT
The property name for the base point

See Also:
Constant Field Values

METH_REFLECT

public static final int METH_REFLECT
Methods ids that fire HWMCmdEvent

See Also:
Constant Field Values

REFLECT_N1N2N3

public static final java.lang.String REFLECT_N1N2N3
Reflection is done about a vector defined by N1, N2 and N3

See Also:
Constant Field Values

REFLECT_X_AXIS

public static final java.lang.String REFLECT_X_AXIS
Reflection is done about X axis

See Also:
Constant Field Values

REFLECT_Y_AXIS

public static final java.lang.String REFLECT_Y_AXIS
Reflection is done about Y axis

See Also:
Constant Field Values

REFLECT_Z_AXIS

public static final java.lang.String REFLECT_Z_AXIS
Reflection is done about Z axis

See Also:
Constant Field Values
Constructor Detail

HMReflect

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

setFont

public void setFont(java.awt.Font font)
Sets the font for all the controls in the panel

Overrides:
setFont in class HWMBasePanel
Parameters:
font - The new font for the panel

setBackground

public void setBackground(java.awt.Color colBckGround)
Sets the background color

Overrides:
setBackground in class HWMBasePanel
Parameters:
colBckGround - background color

setForeground

public void setForeground(java.awt.Color colForeGround)
Sets the foreground color

Overrides:
setForeground in class HWMBasePanel
Parameters:
colForeGround - foreground color

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvt)
Called when the combo box selecion is changed, when select is pressed or when reflect is pressed

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

Reflect

public void Reflect()
Performs the reflection


SetReflectType

public void SetReflectType(java.lang.String strReflectType)
Sets the reflect type

Parameters:
strReflectType - sets the reflect type. It can be REFLECT_N1N2N3, REFLECT_X_AXIS, REFLECT_Y_AXIS or REFLECT_Z_AXIS

GetReflectType

public java.lang.String GetReflectType()
Gets the reflect type

Returns:
String the reflect type. It can be REFLECT_N1N2N3, REFLECT_X_AXIS, REFLECT_Y_AXIS or REFLECT_Z_AXIS

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

SetNode1

public void SetNode1(java.lang.String strNodeID)
              throws java.lang.Exception
Sets the first selected node's id

Parameters:
strNodeID - ID of first node selected
Throws:
java.lang.Exception

GetNode1

public java.lang.String GetNode1()
Gets the first selected node's id

Returns:
String ID of first node selected

SetNode2

public void SetNode2(java.lang.String strNodeID)
              throws java.lang.Exception
Sets the second selected node's id

Parameters:
strNodeID - ID of second node selected
Throws:
java.lang.Exception

GetNode2

public java.lang.String GetNode2()
Gets the second selected node's id

Returns:
String ID of second node selected

SetNode3

public void SetNode3(java.lang.String strNodeID)
              throws java.lang.Exception
Sets the third selected node's id

Parameters:
strNodeID - ID of third node selected
Throws:
java.lang.Exception

GetNode3

public java.lang.String GetNode3()
Gets the third selected node's id

Returns:
String ID of third node selected

SetBaseNode

public void SetBaseNode(java.lang.String strNodeID)
                 throws java.lang.Exception
Sets the selected base node's id

Parameters:
strNodeID - ID of base node selected
Throws:
java.lang.Exception

GetBaseNode

public java.lang.String GetBaseNode()
Gets the selected base node's id

Returns:
String ID of base node selected

SetPoint1

public void SetPoint1(HWMPoint hwmPoint)
Sets the first point

Parameters:
hwmPoint - The coordinates of the first point

GetPoint1

public HWMPoint GetPoint1()
Gets the first point

Parameters:
HWMPoint - The coordinates of the first point

SetPoint2

public void SetPoint2(HWMPoint hwmPoint)
Sets the second point

Parameters:
hwmPoint - The coordinates of the second point

GetPoint2

public HWMPoint GetPoint2()
Gets the second point

Parameters:
HWMPoint - The coordinates of the second point

SetPoint3

public void SetPoint3(HWMPoint hwmPoint)
Sets the third point

Parameters:
hwmPoint - The coordinates of the third point

GetPoint3

public HWMPoint GetPoint3()
Gets the third point

Parameters:
HWMPoint - The coordinates of the third point

SetBasePoint

public void SetBasePoint(HWMPoint hwmPoint)
Sets the base point

Parameters:
hwmPoint - The coordinates of the base point

GetBasePoint

public HWMPoint GetBasePoint()
Gets the base point

Parameters:
HWMPoint - The coordinates of the base point

SetCopy

public void SetCopy(boolean bCopy)
Sets/Resets the copy before reflect flag

Parameters:
bCopy - true if the original model should also be shown along with reflection else false.

IsCopy

public boolean IsCopy()
Returns true if the original model should also be shown along with reflection else false.

Returns:
boolean true if the original model should also be shown along with reflection else false.

Enable

public void Enable()
Enable the reflect button. Enabling will not enable reflect button until all the data is available for reflection and if the user has intentionally disabled it, then it will remain disabled unless the user enables it

Overrides:
Enable in class HWMBasePanel

Disable

public void Disable()
This is called when the user wants to disable the reflect button.

Overrides:
Disable in class HWMBasePanel

setEnabled

public void setEnabled(boolean bEnable)
This is called when the user wants to enable/disable the reflect button. boolean bEnabled If true and the data is available, the reflect btn is enabled else disabled

Overrides:
setEnabled in class javax.swing.JComponent

SetReflectTypeLabel

public void SetReflectTypeLabel(java.lang.String strLabelName)
Sets the label of "Reflect type" combo box

Parameters:
String - label of "Reflect Type" combo box

GetReflectTypeLabel

public java.lang.String GetReflectTypeLabel()
Gets label of "Reflect Type" combo box

Returns:
String label for "Reflect Type" combo box

SetCopyBtnLabel

public void SetCopyBtnLabel(java.lang.String strLabelName)
Sets the label of "Copy" chk box

Parameters:
strLabelName - label of "Copy" chk box

GetCopyBtnLabel

public java.lang.String GetCopyBtnLabel()
Gets the label of "Copy" chk box

Returns:
String the label of "Copy" chk box

SetSelectBtnLabel

public void SetSelectBtnLabel(java.lang.String strLabelName)
Sets the label of "Select" button

Parameters:
strLabelName - label of "Select" button

GetSelectBtnLabel

public java.lang.String GetSelectBtnLabel()
Gets label of "Select" button

Returns:
String label for "Select" button

SetReflectBtnLabel

public void SetReflectBtnLabel(java.lang.String strLabelName)
Sets the label of "Reflect" button

Parameters:
strLabelName - label of "Reflect" button

GetReflectBtnLabel

public java.lang.String GetReflectBtnLabel()
Gets label of "Reflect" button

Returns:
String label for "Reflect" button

SetSelectedLabel

public void SetSelectedLabel(java.lang.String strLabelName)
Sets the label of "Selected Nodes" label

Parameters:
strLabelName - label of "Selected Nodes" label

GetSelectedLabel

public java.lang.String GetSelectedLabel()
Gets label of "Selected Nodes" label

Returns:
String label for "Selected Nodes" label