com.zfqjava.swing.cell
Class DefaultCellEditor

java.lang.Object
  |
  +--com.zfqjava.swing.cell.AbstractCellEditor
        |
        +--com.zfqjava.swing.cell.DefaultCellEditor
All Implemented Interfaces:
javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
Direct Known Subclasses:
FileCellEditor

public class DefaultCellEditor
extends AbstractCellEditor

DefaultCellEditor provides a Default editor, can be used as JTable, JTree cell editor.


Field Summary
protected  javax.swing.JLabel iconLabel
          The label to set icon.
protected  javax.swing.JTextField textField
          The text field to set text.
 
Fields inherited from class com.zfqjava.swing.cell.AbstractCellEditor
changeEvent, listenerList, useSelectionColor
 
Constructor Summary
DefaultCellEditor()
          Constructs a DefaultCellEditor
 
Method Summary
protected  void commitEdit()
          Commits the editing.
 java.awt.Component getComponent()
          Returns the component for this editor.
protected  java.lang.Object getValue()
          Returns the value for current editor
 boolean isCellEditable(java.util.EventObject e)
          Returns true.
protected  void setValue(java.lang.Object value)
          Sets the value for current editor.
protected  void setValue(java.lang.Object value, boolean isSelected)
          Sets the value.
 
Methods inherited from class com.zfqjava.swing.cell.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorComponent, getCellEditorListeners, getCellEditorValue, getCellProvider, getListCellEditorComponent, getTableCellEditorComponent, getTreeCellEditorComponent, removeCellEditorListener, setCellProvider, shouldSelectCell, stopCellEditing, updateUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iconLabel

protected javax.swing.JLabel iconLabel
The label to set icon.

textField

protected javax.swing.JTextField textField
The text field to set text.
Constructor Detail

DefaultCellEditor

public DefaultCellEditor()
Constructs a DefaultCellEditor
Method Detail

getComponent

public java.awt.Component getComponent()
Description copied from class: AbstractCellEditor
Returns the component for this editor.
Overrides:
getComponent in class AbstractCellEditor
Following copied from class: com.zfqjava.swing.cell.AbstractCellEditor
Returns:
the component for this editor

setValue

protected void setValue(java.lang.Object value,
                        boolean isSelected)
Description copied from class: AbstractCellEditor
Sets the value.
Overrides:
setValue in class AbstractCellEditor
Following copied from class: com.zfqjava.swing.cell.AbstractCellEditor
Parameters:
value - the value
isSelected - the select state

setValue

protected void setValue(java.lang.Object value)
Description copied from class: AbstractCellEditor
Sets the value for current editor.
Overrides:
setValue in class AbstractCellEditor
Following copied from class: com.zfqjava.swing.cell.AbstractCellEditor
Parameters:
value - the value to editor

getValue

protected java.lang.Object getValue()
Description copied from class: AbstractCellEditor
Returns the value for current editor
Overrides:
getValue in class AbstractCellEditor
Following copied from class: com.zfqjava.swing.cell.AbstractCellEditor
Returns:
the value for current editor

commitEdit

protected void commitEdit()
                   throws java.text.ParseException
Description copied from class: AbstractCellEditor
Commits the editing. This invoke by AbstractCellEditor.stopCellEditing(), if cannot commit current editing, should throws exception.
Overrides:
commitEdit in class AbstractCellEditor
Following copied from class: com.zfqjava.swing.cell.AbstractCellEditor
Throws:
java.text.ParseException - if cannot commit the editing

isCellEditable

public boolean isCellEditable(java.util.EventObject e)
Description copied from class: AbstractCellEditor
Returns true.
Overrides:
isCellEditable in class AbstractCellEditor
Following copied from class: com.zfqjava.swing.cell.AbstractCellEditor
Parameters:
e - an event object
Returns:
true


Copyright © 2001-2003 Extreme Component, Inc. All rights reserved.