JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.higrid
Class NullCellEditor

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.higrid.NullCellEditor
All Implemented Interfaces:
EventListener, ImageObserver, JCCellEditor, JCCellEditorEventSource, JCValidateInterface, KeyListener, MenuContainer, Serializable

public class NullCellEditor
extends JComponent
implements JCCellEditor, JCValidateInterface, KeyListener

NullEditor provides a simple component that only draws a focus-like rectangle around the current cell. Its sole purpose is to indicate where an actual editor should be placed.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  Object data
           
protected  com.klg.jclass.cell.JCKeyModifier[] reservedKeys
           
protected  com.klg.jclass.cell.JCCellEditorSupport support
           
protected  com.klg.jclass.cell.validate.ValidateSupport validate_support
           
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
NullCellEditor()
          Default constructor
 
Method Summary
 void addCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
          Add a listener to the list that's notified when the editor starts, stops, or cancels editing.
 void addValidateListener(com.klg.jclass.cell.validate.JCValidateListener l)
          Add a new ValidateListener to the list.
 void cancelCellEditing()
          Called when the edit process is cancelled.
protected  boolean fireValidated(com.klg.jclass.cell.validate.JCValidateEvent ev)
           
 Object getCellEditorValue()
          Returns the object to be commited.
 Component getComponent()
          Returns the edit component.
 Dimension getPreferredSize(Graphics gc, com.klg.jclass.cell.JCCellInfo cellInfo, Object o)
           
 com.klg.jclass.cell.JCKeyModifier[] getReservedKeys()
          No keys are reserved.
 void initialize(AWTEvent ev, com.klg.jclass.cell.JCCellInfo info, Object o)
          The container calls initialize() before the edit starts to let the editor know what kind of event started the edit (via the AWTEvent object).
 boolean isFocusTraversable()
           
 boolean isModified()
          Returns true if the data has been modified.
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void processKeyEvent(KeyEvent e)
           
 void removeCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
          Remove a listener from the list that's notified
 void removeValidateListener(com.klg.jclass.cell.validate.JCValidateListener l)
          Remove a ValidateListener from the list.
 boolean stopCellEditing()
          Called when the edit process is stopped
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
 

Field Detail

data

protected Object data

support

protected com.klg.jclass.cell.JCCellEditorSupport support

reservedKeys

protected com.klg.jclass.cell.JCKeyModifier[] reservedKeys

validate_support

protected com.klg.jclass.cell.validate.ValidateSupport validate_support
Constructor Detail

NullCellEditor

public NullCellEditor()
Default constructor

Method Detail

initialize

public void initialize(AWTEvent ev,
                       com.klg.jclass.cell.JCCellInfo info,
                       Object o)
Description copied from interface: JCCellEditor
The container calls initialize() before the edit starts to let the editor know what kind of event started the edit (via the AWTEvent object).
Note: The size of the cell comes from info.getDrawingArea().

Implementors must handle null AWTEvents.

Specified by:
initialize in interface JCCellEditor
Parameters:
ev - event that initiated the edit operation
info - cell that displays information for the editor
o - item to be edited

getComponent

public Component getComponent()
Returns the edit component.

Specified by:
getComponent in interface JCCellEditor
Returns:
actual component that will be used to do the editing

getCellEditorValue

public Object getCellEditorValue()
Returns the object to be commited.

Specified by:
getCellEditorValue in interface JCCellEditor
Returns:
value contained in the editor

isModified

public boolean isModified()
Returns true if the data has been modified.

Specified by:
isModified in interface JCCellEditor
Returns:

fireValidated

protected boolean fireValidated(com.klg.jclass.cell.validate.JCValidateEvent ev)

stopCellEditing

public boolean stopCellEditing()
Called when the edit process is stopped

Specified by:
stopCellEditing in interface JCCellEditor
Returns:
true if editing was stopped

cancelCellEditing

public void cancelCellEditing()
Called when the edit process is cancelled.

Specified by:
cancelCellEditing in interface JCCellEditor

getPreferredSize

public Dimension getPreferredSize(Graphics gc,
                                  com.klg.jclass.cell.JCCellInfo cellInfo,
                                  Object o)

getReservedKeys

public com.klg.jclass.cell.JCKeyModifier[] getReservedKeys()
No keys are reserved.

Specified by:
getReservedKeys in interface JCCellEditor
Returns:
keys that the editor would like to reserve for itself

addCellEditorListener

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

Specified by:
addCellEditorListener in interface JCCellEditorEventSource
Parameters:
l - the CellEditorListener

removeCellEditorListener

public void removeCellEditorListener(com.klg.jclass.cell.JCCellEditorListener l)
Remove a listener from the list that's notified

Specified by:
removeCellEditorListener in interface JCCellEditorEventSource
Parameters:
l - the CellEditorListener

processKeyEvent

public void processKeyEvent(KeyEvent e)
Overrides:
processKeyEvent in class JComponent

keyPressed

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

keyReleased

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

keyTyped

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

addValidateListener

public void addValidateListener(com.klg.jclass.cell.validate.JCValidateListener l)
Add a new ValidateListener to the list.

Specified by:
addValidateListener in interface JCValidateInterface
Parameters:
l -

removeValidateListener

public void removeValidateListener(com.klg.jclass.cell.validate.JCValidateListener l)
Remove a ValidateListener from the list.

Specified by:
removeValidateListener in interface JCValidateInterface
Parameters:
l -

isFocusTraversable

public boolean isFocusTraversable()
Overrides:
isFocusTraversable in class Component

Copyright © 2004 Quest Software Inc..
All rights reserved.