junit.extensions.awt.editor
Class StepEditor

java.lang.Object
  |
  +--javax.swing.AbstractCellEditor
        |
        +--junit.extensions.awt.editor.StepEditor
All Implemented Interfaces:
javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

public class StepEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

An editor for steps in the script editor. It'd be nice to provide a real XML editor here...

See Also:
Serialized Form

Inner Class Summary
protected  class StepEditor.EditorDelegate
           
 
Field Summary
protected  int clickCountToStart
           
protected  StepEditor.EditorDelegate delegate
           
protected  javax.swing.JComponent editorComponent
           
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
StepEditor()
          Constructs a StepEditor that uses a text field.
 
Method Summary
 void cancelCellEditing()
           
 java.lang.Object getCellEditorValue()
           
 int getClickCountToStart()
          ClickCountToStart controls the number of clicks required to start editing.
 java.awt.Component getComponent()
          Returns the a reference to the editor component.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
 boolean isCellEditable(java.util.EventObject anEvent)
           
 void setClickCountToStart(int count)
          Specifies the number of clicks needed to start editing.
 boolean shouldSelectCell(java.util.EventObject anEvent)
           
 boolean stopCellEditing()
           
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, 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
 

Field Detail

editorComponent

protected javax.swing.JComponent editorComponent

delegate

protected StepEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
Constructor Detail

StepEditor

public StepEditor()
Constructs a StepEditor that uses a text field.
Parameters:
x - a JTextField object ...
Method Detail

getComponent

public java.awt.Component getComponent()
Returns the a reference to the editor component.
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 java.lang.Object getCellEditorValue()
Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Overrides:
getCellEditorValue in class javax.swing.AbstractCellEditor

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Specified by:
isCellEditable in interface javax.swing.CellEditor
Overrides:
isCellEditable in class javax.swing.AbstractCellEditor

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
Specified by:
shouldSelectCell in interface javax.swing.CellEditor
Overrides:
shouldSelectCell in class javax.swing.AbstractCellEditor

stopCellEditing

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

cancelCellEditing

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

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
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)
Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor