java.lang.Object
javax.swing.AbstractCellEditor
abbot.editor.editors.XMLEditor
- All Implemented Interfaces:
- javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
- public class XMLEditor
- extends javax.swing.AbstractCellEditor
- implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
An editor for an XMLifiable object.
It'd be nice to provide a real XML editor here...
|
Constructor Summary |
XMLEditor()
Constructs an XMLEditor that uses a text field. |
|
Method Summary |
void |
cancelCellEditing()
Signals to the CellEditor that it should cancel editing. |
java.lang.Object |
getCellEditorValue()
Returns the current value for the CellEditor. |
int |
getClickCountToStart()
ClickCountToStart controls the number of clicks required to start
editing. |
java.awt.Component |
getComponent()
Returns the component used to edit this editor's value. |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Get table cell editor component |
java.awt.Component |
getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
Returns a component that has been configured to edit one element (or
node) in a javax.swing.JTree component. |
boolean |
isCellEditable(java.util.EventObject anEvent)
Returns true if the specified event makes the editor
editable, and false otherwise. |
void |
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing. |
boolean |
shouldSelectCell(java.util.EventObject anEvent)
shouldSelectCell |
boolean |
stopCellEditing()
Signals to the CellEditor that it should stop editing,
accepting the current cell value, and returns true if the
editor actually stops editing, and false otherwise. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
textField
private javax.swing.JTextField textField
editorComponent
protected javax.swing.JComponent editorComponent
delegate
protected XMLEditor.EditorDelegate delegate
clickCountToStart
protected int clickCountToStart
XMLEditor
public XMLEditor()
- Constructs an XMLEditor that uses a text field.
getComponent
public java.awt.Component getComponent()
- Returns the component used to edit this editor's value.
setClickCountToStart
public void setClickCountToStart(int count)
- Specifies the number of clicks needed to start editing.
getClickCountToStart
public int getClickCountToStart()
- ClickCountToStart controls the number of clicks required to start
editing.
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Description copied from interface:
javax.swing.CellEditor
- Returns the current value for the
CellEditor.
- Specified by:
getCellEditorValue in interface javax.swing.CellEditor
isCellEditable
public boolean isCellEditable(java.util.EventObject anEvent)
- Description copied from interface:
javax.swing.CellEditor
- Returns
true if the specified event makes the editor
editable, and false otherwise.
- Specified by:
isCellEditable in interface javax.swing.CellEditor
shouldSelectCell
public boolean shouldSelectCell(java.util.EventObject anEvent)
- Description copied from interface:
javax.swing.CellEditor
- shouldSelectCell
- Specified by:
shouldSelectCell in interface javax.swing.CellEditor
stopCellEditing
public boolean stopCellEditing()
- Description copied from interface:
javax.swing.CellEditor
- Signals to the
CellEditor that it should stop editing,
accepting the current cell value, and returns true if the
editor actually stops editing, and false otherwise.
- Specified by:
stopCellEditing in interface javax.swing.CellEditor
cancelCellEditing
public void cancelCellEditing()
- Description copied from interface:
javax.swing.CellEditor
- Signals to the
CellEditor that it should cancel editing.
- Specified by:
cancelCellEditing in interface javax.swing.CellEditor
getTreeCellEditorComponent
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
- Description copied from interface:
javax.swing.tree.TreeCellEditor
- Returns a component that has been configured to edit one element (or
node) in a javax.swing.JTree component. The arguments to this method are used
to pass in the value and state of the element to be edited.
- Specified by:
getTreeCellEditorComponent in interface javax.swing.tree.TreeCellEditor
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- Description copied from interface:
javax.swing.table.TableCellEditor
- Get table cell editor component
- Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor