public abstract class ButtonColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor
ImageTable
.
Date Created: Feb 21, 2017changeEvent, listenerList
Constructor and Description |
---|
ButtonColumn(JTable table,
int columnIndex)
Instantiates a new button column.
|
Modifier and Type | Method and Description |
---|---|
Object |
getCellEditorValue()
Overrides javax.swing.CellEditor#getCellEditorValue()
|
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column)
Sets an initial value for the editor.
|
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the component used for drawing the cell.
|
void |
setButtons(JButton renderButton,
JButton editButton)
Sets the buttons.
|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
public ButtonColumn(JTable table, int columnIndex)
table
- the tablecolumnIndex
- the column indexpublic void setButtons(JButton renderButton, JButton editButton)
renderButton
- the render buttoneditButton
- the edit buttonpublic Object getCellEditorValue()
getCellEditorValue
in interface CellEditor
CellEditor.getCellEditorValue()
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
TableCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int)
getTableCellEditorComponent
in interface TableCellEditor
table
- the JTable objectvalue
- the value of the cell to be editedisSelected
- is selectedrow
- the row of the cell to be editedcolumn
- the column of the cell to be editedTableCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int)
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
TableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
getTableCellRendererComponent
in interface TableCellRenderer
table
- the JTable objectvalue
- the value of the cell to be editedisSelected
- is selectedhasFocus
- if true, render cell appropriately.row
- the row of the cell to be editedcolumn
- the column of the cell to be editedTableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
Copyright © 2017–2019 Funahashi Lab.. All rights reserved.