public class MenuColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener
changeEvent, listenerList
Constructor and Description |
---|
MenuColumn(JTable table,
int column)
Instantiates a new menu column.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent arg0)
Not used in this class
|
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.
|
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 MenuColumn(JTable table, int column)
table
- the JTable objectcolumn
- the number of columnspublic void actionPerformed(ActionEvent arg0)
actionPerformed
in interface ActionListener
arg0
- ActionEventActionListener.actionPerformed(java.awt.event.ActionEvent)
public 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.