public class MapTableModel extends AbstractTableModel
The MapTableModel
class extends a
AbstractTableModel
to abstract the contents of a database as
a tree in order to provide support for a MapTableBrowser
.
For details of some of the methods implemented here see javax.swing.table.AbstractTableModel
.
Modifier and Type | Field and Description |
---|---|
protected int |
columnCount |
protected String[] |
columnNames |
protected Object[][] |
data |
protected HashSet |
excludeList |
protected HashSet |
includeList |
protected int |
rowCount |
listenerList
Constructor and Description |
---|
MapTableModel()
Construct an empty single row table model.
|
MapTableModel(Map map,
Map descriptiveNameMap)
Construct a single row table model filled with the supplied attributes and values.
|
MapTableModel(Map map,
Map descriptiveNameMap,
HashSet includeList,
HashSet excludeList)
Construct a single row table model filled with the supplied attributes and values.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount() |
String |
getColumnName(int col) |
int |
getRowCount() |
Object |
getValueAt(int row,
int col) |
void |
initializeModelFromMap(Map map,
Map descriptiveNameMap)
Initialize a single row table model filled with the supplied attributes and values.
|
protected boolean |
isAcceptable(HashSet includeList,
HashSet excludeList,
String name)
Check whether or not the named attribute is acceptable for inclusion as a column in the table.
|
boolean |
isCellEditable(int row,
int col) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
protected int columnCount
protected String[] columnNames
protected Object[][] data
protected HashSet excludeList
protected HashSet includeList
protected int rowCount
public MapTableModel()
Construct an empty single row table model.
public MapTableModel(Map map, Map descriptiveNameMap)
Construct a single row table model filled with the supplied attributes and values.
map
- a map of string names for attributes to their string valuesdescriptiveNameMap
- a map of string names for attributes to descriptions for use as column titles (may be null)public MapTableModel(Map map, Map descriptiveNameMap, HashSet includeList, HashSet excludeList)
Construct a single row table model filled with the supplied attributes and values.
map
- a map of string names for attributes to their string valuesdescriptiveNameMap
- a map of string names for attributes to descriptions for use as column titles (may be null)includeList
- a set of upper case string names for suitable attributes (may be null)excludeList
- a set of upper case string names for unsuitable attributes (may be null)public int getColumnCount()
public String getColumnName(int col)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
col
- public int getRowCount()
public Object getValueAt(int row, int col)
row
- col
- public void initializeModelFromMap(Map map, Map descriptiveNameMap)
Initialize a single row table model filled with the supplied attributes and values.
map
- a map of string names for attributes to their string valuesdescriptiveNameMap
- a map of string names for attributes to descriptions for use as column titles (may be null)protected boolean isAcceptable(HashSet includeList, HashSet excludeList, String name)
Check whether or not the named attribute is acceptable for inclusion as a column in the table.
includeList
- a set of upper case string names for suitable attributes (currently ignored)excludeList
- a set of upper case string names for unsuitable attributesname
- the name of the attribute to be checked (case insensitive)public boolean isCellEditable(int row, int col)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
row
- col
-