Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class JFormattedComboBoxCellEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JComboBox
                  extended by com.ibm.etools.iseries.ui.JFormattedComboBox
                      extended by com.ibm.etools.iseries.ui.JFormattedComboBoxCellEditor
All Implemented Interfaces:
JFormattedComponent, ActionListener, ItemListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, CellEditor, ListDataListener, TableCellEditor

public class JFormattedComboBoxCellEditor
extends JFormattedComboBox
implements TableCellEditor, ItemListener, Serializable

This class is a wrapper class of com.ibm.etools.iseries.ui.JFormattedComboBox that implements the TableCellEditor interface. It can be used as a table cell editor for a JFormattedTableColumn, particularly for AS/400 data.

See Also:
JFormattedComboBox, TableCellEditor, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComboBox
JComboBox.AccessibleJComboBox, JComboBox.KeySelectionManager
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  ChangeEvent changeEvent
           
static String Copyright
           
protected  Border noFocusBorder
           
 
Fields inherited from class javax.swing.JComboBox
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, 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 com.ibm.etools.iseries.ui.JFormattedComponent
copyright
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JFormattedComboBoxCellEditor()
          Creates a new JFormattedComboxCellEditor.
JFormattedComboBoxCellEditor(ComboBoxModel aModel)
          Creates a new JFormattedComboxCellEditor from an existing ComboBoxModel.
JFormattedComboBoxCellEditor(ComboBoxModel aModel, FieldModel fm)
          Creates a new JFormattedComboxCellEditor with the specified ComBoxModel and field model.
JFormattedComboBoxCellEditor(FieldModel fm)
          Creates a new JFormattedComboxCellEditor with the specified field model.
JFormattedComboBoxCellEditor(Object[] items)
          Creates a new JFormattedComboxCellEditor with specified items.
JFormattedComboBoxCellEditor(Object[] items, FieldModel fm)
          Creates a new JFormattedComboxCellEditor with specified items and field model.
JFormattedComboBoxCellEditor(Vector items)
          Creates a new JFormattedComboxCellEditor with specified items.
JFormattedComboBoxCellEditor(Vector items, FieldModel fm)
          Creates a new JFormattedComboxCellEditor with specified items and field model.
 
Method Summary
 void addCellEditorListener(CellEditorListener l)
          Add a CellEditorListener to listener list.
 void cancelCellEditing()
          Cancel editing.
static String Copyright()
          Copyright notice.
protected  void fireEditingCanceled()
          Fires editing canceled event.
protected  void fireEditingStopped()
          Fires editing stopped event.
 Object getCellEditorValue()
          Gets the value of the editing cell.
 int getClickCountToStart()
          Gets the ClickCountToStart.
 EventListenerList getListenerList()
          Returns the listener list.
 Border getNoFocusBorder()
          Gets the border of cells without focus.
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          Sets an initial value for the editing.
 boolean isCellEditable(EventObject anEvent)
          Returns true if editing can be started.
 void itemStateChanged(ItemEvent e)
          Invoked when an item has been selected or deselected.
 void removeCellEditorListener(CellEditorListener l)
          Removes a CellEditorListener from listener list.
 void setClickCountToStart(int count)
          Specifies the number of clicks needed to start editing.
 void setNoFocusBorder(Border aBorder)
          Sets the border without focus of the cells.
 boolean shouldSelectCell(EventObject anEvent)
          Indicates whether the editing cell should be selected or not.
protected  boolean startCellEditing(EventObject anEvent)
          Checks whether or not to start the editing, called by isCellEditable(EventObject)
 boolean stopCellEditing()
          Stops the editing.
 
Methods inherited from class com.ibm.etools.iseries.ui.JFormattedComboBox
addItem, convertInternalToUnformatted, convertUnformattedToInternal, getFieldModel, getFont, getFormattedComboBoxEditor, getSelectedItemFormattedValue, getSelectedItemInternalValue, getValues, setFieldModel, setFont, setFormattedComboBoxEditor, setSelectedItem, setValues
 
Methods inherited from class javax.swing.JComboBox
actionPerformed, actionPropertyChanged, addActionListener, addItemListener, addPopupMenuListener, configureEditor, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setUI, showPopup, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

changeEvent

protected transient ChangeEvent changeEvent

noFocusBorder

