public class A4HMapMultiPicture.ButtonColumn extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener, MouseListener
The button can be invoked by a mouse click or by pressing the space bar when the cell has focus. Optionally a mnemonic can be set to invoke the button. When the button is invoked the provided Action is invoked. The source of the Action will be the table. The action command will contain the model row number of the button that was clicked.
changeEvent, listenerList| Constructor and Description |
|---|
ButtonColumn(JTable table,
Action action,
int column)
Create the ButtonColumn to be used as a renderer and editor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
Object |
getCellEditorValue() |
Border |
getFocusBorder()
Get foreground color of the button when the cell has focus.
|
int |
getMnemonic()
DOCUMENT ME!
|
Component |
getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int row,
int column) |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) |
void |
mouseClicked(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
setFocusBorder(Border focusBorder)
The foreground color of the button when the cell has focus.
|
void |
setMnemonic(int mnemonic)
The mnemonic to activate the button when the cell has focus.
|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditingpublic ButtonColumn(JTable table, Action action, int column)
table - the table containing the button renderer/editoraction - the Action to be invoked when the button is invokedcolumn - the column to which the button renderer/editor is addedpublic Border getFocusBorder()
public void setFocusBorder(Border focusBorder)
focusBorder - the foreground colorpublic int getMnemonic()
public void setMnemonic(int mnemonic)
mnemonic - the mnemonicpublic Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
getTableCellEditorComponent in interface TableCellEditorpublic Object getCellEditorValue()
getCellEditorValue in interface CellEditorpublic Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent in interface TableCellRendererpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerCopyright © 2012–2025 cismet GmbH. All rights reserved.