Package net.sf.freecol.client.gui.panel
Class StatisticsPanel.StatisticsModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- net.sf.freecol.client.gui.panel.StatisticsPanel.StatisticsModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
- Enclosing class:
- StatisticsPanel
private static class StatisticsPanel.StatisticsModel extends javax.swing.table.AbstractTableModel
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
columnNames
private java.lang.Object[][]
data
private static int
NAME_COLUMN
private static int
VALUE_COLUMN
-
Constructor Summary
Constructors Constructor Description StatisticsModel()
A standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>
getColumnClass(int column)
int
getColumnCount()
java.lang.String
getColumnName(int column)
int
getRowCount()
java.lang.Object
getValueAt(int row, int column)
void
setData(java.util.Map<java.lang.String,java.lang.String> statsData)
Gives this table model the data that is being used in the table.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Field Detail
-
NAME_COLUMN
private static final int NAME_COLUMN
- See Also:
- Constant Field Values
-
VALUE_COLUMN
private static final int VALUE_COLUMN
- See Also:
- Constant Field Values
-
columnNames
private final java.lang.String[] columnNames
-
data
private java.lang.Object[][] data
-
-
Method Detail
-
setData
public void setData(java.util.Map<java.lang.String,java.lang.String> statsData)
Gives this table model the data that is being used in the table. This method should only be called to initialize the data set. To modify or extend the data set use other methods.- Parameters:
statsData
- The map of key,value pairs to enter.
-
getColumnClass
public java.lang.Class<?> getColumnClass(int column)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
getColumnName
public java.lang.String getColumnName(int column)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
getColumnCount
public int getColumnCount()
-
getRowCount
public int getRowCount()
-
getValueAt
public java.lang.Object getValueAt(int row, int column)
-
-