class BackupTableSyncButtonEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener
ActionListener interface
so it can listen to the events that occur during editing of the table.
An instance of this class is attached to the Synchronize column and is
responsible for synchronizing the respective backup when the Synchronize button is clicked.
| Modifier and Type | Field and Description |
|---|---|
private javax.swing.JButton |
btSyncButton |
private java.lang.String |
mBackupName |
private BackupTableModel |
mTableModel |
private javax.swing.JTable |
tbTable |
| Constructor and Description |
|---|
BackupTableSyncButtonEditor() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Invoked when the Synchronize button inside the table is pressed.
|
java.lang.Object |
getCellEditorValue()
Returns the value contained in the editor.
|
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Sets an initial
value for the editor. |
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditingprivate javax.swing.JButton btSyncButton
private java.lang.String mBackupName
private javax.swing.JTable tbTable
private BackupTableModel mTableModel
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
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.getTableCellEditorComponent in interface javax.swing.table.TableCellEditortable - the JTable that is asking the
editor to edit; can be nullvalue - the value of the cell to be edited; it is
up to the specific editor to interpret
and draw the value. For example, if value is
the string "true", it could be rendered as a
string or it could be rendered as a check
box that is checked. null
is a valid valueisSelected - true if the cell is to be rendered with
highlightingrow - the row of the cell being editedcolumn - the column of the cell being editedpublic java.lang.Object getCellEditorValue()
getCellEditorValue in interface javax.swing.CellEditorpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - the event passed to the BackupTableSyncButtonEditor