public class MapTableModel
extends javax.swing.table.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 java.lang.String[] |
columnNames |
protected java.lang.Object[][] |
data |
protected java.util.HashSet |
excludeList |
protected java.util.HashSet |
includeList |
protected int |
rowCount |
Constructor and Description |
---|
MapTableModel()
Construct an empty single row table model.
|
MapTableModel(java.util.Map map,
java.util.Map descriptiveNameMap)
Construct a single row table model filled with the supplied attributes and values.
|
MapTableModel(java.util.Map map,
java.util.Map descriptiveNameMap,
java.util.HashSet includeList,
java.util.HashSet excludeList)
Construct a single row table model filled with the supplied attributes and values.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount() |
java.lang.String |
getColumnName(int col) |
int |
getRowCount() |
java.lang.Object |
getValueAt(int row,
int col) |
void |
initializeModelFromMap(java.util.Map map,
java.util.Map descriptiveNameMap)
Initialize a single row table model filled with the supplied attributes and values.
|
protected boolean |
isAcceptable(java.util.HashSet includeList,
java.util.HashSet excludeList,
java.lang.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 java.lang.String[] columnNames
protected java.lang.Object[][] data
protected java.util.HashSet excludeList
protected java.util.HashSet includeList
protected int rowCount
public MapTableModel()
Construct an empty single row table model.
public MapTableModel(java.util.Map map, java.util.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(java.util.Map map, java.util.Map descriptiveNameMap, java.util.HashSet includeList, java.util.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 java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- public int getRowCount()
public java.lang.Object getValueAt(int row, int col)
row
- col
- public void initializeModelFromMap(java.util.Map map, java.util.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(java.util.HashSet includeList, java.util.HashSet excludeList, java.lang.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 javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- col
-