org.yasl.tables.buttoncell
Class YASLButtonCellEditor

java.lang.Object
  extended byjavax.swing.AbstractCellEditor
      extended byorg.yasl.tables.buttoncell.YASLButtonCellEditor
All Implemented Interfaces:
CellEditor, Serializable, TableCellEditor

public class YASLButtonCellEditor
extends AbstractCellEditor
implements TableCellEditor

TableCell Editor for JButtons in a table.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
YASLButtonCellEditor()
           
 
Method Summary
 Object getCellEditorValue()
          Returns the JButton contained in the editor.
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          Sets the editor's button based on the value param.
 
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

YASLButtonCellEditor

public YASLButtonCellEditor()
Method Detail

getCellEditorValue

public Object getCellEditorValue()
Returns the JButton contained in the editor.

Specified by:
getCellEditorValue in interface CellEditor
Returns:
Object

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Sets the editor's button based on the value param.

From TableCellEditor's Documentation:

Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface TableCellEditor
Parameters:
table - JTable
value - Object
isSelected - boolean
row - int
column - int
Returns:
Component