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:
  • Constructor Details

    • ButtonCellEditor

      public ButtonCellEditor(JButton jbutt)
      Creates a new instance of ButtonCellEditor given a customized JButton to be inserted in table.
      Parameters:
      jbutt - : button to be displayed in specific cell
  • Method Details

    • getCellEditorValue

      public Object getCellEditorValue()
      Returns a value to be updated in the table model. This method must be overridden in implementing classes as it always return null value.
      Specified by:
      getCellEditorValue in interface CellEditor
      Returns:
      : value to be updated inside the table model
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      This method is called whenever an action event is invoked by this editor's component
      Specified by:
      actionPerformed in interface ActionListener
    • getTableCellEditorComponent

      public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
      Returns component to edit table cell value. Refer to TableCellEditor for further informations about this method
      Specified by:
      getTableCellEditorComponent in interface TableCellEditor
    • 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 to TableCellEditor for further informations about this method
      Specified by:
      getTableCellRendererComponent in interface TableCellRenderer