abbot.editor.editors
Class XMLEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by abbot.editor.editors.XMLEditor
All Implemented Interfaces:
Serializable, CellEditor, TableCellEditor, TreeCellEditor

public class XMLEditor
extends AbstractCellEditor
implements TableCellEditor, TreeCellEditor

An editor for an XMLifiable object. It'd be nice to provide a real XML editor here...

See Also:
Serialized Form

Nested Class Summary
protected  class XMLEditor.EditorDelegate
           
 
Field Summary
protected  int clickCountToStart
           
protected  XMLEditor.EditorDelegate delegate
           
protected  JComponent editorComponent
           
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
XMLEditor()
          Constructs an XMLEditor that uses a text field.
 
Method Summary
 void cancelCellEditing()
           
 Object getCellEditorValue()
           
 int getClickCountToStart()
          ClickCountToStart controls the number of clicks required to start editing.
 Component getComponent()
          Returns the component used to edit this editor's value.
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
 boolean isCellEditable(EventObject anEvent)
           
 void setClickCountToStart(int count)
          Specifies the number of clicks needed to start editing.
 boolean shouldSelectCell(EventObject anEvent)
           
 boolean stopCellEditing()
           
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener
 

Field Detail

editorComponent

protected JComponent editorComponent

delegate

protected XMLEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
Constructor Detail

XMLEditor

public XMLEditor()
Constructs an XMLEditor that uses a text field.

Method Detail

getComponent

public Component getComponent()
Returns the component used to edit this editor's value.

Returns:
the editor Component

setClickCountToStart

public void setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.

Parameters:
count - an int specifying the number of clicks needed to start editing
See Also:
getClickCountToStart()

getClickCountToStart

public int getClickCountToStart()
ClickCountToStart controls the number of clicks required to start editing.


getCellEditorValue

public Object getCellEditorValue()
Specified by:
getCellEditorValue in interface CellEditor

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Specified by:
isCellEditable in interface CellEditor
Overrides:
isCellEditable in class AbstractCellEditor

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Specified by:
shouldSelectCell in interface CellEditor
Overrides:
shouldSelectCell in class AbstractCellEditor

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface CellEditor
Overrides:
stopCellEditing in class AbstractCellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface CellEditor
Overrides:
cancelCellEditing in class AbstractCellEditor

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Specified by:
getTreeCellEditorComponent in interface TreeCellEditor

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Specified by:
getTableCellEditorComponent in interface TableCellEditor


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge