JClass 4.5.0 API
Documentation

com.klg.jclass.field.cell
Class JCPopupFieldCellEditor

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JComboBox
                          |
                          +--com.klg.jclass.field.JCComboField
                                |
                                +--com.klg.jclass.field.JCPopupField
                                      |
                                      +--com.klg.jclass.field.cell.JCPopupFieldCellEditor

public class JCPopupFieldCellEditor
extends JCPopupField
implements com.klg.jclass.cell.JCCellEditor, ItemListener, KeyListener

JCPopupFieldCellEditor provides an editor using a simple JCPopupField component.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComboBox
JComboBox.AccessibleJComboBox, JComboBox.KeySelectionManager
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
protected  boolean ignoreEnterKey
           
protected  com.klg.jclass.cell.JCKeyModifier[] key_modifiers
           
protected  com.klg.jclass.cell.JCCellEditorSupport support
           
 
Fields inherited from class com.klg.jclass.field.JCPopupField
popupEditor
 
Fields inherited from class com.klg.jclass.field.JCComboField
field, required, text, version
 
Fields inherited from class javax.swing.JComboBox
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, 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
 
Constructor Summary
JCPopupFieldCellEditor()
          Creates a new JCPopupFieldCellEditor object.
JCPopupFieldCellEditor(Class c, JCValidator v)
          Constructs an empty JCPopupFieldCellEditor which expects an object of the specified class; which uses the specified validator
 
Method Summary
 void addCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
          Adds a listener to the list that's notified when the editor starts, stops, or cancels editing.
 void addNotify()
          Initializes the field object.
 void cancelCellEditing()
          Called when the edit process is cancelled.
 Object getCellEditorValue()
          Returns the object to be commited.
 Component getComponent()
          Returns the JCPopupField component.
 com.klg.jclass.cell.JCKeyModifier[] getReservedKeys()
          This editor reserves no keys for its own use
 void initialize(AWTEvent ev, com.klg.jclass.cell.JCCellInfo info, Object o)
          Initializes the JCPopupField component by selecting the appropriate index associated with the data.
 boolean isModified()
           
 void itemStateChanged(ItemEvent e)
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void paint(Graphics g)
          Overwrites superclass method to invoke popup.
 void removeCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
          Removes a listener from the list that's notified when the editor starts, stops, or cancels editing.
 boolean stopCellEditing()
          Called when the edit process is stopped
 
Methods inherited from class com.klg.jclass.field.JCPopupField
commit, getPopupEditor, getSelectedItem, inferLookAndFeelUI, setPopupEditor, setUI, updateUI, valueChanged, valueChanging
 
Methods inherited from class com.klg.jclass.field.JCComboField
add, addActionListener, addPropertyChangeListener, addValueListener, commitEdit, createField, getAbout, getDataProperties, getInvalidInfo, getSelectOnEnter, getState, getTextFieldEditor, getValidator, getValue, getValueModel, isRequired, removeActionListener, removePropertyChangeListener, removeValueListener, setAbout, setBackground, setDataProperties, setForeground, setInvalidInfo, setItems, setRequired, setSelectOnEnter, setValidator, setValue, setValueModel
 
Methods inherited from class javax.swing.JComboBox
actionPerformed, addItem, addItemListener, configureEditor, contentsChanged, createDefaultKeySelectionManager, fireActionEvent, fireItemStateChanged, getAccessibleContext, getActionCommand, getEditor, getItemAt, getItemCount, getKeySelectionManager, getMaximumRowCount, getModel, getRenderer, getSelectedIndex, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isFocusTraversable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyEvent, removeAllItems, removeItem, removeItemAt, removeItemListener, selectedItemChanged, selectWithKeyChar, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setRenderer, setSelectedIndex, setSelectedItem, showPopup
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

support

protected com.klg.jclass.cell.JCCellEditorSupport support

ignoreEnterKey

protected boolean ignoreEnterKey

key_modifiers

protected com.klg.jclass.cell.JCKeyModifier[] key_modifiers
Constructor Detail

JCPopupFieldCellEditor

public JCPopupFieldCellEditor()
Creates a new JCPopupFieldCellEditor object.

JCPopupFieldCellEditor

public JCPopupFieldCellEditor(Class c,
                              JCValidator v)
Constructs an empty JCPopupFieldCellEditor which expects an object of the specified class; which uses the specified validator
Method Detail

initialize

public void initialize(AWTEvent ev,
                       com.klg.jclass.cell.JCCellInfo info,
                       Object o)
Initializes the JCPopupField component by selecting the appropriate index associated with the data.
Specified by:
initialize in interface com.klg.jclass.cell.JCCellEditor

paint

public void paint(Graphics g)
Overwrites superclass method to invoke popup.
Overrides:
paint in class JComponent

getComponent

public Component getComponent()
Returns the JCPopupField component.
Specified by:
getComponent in interface com.klg.jclass.cell.JCCellEditor

getCellEditorValue

public Object getCellEditorValue()
Returns the object to be commited.
Specified by:
getCellEditorValue in interface com.klg.jclass.cell.JCCellEditor

isModified

public boolean isModified()
Specified by:
isModified in interface com.klg.jclass.cell.JCCellEditor

stopCellEditing

public boolean stopCellEditing()
Called when the edit process is stopped
Specified by:
stopCellEditing in interface com.klg.jclass.cell.JCCellEditor

cancelCellEditing

public void cancelCellEditing()
Called when the edit process is cancelled.
Specified by:
cancelCellEditing in interface com.klg.jclass.cell.JCCellEditor

getReservedKeys

public com.klg.jclass.cell.JCKeyModifier[] getReservedKeys()
This editor reserves no keys for its own use
Specified by:
getReservedKeys in interface com.klg.jclass.cell.JCCellEditor

itemStateChanged

public void itemStateChanged(ItemEvent e)
Specified by:
itemStateChanged in interface ItemListener

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener

addCellEditorListener

public void addCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
Adds a listener to the list that's notified when the editor starts, stops, or cancels editing.
Parameters:
l - the JCCellEditorListener

removeCellEditorListener

public void removeCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
Removes a listener from the list that's notified when the editor starts, stops, or cancels editing.
Parameters:
l - the JCCellEditorListener

addNotify

public void addNotify()
Description copied from class: JCComboField
Initializes the field object. This method should not need to be called.
Overrides:
addNotify in class JCComboField

Copyright© 1999-2000 KL Group Inc.
All rights reserved.