com.altair.hwm.beans.hm
Class HMCreatePoint

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

Title: HMCreatePoint

Description: This is the actual bean and gui that will, with the appropriate subclasses create a point in HyperMesh.

Company: Altair Engineering

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_CREATE_POINT
          Method ids that fire HWMCmdEvent
static java.lang.String NODE
           
static java.lang.String POINT
           
static java.lang.String PROP_NODE_OR_POINT
           
static java.lang.String PROP_SESSION_NAME
          List of property names for this bean, for which the propertyChange event will be fired
static java.lang.String PROP_SYSTEM_ID
           
static java.lang.String PROP_X_COORDINATE
           
static java.lang.String PROP_Y_COORDINATE
           
static java.lang.String PROP_Z_COORDINATE
           
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
HMCreatePoint()
          Constuctor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvt)
          ActionPerformed filters ActionEvents to the particular components and controls
 void CreatePoint()
          Calls the CreatePoint routine in the helper object.
 void Disable()
          Disable the bean.
 void Enable()
          Enable the bean.
 java.awt.Color GetBackground()
          Retrieve the background currently in use
 java.awt.Color GetForeground()
          Retrieve the foreground currently in use
 java.lang.String GetNodeOrPoint()
          Returns the NODE_OR_POINT property
 int GetSystemID()
          Returns the SYSTEM_ID property
 float GetXCoord()
          Returns the XCoord property
 float GetYCoord()
          Returns the Y_COORDINATE property
 float GetZCoord()
          Returns the Z_COORDINATE property
 boolean IsEnabled()
          Determine if the bean is currently enabled or not.
 void propertyChange(java.beans.PropertyChangeEvent propChangeEvt)
          The PropertyChange event.
 void readExternal(java.io.ObjectInput objInput)
          Read the objects back in, from an Externalization routine.
 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 setBackground(java.awt.Color colBackground)
          Set the background color of the bean
 void SetForeground(java.awt.Color colForeground)
          Set the foreground color of the bean
 void SetFrameWork(IHWMFrameWork hwmFrameWork)
          Overrides the IHWMControl's SetHWMFrameWork to create all the necessary hm bean's comm classes
 void SetNodeOrPoint(java.lang.String szVal)
          Sets the NODE_OR_POINT property.
 void SetSystemID(int nVal)
          Sets the SYSTEM_ID property
 void SetXCoord(float fVal)
          Sets the X_COORDINATE property
 void SetYCoord(float fVal)
          Sets the Y_COORDINATE property
 void SetZCoord(float fVal)
          Sets the Z_COORDINATE property
 void writeExternal(java.io.ObjectOutput objOutput)
          Writes the objects, for Externalization.
 
Methods inherited from class com.altair.hwm.beans.utils.HWMBasePanel
addHWMCmdEventListener, GetBeanName, GetFrameWork, HWMEventCallback, OnExit, Play, removeHWMCmdEventListener, Run, 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, setEnabled, 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
List of property names for this bean, for which the propertyChange event will be fired

See Also:
Constant Field Values

PROP_X_COORDINATE

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

PROP_Y_COORDINATE

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

PROP_Z_COORDINATE

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

PROP_SYSTEM_ID

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

PROP_NODE_OR_POINT

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

METH_CREATE_POINT

public static final int METH_CREATE_POINT
Method ids that fire HWMCmdEvent

See Also:
Constant Field Values

NODE

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

POINT

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

HMCreatePoint

public HMCreatePoint()
Constuctor. Builds the GUI while we're at it.

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
Writes the objects, for Externalization.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class HWMBasePanel
Parameters:
ObjectOutput - objOutput -- The ObjectOutput stream to write all the objects out to
Throws:
IOEXception
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput objInput)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Read the objects back in, from an Externalization routine. Also, update the GUI with the values we just read in.

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class HWMBasePanel
Parameters:
ObjectInput - objInput -- The ObjectInput stream from which all the objects are going to be read from
Throws:
java.lang.ClassNotFoundException
java.io.IOException

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvt)
ActionPerformed filters ActionEvents to the particular components and controls

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
actionEvt - -- The action event that was caused

CreatePoint

public void CreatePoint()
Calls the CreatePoint routine in the helper object. It will also post a dialog if the CreatePoint fails for any reason. Also, the fireOnCmdSuccess function will be called if the CreatePoint worked.


Enable

public void Enable()
Enable the bean.

Overrides:
Enable in class HWMBasePanel

Disable

public void Disable()
Disable the bean.

Overrides:
Disable in class HWMBasePanel

IsEnabled

public boolean IsEnabled()
Determine if the bean is currently enabled or not.


GetXCoord

public float GetXCoord()
Returns the XCoord property


SetXCoord

public void SetXCoord(float fVal)
Sets the X_COORDINATE property

Parameters:
fVal - -- The new value for the X_COORDINATE property

GetYCoord

public float GetYCoord()
Returns the Y_COORDINATE property


SetYCoord

public void SetYCoord(float fVal)
Sets the Y_COORDINATE property

Parameters:
fVal - -- The new value for the Y_COORDINATE property

GetZCoord

public float GetZCoord()
Returns the Z_COORDINATE property


SetZCoord

public void SetZCoord(float fVal)
Sets the Z_COORDINATE property

Parameters:
fVal - -- The new value for the Z_COORDINATE property

GetSystemID

public int GetSystemID()
Returns the SYSTEM_ID property


SetSystemID

public void SetSystemID(int nVal)
Sets the SYSTEM_ID property

Parameters:
fVal - -- The new value for the Z_COORDINATE property

GetNodeOrPoint

public java.lang.String GetNodeOrPoint()
Returns the NODE_OR_POINT property


SetNodeOrPoint

public void SetNodeOrPoint(java.lang.String szVal)
Sets the NODE_OR_POINT property. It will also update the button in the bean to either say "Create Node" or "Create Point" as appropriate

Parameters:
String - szVal -- Whether the bean should create nodes or points. This MUST match either HMCreatePoint.NODE or HMCreatePoint.POINT, otherwise the member call is a NoOp.

GetBackground

public java.awt.Color GetBackground()
Retrieve the background currently in use


setBackground

public void setBackground(java.awt.Color colBackground)
Set the background color of the bean

Overrides:
setBackground in class HWMBasePanel
Parameters:
Color - colBackground -- A color object representing the color to use for the background of the bean

GetForeground

public java.awt.Color GetForeground()
Retrieve the foreground currently in use


SetForeground

public void SetForeground(java.awt.Color colForeground)
Set the foreground color of the bean

Parameters:
Color - colForeground -- A color object representing the color to use for the foreground of the bean

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent propChangeEvt)
The PropertyChange event. Doesn't do anything right now, but it's here.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener