|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zfqjava.swing.cell.AbstractCellEditor
com.zfqjava.swing.cell.ObjectCellEditor
public class ObjectCellEditor
ObjectCellEditor provides a object editor,
can be used as JTable, JTree
cell editor.
| Field Summary | |
|---|---|
static int |
A_COMBO_BOX
Identifies the com.zfqjava.swing.AComboBox component type. |
static int |
COMBO_BOX
Identifies the combobox component type. |
protected int |
defaultHorizontalAlignment
The default horizontal alignment. |
static int |
TEXT_FIELD
Identifies the textfield component type. |
protected JTextField |
textField
The text field to set text. |
| 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_LOST, listenerList, STOP_EDITING_ON_FOCUS_LOST, useSelectionColor |
| Constructor Summary | |
|---|---|
ObjectCellEditor()
Constructs a DateCellEditor |
|
| Method Summary | |
|---|---|
protected void |
commitEdit()
Commits the editing. |
protected AComboBox |
createAComboBox()
Factory methods to create AComboBox. |
protected JComboBox |
createComboBox()
Factory methods to create JComboBox. |
protected ComboBoxModel |
createComboBoxModel()
Creates a default ComboBoxModel for JComboBox. |
protected JTextField |
createTextField()
Creates the text field. |
Component |
getComponent()
Returns the component for this editor. |
int |
getComponentType()
Returns the component type for this renderer. |
int |
getDefaultHorizontalAlignment()
Returns the default horizontal alignment. |
protected Object |
getEditingValue()
Returns the current editing value for this editor |
protected Object |
getValue()
Returns the value for current editor |
void |
setComponentType(int componentType)
Sets the component type for this renderer. |
void |
setDefaultHorizontalAlignment(int alignment)
Sets the default horizontal alignment. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected JTextField textField
protected int defaultHorizontalAlignment
The default value is SwingConstants.LEADING.
public static final int TEXT_FIELD
public static final int COMBO_BOX
public static final int A_COMBO_BOX
| Constructor Detail |
|---|
public ObjectCellEditor()
| Method Detail |
|---|
protected JTextField createTextField()
protected JComboBox createComboBox()
protected ComboBoxModel createComboBoxModel()
protected AComboBox createAComboBox()
public void setDefaultHorizontalAlignment(int alignment)
alignment - the default horizontal alignmentgetDefaultHorizontalAlignment()public int getDefaultHorizontalAlignment()
setDefaultHorizontalAlignment(int)public void setComponentType(int componentType)
componentType - the component typepublic int getComponentType()
public Component getComponent()
AbstractCellEditor
getComponent in class AbstractCellEditorprotected void setValue(Object value)
AbstractCellEditor
setValue in class AbstractCellEditorvalue - the value to editorprotected Object getValue()
AbstractCellEditor
getValue in class AbstractCellEditorprotected Object getEditingValue()
AbstractCellEditor
getEditingValue in class AbstractCellEditor
protected void commitEdit()
throws ParseException
AbstractCellEditorAbstractCellEditor.stopCellEditing(), if
cannot commit current editing, should throws exception.
commitEdit in class AbstractCellEditorParseException - if cannot commit the editingpublic void updateUI()
AbstractCellEditor
updateUI in class AbstractCellEditorpublic void setOpaque(boolean opaque)
AbstractCellEditor
setOpaque in class AbstractCellEditoropaque - the opaque property
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||