com.altair.hwm.beans.hm
Class FEPreSelect

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.FEPreSelect
All Implemented Interfaces:
HWMEventListener, IHWMControl, ITCLCodeCreator, 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 FEPreSelect
extends HWMBasePanel
implements java.awt.event.ActionListener, java.io.Externalizable, java.beans.PropertyChangeListener, ITCLCodeCreator

Title: FEPreSelect

Description: This bean allows the user to select a given entity in HyperMesh/FEPre client in HyperWorks(Motion framework)

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 SEL_CRITERIA_MULTIPLE
           
static java.lang.String SEL_CRITERIA_ORDERED
           
static java.lang.String SEL_CRITERIA_SINGLE
          Enumeration of the selection criteria
static java.lang.String SEL_CRITERIA_VECTOR
           
static java.lang.String SEL_ENTINTY_TYPE_COMPONENTS
           
static java.lang.String SEL_ENTINTY_TYPE_CONNECTORS
           
static java.lang.String SEL_ENTINTY_TYPE_CONSTRAINTS
           
static java.lang.String SEL_ENTINTY_TYPE_ELEMENTS
           
static java.lang.String SEL_ENTINTY_TYPE_FORCES
           
static java.lang.String SEL_ENTINTY_TYPE_GROUPS
           
static java.lang.String SEL_ENTINTY_TYPE_LINES
           
static java.lang.String SEL_ENTINTY_TYPE_MATERIALS
           
static java.lang.String SEL_ENTINTY_TYPE_MOMENTS
           
static java.lang.String SEL_ENTINTY_TYPE_NODES
           
static java.lang.String SEL_ENTINTY_TYPE_POINTS
           
static java.lang.String SEL_ENTINTY_TYPE_PROPS
           
static java.lang.String SEL_ENTINTY_TYPE_SETS
           
static java.lang.String SEL_ENTINTY_TYPE_SURFACES
           
static java.lang.String SEL_ENTINTY_TYPE_SYSTEMS
           
static java.lang.String SEL_ENTINTY_TYPE_VECTORS
           
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
FEPreSelect()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Callback when any of the buttons in this panel is pressed
 HWMActionScript GetActionScript()
          Get the Java Script
 java.lang.String GetEntityMark()
          Get mark (in HM) that the selected entities will be placed in.
 java.lang.String GetEntityType()
          Gets the selected entity type.
 java.lang.String GetSelectionCriteria()
          Gets the selected entity type.
 java.lang.String GetSessionName()
          Returns the session name for HM communication
 java.lang.String getToolTipText()
          Returns the tooltip for the button.
 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 SetActionScript(HWMActionScript hwmScript)
          Set the Java Script
 void SetBeanName(java.lang.String strBeanName)
          Set the name of the bean
 void SetEntityMark(java.lang.String strMark)
          Sets mark (in HM) that the selected entities will be placed in.
 void SetEntityType(java.lang.String strEntityType)
          Sets entity type.
 void SetFrameWork(IHWMFrameWork hwmFrameWork)
          Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes
 void SetSelectionCriteria(java.lang.String strSelCriteria)
          Set the selectin criteria -- Single, multiple, ordered list
 void SetSessionName(java.lang.String strSessionName)
          Sets the session name for HM communication
 void setToolTipText(java.lang.String strToolTip)
          Sets the tooltip for the button.
 void SwitchN1N2N3Focus()
           
 java.lang.String TCLCreateAdditionalEventProcs()
          This method rerurns the TCL statement string for any additional procedures that is requred for the bean.
 java.lang.String TCLCreateCollectorUIForHM()
          By AEI This method returns the TCL statement string for creating the Collector GUI for the bean in question.
 java.lang.String TCLCreateCollectorUIForHW()
          This method returns the TCL statement string for creating the Collector GUI for the bean in question in FEModel i.e.
 java.lang.String TCLCreateExec()
          This method returns the TCL statement string that performs the execution of script associated with the bean.
 java.lang.String TCLCreateGetDataFromDataModel()
          This method returns the TCL statement string that gets the data in the datamodel.
 java.lang.String TCLCreateMemberVariables()
          This method returns the TCL statement string for all the memeber variables referred by the bean in question.
 java.lang.String TCLCreateOnDataModelChanged()
          This method returns the TCL statement string that implements the functionlaity requred to handle the "OnDataModelChanged" event.
 java.lang.String TCLCreateSetDataInDataModel()
          This method returns the TCL statement string that sets the data in the datamodel.
 java.lang.String TCLCreateUI()
          This method returns the TCL statement string for creating the GUI for the bean in question.
 void writeExternal(java.io.ObjectOutput objOutput)
          Save the persistent properties
 
Methods inherited from class com.altair.hwm.beans.utils.HWMBasePanel
addHWMCmdEventListener, Disable, Enable, GetBeanName, GetFrameWork, HWMEventCallback, OnExit, Play, ReadProperties, removeHWMCmdEventListener, Run, SaveProperties, setBackground, 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, 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, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, 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

SEL_CRITERIA_SINGLE

public static final java.lang.String SEL_CRITERIA_SINGLE
Enumeration of the selection criteria

See Also:
Constant Field Values

SEL_CRITERIA_MULTIPLE

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

SEL_CRITERIA_ORDERED

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

SEL_CRITERIA_VECTOR

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

SEL_ENTINTY_TYPE_NODES

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

SEL_ENTINTY_TYPE_ELEMENTS

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

SEL_ENTINTY_TYPE_COMPONENTS

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

SEL_ENTINTY_TYPE_LINES

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

SEL_ENTINTY_TYPE_SURFACES

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

SEL_ENTINTY_TYPE_MATERIALS

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

