Class CriticalTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
megameklab.ui.util.CriticalTableModel
All Implemented Interfaces:
Serializable, TableModel

public class CriticalTableModel extends AbstractTableModel
See Also:
  • Field Details

  • Constructor Details

    • CriticalTableModel

      public CriticalTableModel(megamek.common.units.Entity unit, int tableType)
  • Method Details

    • getColumnCount

      public int getColumnCount()
    • updateUnit

      public void updateUnit(megamek.common.units.Entity unit)
    • refreshModel

      public void refreshModel()
    • initColumnSizes

      public void initColumnSizes(JTable table)
    • getRowCount

      public int getRowCount()
    • getColumnName

      public String getColumnName(int col)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • isCellEditable

      public boolean isCellEditable(int row, int col)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • getValueAt

      public Object getValueAt(int row, int col)
    • setValueAt

      public void setValueAt(Object aValue, int rowIndex, int columnIndex)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
    • getRenderer

      public Renderer getRenderer()
    • addCrit

      public void addCrit(megamek.common.equipment.Mounted<?> mount)
    • removeCrit

      public void removeCrit(int location)
    • removeCrits

      public void removeCrits(int... locs)
      Remove a collection of crits specified by the given list of indices.
      Parameters:
      locs - An array of indices that specifies the crits to remove
    • removeAllCrits

      public void removeAllCrits()
    • removeMounted

      public void removeMounted(int row)
    • getCrits

      public List<megamek.common.equipment.Mounted<?>> getCrits()