public class ActionTableCellEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JButton |
actionButton |
protected javax.swing.JButton |
clearButton |
protected int |
clickCountToStart
An integer specifying the number of clicks needed to start editing.
|
protected int |
column |
protected java.awt.Component |
component |
protected boolean |
isClear |
protected javax.swing.JPanel |
mainPanel |
protected javax.swing.table.TableCellRenderer |
renderer |
protected int |
row |
protected javax.swing.JTable |
table |
protected java.lang.Object |
value |
Constructor and Description |
---|
ActionTableCellEditor(java.lang.Object rendererOrComponent) |
ActionTableCellEditor(java.lang.Object rendererOrComponent,
boolean enableDoubleClickOnRenderer) |
ActionTableCellEditor(java.lang.Object rendererOrComponent,
boolean isActionable,
boolean isClearable) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
clearPerformed() |
javax.swing.JButton |
getActionButton() |
java.lang.Object |
getCellEditorValue() |
javax.swing.JButton |
getClearButton() |
int |
getClickCountToStart()
Returns the number of clicks needed to start editing.
|
int |
getColumn() |
java.awt.Component |
getComponent() |
javax.swing.JPanel |
getMainPanel() |
javax.swing.table.TableCellRenderer |
getRenderer() |
int |
getRow() |
javax.swing.JTable |
getTable() |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column) |
java.lang.Object |
getValue() |
java.awt.Window |
getWindow() |
boolean |
isCellEditable(java.util.EventObject anEvent)
Returns true if
anEvent is not a
MouseEvent . |
void |
setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.
|
void |
setComponentValue() |
void |
setValue(java.lang.Object value) |
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell, stopCellEditing
protected final javax.swing.table.TableCellRenderer renderer
protected final java.awt.Component component
protected javax.swing.JButton actionButton
protected final javax.swing.JButton clearButton
protected final javax.swing.JPanel mainPanel
protected boolean isClear
protected java.lang.Object value
protected javax.swing.JTable table
protected int row
protected int column
protected int clickCountToStart
clickCountToStart
is defined as zero, it
will not initiate until a click occurs.public ActionTableCellEditor(java.lang.Object rendererOrComponent)
public ActionTableCellEditor(java.lang.Object rendererOrComponent, boolean enableDoubleClickOnRenderer)
public ActionTableCellEditor(java.lang.Object rendererOrComponent, boolean isActionable, boolean isClearable)
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
public java.awt.Window getWindow()
public boolean isCellEditable(java.util.EventObject anEvent)
anEvent
is not a
MouseEvent
. Otherwise, it returns true
if the necessary number of clicks have occurred, and
returns false otherwise.isCellEditable
in interface javax.swing.CellEditor
isCellEditable
in class javax.swing.AbstractCellEditor
anEvent
- the eventsetClickCountToStart(int)
,
AbstractCellEditor.shouldSelectCell(java.util.EventObject)
public void setClickCountToStart(int count)
count
- an int specifying the number of clicks needed to start editinggetClickCountToStart()
public int getClickCountToStart()
public void setComponentValue()
public void clearPerformed()
public java.lang.Object getCellEditorValue()
getCellEditorValue
in interface javax.swing.CellEditor
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public int getColumn()
public int getRow()
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public javax.swing.JButton getActionButton()
public javax.swing.table.TableCellRenderer getRenderer()
public javax.swing.JTable getTable()
public javax.swing.JButton getClearButton()
public java.awt.Component getComponent()
public javax.swing.JPanel getMainPanel()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.