SEL_ENTINTY_TYPE_POINTS

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

SEL_ENTINTY_TYPE_CONNECTORS

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

SEL_ENTINTY_TYPE_VECTORS

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

SEL_ENTINTY_TYPE_SYSTEMS

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

SEL_ENTINTY_TYPE_FORCES

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

SEL_ENTINTY_TYPE_MOMENTS

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

SEL_ENTINTY_TYPE_CONSTRAINTS

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

SEL_ENTINTY_TYPE_SETS

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

SEL_ENTINTY_TYPE_GROUPS

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

SEL_ENTINTY_TYPE_PROPS

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

FEPreSelect

public FEPreSelect()
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 HWMBasePanel
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 HWMBasePanel
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
Parameters:
evt - - A PropertyChangeEvent object describing the event source and the property that has changed.

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

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

SetSelectionCriteria

public void SetSelectionCriteria(java.lang.String strSelCriteria)
Set the selectin criteria -- Single, multiple, ordered list

Parameters:
strEntityType - The entity type to select

GetSelectionCriteria

public java.lang.String GetSelectionCriteria()
Gets the selected entity type. Can be ENTITY_SURFACES, ENTITY_NODES or ENTITY_ELEMENTS

Returns:
String Entity type to select

SetEntityType

public void SetEntityType(java.lang.String strEntityType)
Sets entity type. Can be Surfaces, Nodes, Elements, etc.

Parameters:
strEntityType - The entity type to select

GetEntityType

public java.lang.String GetEntityType()
Gets the selected entity type. Can be ENTITY_SURFACES, ENTITY_NODES or ENTITY_ELEMENTS

Returns:
String Entity type to select

SetEntityMark

public void SetEntityMark(java.lang.String strMark)
Sets mark (in HM) that the selected entities will be placed in.

Parameters:
strMark - The mark number

GetEntityMark

public java.lang.String GetEntityMark()
Get mark (in HM) that the selected entities will be placed in.

Returns:
String The mark number

GetActionScript

public HWMActionScript GetActionScript()
Get the Java Script

Returns:
The script to execute

SetActionScript

public void SetActionScript(HWMActionScript hwmScript)
Set the Java Script

Parameters:
hwmScript - The ActionScript instance

getToolTipText

public java.lang.String getToolTipText()
Returns the tooltip for the button. The reason we override this method is that if there is no tooltip to show, then the tooltip will be null. But if it is null, it will not show up in the properties.

Overrides:
getToolTipText in class javax.swing.JComponent
Returns:
String Tooltip for the button

setToolTipText

public void setToolTipText(java.lang.String strToolTip)
Sets the tooltip for the button. The reason we override this method is that if there is no tooltip to show, then the tooltip should be null. But the property panel will set an empty string instead of null. If the tooltip is an empty string, a black dot is shown. To avoid this problem, we set the tooltip text to null if there is no tooltip to be shown.

Overrides:
setToolTipText in class javax.swing.JComponent
Parameters:
strToolTip - Tooltip for the button

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Callback when any of the buttons in this panel is pressed

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

SwitchN1N2N3Focus

public void SwitchN1N2N3Focus()

TCLCreateUI

public java.lang.String TCLCreateUI()
                             throws java.lang.Exception
This method returns the TCL statement string for creating the GUI for the bean in question.

Specified by:
TCLCreateUI in interface ITCLCodeCreator
Throws:
java.lang.Exception

TCLCreateCollectorUIForHW

public java.lang.String TCLCreateCollectorUIForHW()
                                           throws java.lang.Exception
This method returns the TCL statement string for creating the Collector GUI for the bean in question in FEModel i.e. HyperWorks.

Throws:
java.lang.Exception

TCLCreateCollectorUIForHM

public java.lang.String TCLCreateCollectorUIForHM()
                                           throws java.lang.Exception
By AEI This method returns the TCL statement string for creating the Collector GUI for the bean in question. This method creates the collector widgets and docks the collector widgets in HyperMesh.

Throws:
java.lang.Exception

TCLCreateMemberVariables

public java.lang.String TCLCreateMemberVariables()
This method returns the TCL statement string for all the memeber variables referred by the bean in question. The code generated by this method goes in the "DisplayWnd" procedure of the task.

Specified by:
TCLCreateMemberVariables in interface ITCLCodeCreator

TCLCreateSetDataInDataModel

public java.lang.String TCLCreateSetDataInDataModel()
This method returns the TCL statement string that sets the data in the datamodel. The code generated by this method goes in the SetDataInDataModel code of the Task.

Specified by:
TCLCreateSetDataInDataModel in interface ITCLCodeCreator

TCLCreateGetDataFromDataModel

public java.lang.String TCLCreateGetDataFromDataModel()
This method returns the TCL statement string that gets the data in the datamodel. The code generated by this method goes in the GetDataFromDataModel code of the Task. The bean in question will generate the equivalent TCL code.

Specified by:
TCLCreateGetDataFromDataModel in interface ITCLCodeCreator

TCLCreateExec

public java.lang.String TCLCreateExec()
This method returns the TCL statement string that performs the execution of script associated with the bean. The code generated goes into the "Exec" procedure of the task. The bean in question will generate the TCL code.

Specified by:
TCLCreateExec in interface ITCLCodeCreator

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

TCLCreateOnDataModelChanged

public java.lang.String TCLCreateOnDataModelChanged()
This method returns the TCL statement string that implements the functionlaity requred to handle the "OnDataModelChanged" event. If the bean in question needs to be interested in updating itself, then the bean will be implementing the mthod to return the TCL code.

Specified by:
TCLCreateOnDataModelChanged in interface ITCLCodeCreator