org.simbrain.world.dataworld
Class ButtonEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by org.simbrain.world.dataworld.ButtonEditor
All Implemented Interfaces:
KeyListener, Serializable, EventListener, CellEditor, TableCellEditor

public class ButtonEditor
extends AbstractCellEditor
implements TableCellEditor, KeyListener

The ButtonEditor class provides an editor for buttons that allows you to change their names.

Author:
RJB
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
ButtonEditor(DataWorld dataWorld)
          Create a new button editor for the specified data world.
 
Method Summary
 Object getCellEditorValue()
           
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 void keyPressed(KeyEvent keyEvent)
           
 void keyReleased(KeyEvent keyEvent)
           
 void keyTyped(KeyEvent keyEvent)
           
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 
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, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Constructor Detail

ButtonEditor

public ButtonEditor(DataWorld dataWorld)
Create a new button editor for the specified data world.

Parameters:
dataWorld - data world
Method Detail

getCellEditorValue

public Object getCellEditorValue()
Specified by:
getCellEditorValue in interface CellEditor
See Also:
AbstractCellEditor

getTableCellEditorComponent

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

keyTyped

public void keyTyped(KeyEvent keyEvent)
Specified by:
keyTyped in interface KeyListener
See Also:
KeyListener

keyPressed

public void keyPressed(KeyEvent keyEvent)
Specified by:
keyPressed in interface KeyListener
See Also:
KeyListener

keyReleased

public void keyReleased(KeyEvent keyEvent)
Specified by:
keyReleased in interface KeyListener
See Also:
KeyListener