public class Editor
extends java.lang.Object
implements javax.swing.table.TableCellEditor, javax.swing.event.CellEditorListener
| Modifier and Type | Field and Description |
|---|---|
private PropertyView.Attribute |
attribute
Attribute being edited
|
private ColorEditor |
colorEditor
Color editor
|
private javax.swing.DefaultCellEditor |
defaultEditor
Default editor
|
private DimensionEditor |
dimensionEditor
Dimension editor
|
private FileEditor |
fileEditor
File editor
|
private SliderEditor.Float |
floatSliderEditor
Slider editor
|
private ListEditor<java.lang.Object> |
listEditor
List editor
|
private LongTextEditor |
longTextEditor
Long text editor
|
private PropertyView |
propertyView
View
|
private SpinnerEditor |
spinnerEditor
Spinner editor
|
private javax.swing.table.TableCellEditor |
subEditor
The delegate subeditor
|
private javax.swing.table.TableCellEditor[] |
subEditors
The subeditors
|
private boolean |
useDefaults |
| Constructor and Description |
|---|
Editor(PropertyView propertyView)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCellEditorListener(javax.swing.event.CellEditorListener listener) |
void |
cancelCellEditing() |
void |
editingCanceled(javax.swing.event.ChangeEvent e) |
void |
editingStopped(javax.swing.event.ChangeEvent e) |
java.lang.Object |
getCellEditorValue() |
private java.io.File |
getImageRepository()
Get image repository
|
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column) |
java.lang.Object |
getValue() |
boolean |
isCellEditable(java.util.EventObject anEvent) |
private static void |
populate(javax.swing.JComboBox<java.lang.Object> combo,
java.lang.Object[] objects,
boolean useDefault)
Populate combobox (no default choice)
|
private void |
populateWithFonts(javax.swing.JComboBox<java.lang.Object> combo)
Populate combobox with fonts
|
private void |
populateWithTrueFalse(javax.swing.JComboBox<java.lang.Object> combo)
Populate combobox with true/false
|
void |
removeCellEditorListener(javax.swing.event.CellEditorListener listener) |
boolean |
shouldSelectCell(java.util.EventObject event) |
boolean |
stopCellEditing() |
private final boolean useDefaults
private final PropertyView propertyView
private PropertyView.Attribute attribute
private final ColorEditor colorEditor
private final FileEditor fileEditor
private final ListEditor<java.lang.Object> listEditor
private final LongTextEditor longTextEditor
private final DimensionEditor dimensionEditor
private final SliderEditor.Float floatSliderEditor
private final SpinnerEditor spinnerEditor
private final javax.swing.DefaultCellEditor defaultEditor
private javax.swing.table.TableCellEditor subEditor
private final javax.swing.table.TableCellEditor[] subEditors
public Editor(PropertyView propertyView)
propertyView - viewpublic java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
getTableCellEditorComponent in interface javax.swing.table.TableCellEditorpublic java.lang.Object getCellEditorValue()
getCellEditorValue in interface javax.swing.CellEditorpublic java.lang.Object getValue()
public boolean shouldSelectCell(java.util.EventObject event)
shouldSelectCell in interface javax.swing.CellEditorpublic boolean stopCellEditing()
stopCellEditing in interface javax.swing.CellEditorpublic void cancelCellEditing()
cancelCellEditing in interface javax.swing.CellEditorpublic boolean isCellEditable(java.util.EventObject anEvent)
isCellEditable in interface javax.swing.CellEditorprivate java.io.File getImageRepository()
private static void populate(javax.swing.JComboBox<java.lang.Object> combo,
java.lang.Object[] objects,
boolean useDefault)
combo - comboboxobjects - array of objectsuseDefault - use defaultsprivate void populateWithTrueFalse(javax.swing.JComboBox<java.lang.Object> combo)
combo - comboboxprivate void populateWithFonts(javax.swing.JComboBox<java.lang.Object> combo)
combo - comboboxpublic void editingCanceled(javax.swing.event.ChangeEvent e)
editingCanceled in interface javax.swing.event.CellEditorListenerpublic void editingStopped(javax.swing.event.ChangeEvent e)
editingStopped in interface javax.swing.event.CellEditorListenerpublic void addCellEditorListener(javax.swing.event.CellEditorListener listener)
addCellEditorListener in interface javax.swing.CellEditorpublic void removeCellEditorListener(javax.swing.event.CellEditorListener listener)
removeCellEditorListener in interface javax.swing.CellEditor