Class ButtonCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
jmt.framework.gui.table.editors.ButtonCellEditor
- All Implemented Interfaces:
ActionListener, Serializable, EventListener, CellEditor, TableCellEditor, TableCellRenderer
- Direct Known Subclasses:
DelayOffSectionPanel.DisabledButtonCellRenderer, JobParallelismEditor.DisabledButtonCellRenderer, ServerTypesEditor.DisabledButtonCellRenderer, SwitchoverTimesEditor.DisabledButtonCellRenderer, SwitchoverTimesTable.DisabledButtonCellRenderer
public class ButtonCellEditor
extends AbstractCellEditor
implements TableCellEditor, ActionListener, TableCellRenderer
Created by IntelliJ IDEA.
User: OrsotronIII
Date: 24-mag-2005
Time: 15.40.00
This cell editor displays a button. It is possible to insert a customized button in
a cell to implement various functionalities. As this class implements both cell
editor and cell renderer interfaces, it is possible to obtain a proper visualization
of this component, simply by overriding
getCellRenderer and
getCellEditor in JTable class.- See Also:
-
Field Summary
Fields inherited from class AbstractCellEditor
changeEvent, listenerList -
Constructor Summary
ConstructorsConstructorDescriptionButtonCellEditor(JButton jbutt) Creates a new instance ofButtonCellEditorgiven a customizedJButtonto be inserted in table. -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called whenever an action event is invoked by this editor's componentReturns a value to be updated in the table model.getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Returns component to edit table cell value.getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns component to be rendered in the cell table.Methods inherited from class AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CellEditor
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
-
Constructor Details
-
ButtonCellEditor
Creates a new instance ofButtonCellEditorgiven a customizedJButtonto be inserted in table.- Parameters:
jbutt- : button to be displayed in specific cell
-
-
Method Details
-
getCellEditorValue
Returns a value to be updated in the table model. This method must be overridden in implementing classes as it always returnnullvalue.- Specified by:
getCellEditorValuein interfaceCellEditor- Returns:
- : value to be updated inside the table model
-
actionPerformed
This method is called whenever an action event is invoked by this editor's component- Specified by:
actionPerformedin interfaceActionListener
-
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) Returns component to edit table cell value. Refer toTableCellEditorfor further informations about this method- Specified by:
getTableCellEditorComponentin interfaceTableCellEditor
-
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) Returns component to be rendered in the cell table. Refer toTableCellEditorfor further informations about this method- Specified by:
getTableCellRendererComponentin interfaceTableCellRenderer
-