JClass 4.5.0 API
Documentation

com.klg.jclass.field.cell
Class JCSpinFieldCellEditor

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.util.swing.AbstractSpinBox
                          |
                          +--com.klg.jclass.field.JCSpinField
                                |
                                +--com.klg.jclass.field.cell.JCSpinFieldCellEditor

public class JCSpinFieldCellEditor
extends JCSpinField
implements com.klg.jclass.cell.JCCellEditor, KeyListener

JCSpinFieldCellEditor provides an editor using a simple JCSpinField component.

See Also:
Serialized Form

Inner classes inherited from class com.klg.jclass.util.swing.AbstractSpinBox
com.klg.jclass.util.swing.AbstractSpinBox.ArrowButton, com.klg.jclass.util.swing.AbstractSpinBox.MetalArrowButton, com.klg.jclass.util.swing.AbstractSpinBox.MetalBorder
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
protected  com.klg.jclass.cell.JCKeyModifier[] key_modifiers
           
protected  com.klg.jclass.cell.JCCellEditorSupport support
           
 
Fields inherited from class com.klg.jclass.field.JCSpinField
field, required, text, version
 
Fields inherited from class com.klg.jclass.util.swing.AbstractSpinBox
arrowKeySpinningAllowed, buttonTimer, continuousScroll, currentButton, DECREMENT, defaultPreferredSize, downArrow, editable, editor, editorIsValidateRoot, INCREMENT, l, metalBorder, NONE, renderer, renderPanel, rl, upArrow, valueListeners, valueModel
 
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
JCSpinFieldCellEditor()
          Creates a new JCSpinFieldCellEditor object.
JCSpinFieldCellEditor(Class c, JCValidator v)
          Constructs an empty JCSpinFieldCellEditor 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 cancelCellEditing()
          Called when the edit process is cancelled.
 Object getCellEditorValue()
          Returns the object to be commited.
 Component getComponent()
          Returns the JCSpinField 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 JCSpinField component by selecting the appropriate index associated with the data.
 boolean isModified()
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 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.JCSpinField
addNotify, addPropertyChangeListener, addValueListener, checkArrowButtons, commitEdit, createField, doSpin, getAbout, getDataProperties, getInvalidInfo, getSelectOnEnter, getState, getValidator, getValue, getValueModel, isRequired, preferredHeightOfView, processFocusLost, removePropertyChangeListener, removeValueListener, setAbout, setBackground, setDataProperties, setEditable, setForeground, setInvalidInfo, setRequired, setSelectOnEnter, setValidator, setValue, setValueModel, spinDown, spinUp
 
Methods inherited from class com.klg.jclass.util.swing.AbstractSpinBox
compareToValue, configureArrowButtons, createDecrArrow, createIncrArrow, doBorder, doFocusedLook, doLayout, doNonFocusedLook, getDecrementArrow, getEditor, getIncrementArrow, getPreferredSize, getRenderer, handleKeyPressed, isArrowKeySpinningAllowed, isContinuousScroll, isEditable, isEnabled, isFocusTraversable, paint, preferredWidthOfView, processValueChanged, processValueChanging, requestFocus, setArrowEnabled, setArrowKeySpinningAllowed, setContinuousScroll, setEditor, setEnabled, setLayout, setRenderer, setUI, swapEditorRenderer, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, 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, 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, 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

key_modifiers

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

JCSpinFieldCellEditor

public JCSpinFieldCellEditor()
Creates a new JCSpinFieldCellEditor object.

JCSpinFieldCellEditor

public JCSpinFieldCellEditor(Class c,
                             JCValidator v)
Constructs an empty JCSpinFieldCellEditor 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 JCSpinField component by selecting the appropriate index associated with the data.
Specified by:
initialize in interface com.klg.jclass.cell.JCCellEditor

getComponent

public Component getComponent()
Returns the JCSpinField 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

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

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