JComponentPack 3.5

com.zfqjava.swing.cell
Class BooleanCellEditor

java.lang.Object
  extended by com.zfqjava.swing.cell.AbstractCellEditor
      extended by com.zfqjava.swing.cell.ObjectCellEditor
          extended by com.zfqjava.swing.cell.BooleanCellEditor
All Implemented Interfaces:
ActionListener, FocusListener, EventListener, CellEditor, ComboBoxEditor, TableCellEditor, TreeCellEditor

public class BooleanCellEditor
extends ObjectCellEditor

BooleanCellEditor provides a boolean editor, can be used as JTable, JTree cell editor.


Field Summary
static int CHECK_BOX
          Identifies the checkbox component type.
static int COMBO_BOX
          Identifies the combobox component type.
static int TEXT_FIELD
          Identifies the textfield component type.
 
Fields inherited from class com.zfqjava.swing.cell.ObjectCellEditor
A_COMBO_BOX, defaultHorizontalAlignment, defaultVerticalAlignment, textField
 
Fields inherited from class com.zfqjava.swing.cell.AbstractCellEditor
CANCEL_EDITING_ON_FOCUS_LOST, changeEvent, COMMIT, COMMIT_OR_EDITING, COMMIT_OR_REVERT, DO_NOTHING_ON_FOCUS_GAINED, DO_NOTHING_ON_FOCUS_LOST, listenerList, SELECT_ALL_ON_FOCUS_GAINED, STOP_EDITING_ON_FOCUS_LOST, useSelectionColor
 
Constructor Summary
BooleanCellEditor()
          Constructs a BooleanCellEditor
 
Method Summary
protected  void commitEdit()
          Commits the editing.
protected  ComboBoxModel createComboBoxModel()
          Creates a default ComboBoxModel for JComboBox.
 Component getComponent()
          Returns the component for this editor.
 Converter getConverter()
           
protected  Object getValue()
          Returns the value for current editor
 void setConverter(Converter converter)
           
 void setOpaque(boolean opaque)
          Sets the opaque property.
protected  void setValue(Object value)
          Sets the value for current editor.
 void updateUI()
          Updates UI.
 
Methods inherited from class com.zfqjava.swing.cell.ObjectCellEditor
createAComboBox, createButton, createComboBox, createTextField, getComponentType, getDefaultHorizontalAlignment, getDefaultVerticalAlignment, getEditingValue, setComponentType, setDefaultHorizontalAlignment, setDefaultVerticalAlignment, setValue
 
Methods inherited from class com.zfqjava.swing.cell.AbstractCellEditor
actionPerformed, addActionListener, addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, focusGained, focusLost, getCellArgs, getCellEditorComponent, getCellEditorComponentType, getCellEditorListeners, getCellEditorValue, getCellProvider, getClickCountToStart, getDefaultCellEditorComponentType, getEditingStopBehavior, getEditorComponent, getFocusGainedBehavior, getFocusLostBehavior, getItem, getListCellEditorComponent, getTableCellEditorComponent, getTreeCellEditorComponent, isCellEditable, isChangeBorderDisabled, isOpaque, removeActionListener, removeCellEditorListener, selectAll, setCellEditorComponentType, setCellProvider, setChangeBorderDisabled, setClickCountToStart, setDefaultCellEditorComponentType, setEditingStopBehavior, setFocusGainedBehavior, setFocusLostBehavior, setItem, shouldSelectCell, stopCellEditing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_FIELD

public static final int TEXT_FIELD
Identifies the textfield component type.

Since:
JDataGrid 1.6.1
See Also:
Constant Field Values

CHECK_BOX

public static final int CHECK_BOX
Identifies the checkbox component type.

Since:
JDataGrid 1.6.1
See Also:
Constant Field Values

COMBO_BOX

public static final int COMBO_BOX
Identifies the combobox component type.

Since:
JDataGrid 1.6.1
See Also:
Constant Field Values
Constructor Detail

BooleanCellEditor

public BooleanCellEditor()
Constructs a BooleanCellEditor

Method Detail

getConverter

public Converter getConverter()

setConverter

public void setConverter(Converter converter)

createComboBoxModel

protected ComboBoxModel createComboBoxModel()
Description copied from class: ObjectCellEditor
Creates a default ComboBoxModel for JComboBox.

Overrides:
createComboBoxModel in class ObjectCellEditor
Returns:
a default ComboBoxModel for JComboBox

getComponent

public Component getComponent()
Description copied from class: AbstractCellEditor
Returns the component for this editor.

Overrides:
getComponent in class ObjectCellEditor
Returns:
the component for this editor

setValue

protected void setValue(Object value)
Description copied from class: AbstractCellEditor
Sets the value for current editor.

Overrides:
setValue in class ObjectCellEditor
Parameters:
value - the value to editor

getValue

protected Object getValue()
Description copied from class: AbstractCellEditor
Returns the value for current editor

Overrides:
getValue in class ObjectCellEditor
Returns:
the value for current editor

commitEdit

protected void commitEdit()
                   throws 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 ObjectCellEditor
Throws:
ParseException - if cannot commit the editing

updateUI

public void updateUI()
Description copied from class: AbstractCellEditor
Updates UI.

Overrides:
updateUI in class ObjectCellEditor

setOpaque

public void setOpaque(boolean opaque)
Description copied from class: AbstractCellEditor
Sets the opaque property.

Overrides:
setOpaque in class ObjectCellEditor
Parameters:
opaque - the opaque property

JComponentPack 3.5

Send your Feedback
JComponentPack 3.5
Copyright © 2009 Extreme Component, Inc. All rights reserved.