com.altair.hwm.beans.utils
Class HWMComboBoxPropEditor

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.HWMComboBoxPropEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyEditor, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.TableModelListener

public class HWMComboBoxPropEditor
extends javax.swing.JPanel
implements java.beans.PropertyEditor, java.awt.event.ActionListener, javax.swing.event.TableModelListener

Title: HWMComboBoxPropEditor

Description: Propety editor for HWMComboBox

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
 
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
HWMComboBoxPropEditor()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvt)
          Handler for the event fired when the "Add" btn or the "Delete" button is clicked
 java.lang.String getAsText()
          Gets the property value as text.
 java.awt.Component getCustomEditor()
          Returns the custom editor
 java.lang.String getJavaInitializationString()
          This method is intended for use when generating Java code to set the value of the property.
 java.lang.String[] getTags()
          Since the propertyvalue is not one of a set, this returns null.
 java.lang.Object getValue()
          Gets the property value.
 boolean isPaintable()
          Determines whether this property editor is paintable.
 void paintValue(java.awt.Graphics graphics, java.awt.Rectangle rect)
          Paint a representation of the value into a given area of screen real estate.
 void setAsText(java.lang.String szText)
          Set the property value by parsing a given String.
 void setValue(java.lang.Object objValue)
          Set (or change) the object that is to be edited.
 boolean supportsCustomEditor()
          Specifies this property editor supports a custom editor.
 void tableChanged(javax.swing.event.TableModelEvent e)
          This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.
 
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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, 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
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

HWMComboBoxPropEditor

public HWMComboBoxPropEditor()
Constructor

Method Detail

getCustomEditor

public java.awt.Component getCustomEditor()
Returns the custom editor

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Returns:
A java.awt.Component that will allow a human to directly edit the current property value

supportsCustomEditor

public boolean supportsCustomEditor()
Specifies this property editor supports a custom editor.

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor
Returns:
True if the propertyEditor can provide a custom editor.

setValue

public void setValue(java.lang.Object objValue)
Set (or change) the object that is to be edited. Primitive types such as "int" must be wrapped as the corresponding object type such as "java.lang.Integer".

Specified by:
setValue in interface java.beans.PropertyEditor
Parameters:
objValue - - The new target object to be edited.

getJavaInitializationString

public java.lang.String getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property.

Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor

getTags

public java.lang.String[] getTags()
Since the propertyvalue is not one of a set, this returns null.

Specified by:
getTags in interface java.beans.PropertyEditor
Returns:
String array(null in this case)

getValue

public java.lang.Object getValue()
Gets the property value.

Specified by:
getValue in interface java.beans.PropertyEditor
Returns:
The value of the property. Primitive types such as "int" will be wrapped as the corresponding object type such as "java.lang.Integer".

setAsText

public void setAsText(java.lang.String szText)
Set the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.

Specified by:
setAsText in interface java.beans.PropertyEditor
Parameters:
szText - - The string to be parsed.

isPaintable

public boolean isPaintable()
Determines whether this property editor is paintable.

Specified by:
isPaintable in interface java.beans.PropertyEditor
Returns:
True if the class will honor the paintValue method.

paintValue

public void paintValue(java.awt.Graphics graphics,
                       java.awt.Rectangle rect)
Paint a representation of the value into a given area of screen real estate.

Specified by:
paintValue in interface java.beans.PropertyEditor
Parameters:
graphics - - Graphics object to paint into.
rect - - Rectangle within graphics object into which we should paint

getAsText

public java.lang.String getAsText()
Gets the property value as text.

Specified by:
getAsText in interface java.beans.PropertyEditor
Returns:
The property value as a human editable string. Returns null if the value can't be expressed as an editable string.

actionPerformed

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

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

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed. Not needed here since the HWMManager takes care of getting the values from this editor

Specified by:
tableChanged in interface javax.swing.event.TableModelListener