Class MekTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
megamek.client.ui.panels.phaseDisplay.lobby.MekTableModel
- All Implemented Interfaces:
Serializable,TableModel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA specialized renderer for the mek table. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUnit(InGameObject entity) Adds the given entity to the table and builds the display content.voidClears all saved data of the model including the entities.Class<?> getColumnClass(int c) intgetColumnName(int column) Returns the column header for the given column.getEntityAt(int row) Returns the entity of the given table row.Returns the subclassed cell renderer for all columns except the force column.intgetTooltip(int row, int col) Returns the tooltip for the given row and column from the tooltip cache.getValueAt(int row, int col) voidRebuilds the display content of the table cells from the present entity list.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Field Details
-
COL_UNIT
public static final int COL_UNIT -
COL_PILOT
public static final int COL_PILOT -
COL_PLAYER
public static final int COL_PLAYER -
COL_BV
public static final int COL_BV -
N_COL
public static final int N_COL -
DOT_SPACER
- See Also:
-
-
Constructor Details
-
MekTableModel
-
-
Method Details
-
getValueAt
-
getRowCount
public int getRowCount() -
clearData
public void clearData()Clears all saved data of the model including the entities. -
refreshCells
public void refreshCells()Rebuilds the display content of the table cells from the present entity list. Used when the GUI scale changes. -
addUnit
Adds the given entity to the table and builds the display content. -
getTooltip
Returns the tooltip for the given row and column from the tooltip cache. -
getColumnName
Returns the column header for the given column. The header text is HTML and scaled according to the GUI scale.- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getEntityAt
Returns the entity of the given table row. -
getRenderer
Returns the subclassed cell renderer for all columns except the force column. -
getColumnCount
public int getColumnCount() -
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-