protected Border noFocusBorder
Constructor Detail

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor()
Creates a new JFormattedComboxCellEditor.


JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(Object[] items)
Creates a new JFormattedComboxCellEditor with specified items.

Parameters:
items - The items to be displayed.

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(Object[] items,
                                    FieldModel fm)
Creates a new JFormattedComboxCellEditor with specified items and field model.

Parameters:
items - The items to be displayed.
fm - The field model for formatting and validating.

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(FieldModel fm)
Creates a new JFormattedComboxCellEditor with the specified field model.

Parameters:
fm - The field model for formatting and validating.

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(Vector items)
Creates a new JFormattedComboxCellEditor with specified items.

Parameters:
items - The items to be displayed.

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(Vector items,
                                    FieldModel fm)
Creates a new JFormattedComboxCellEditor with specified items and field model.

Parameters:
items - The items to be displayed.
fm - The field model for formatting and validating.

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(ComboBoxModel aModel)
Creates a new JFormattedComboxCellEditor from an existing ComboBoxModel.

Parameters:
aModel - The ComboBoxModel.

JFormattedComboBoxCellEditor

public JFormattedComboBoxCellEditor(ComboBoxModel aModel,
                                    FieldModel fm)
Creates a new JFormattedComboxCellEditor with the specified ComBoxModel and field model.

Parameters:
aModel - The ComboBoxModel.
fm - The field model for formatting and validating.
Method Detail

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Add a CellEditorListener to listener list.

Specified by:
addCellEditorListener in interface CellEditor
Parameters:
l - The CellEditorListener to be added.
See Also:
CellEditor.addCellEditorListener(javax.swing.event.CellEditorListener)

cancelCellEditing

public void cancelCellEditing()
Cancel editing.

Specified by:
cancelCellEditing in interface CellEditor
See Also:
CellEditor.cancelCellEditing()

Copyright

public static String Copyright()
Copyright notice.

Returns:
java.lang.String

fireEditingCanceled

protected void fireEditingCanceled()
Fires editing canceled event.


fireEditingStopped

protected void fireEditingStopped()
Fires editing stopped event.


getCellEditorValue

public Object getCellEditorValue()
Gets the value of the editing cell.

Specified by:
getCellEditorValue in interface CellEditor
See Also:
CellEditor.getCellEditorValue()

getClickCountToStart

public int getClickCountToStart()
Gets the ClickCountToStart.


getListenerList

public EventListenerList getListenerList()
Returns the listener list.

Returns:
javax.swing.event.EventListenerList

getNoFocusBorder

public Border getNoFocusBorder()
Gets the border of cells without focus.

Returns:
javax.swing.border.Border

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Sets an initial value for the editing.

Specified by:
getTableCellEditorComponent in interface TableCellEditor
See Also:
TableCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int)

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Returns true if editing can be started.

Specified by:
isCellEditable in interface CellEditor
Parameters:
anEvent - the event used to consider whether to begin editing or not.
See Also:
CellEditor.isCellEditable(java.util.EventObject)

itemStateChanged

public void itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected.

Specified by:
itemStateChanged in interface ItemListener
Parameters:
e - The ItemEvent.

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Removes a CellEditorListener from listener list.

Specified by:
removeCellEditorListener in interface CellEditor
Parameters:
l - The CellEditorListener to be removed.
See Also:
CellEditor.removeCellEditorListener(javax.swing.event.CellEditorListener)

setClickCountToStart

public void setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.

Parameters:
count - The number of clicks.
See Also:
getClickCountToStart()

setNoFocusBorder

public void setNoFocusBorder(Border aBorder)
Sets the border without focus of the cells.

Parameters:
aBorder - The bords to be set.

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Indicates whether the editing cell should be selected or not.

Specified by:
shouldSelectCell in interface CellEditor
Parameters:
anEvent - The EventObject.
See Also:
CellEditor.shouldSelectCell(java.util.EventObject)

startCellEditing

protected boolean startCellEditing(EventObject anEvent)
Checks whether or not to start the editing, called by isCellEditable(EventObject)

Parameters:
anEvent - The EventObject.
See Also:
isCellEditable(java.util.EventObject)

stopCellEditing

public boolean stopCellEditing()
Stops the editing.

Specified by:
stopCellEditing in interface CellEditor
See Also:
CellEditor.stopCellEditing()

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.