public class AttributeListTableModel extends AbstractTableModel
The AttributeListTableModel
class extends a
AbstractTableModel
to abstract the contents of a list of attributes as
a single row table in order to provide support for a AttributeListTableBrowser
.
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 |
---|
AttributeListTableModel()
Construct an empty table model.
|
AttributeListTableModel(AttributeList list)
Construct the table model from an attribute list.
|
AttributeListTableModel(AttributeList list,
HashSet includeList,
HashSet excludeList)
Construct the table model from an attribute list.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnCount() |
String |
getColumnName(int col) |
int |
getRowCount() |
Object |
getValueAt(int row,
int col) |
void |
initializeModelFromAttributeList(AttributeList list)
Populate the table model from an attribute list.
|
protected boolean |
isAcceptable(HashSet includeList,
HashSet excludeList,
AttributeTag t,
byte[] vr)
Is an attribute acceptable for inclusion?
|
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 AttributeListTableModel()
Construct an empty table model.
public AttributeListTableModel(AttributeList list)
Construct the table model from an attribute list.
list
- the list of attributes whose values to usepublic AttributeListTableModel(AttributeList list, HashSet includeList, HashSet excludeList)
Construct the table model from an attribute list.
list
- the list of attributes whose values to useincludeList
- attributes to includeexcludeList
- attributes to excludepublic int getColumnCount()
public String getColumnName(int col)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public int getRowCount()
public Object getValueAt(int row, int col)
public void initializeModelFromAttributeList(AttributeList list)
Populate the table model from an attribute list.
list
- the attributes whose values to useprotected boolean isAcceptable(HashSet includeList, HashSet excludeList, AttributeTag t, byte[] vr)
Is an attribute acceptable for inclusion?
Attributes with a VR of SQ, OB, OW and private tags are always excluded.
includeList
- the list of attributes to includeexcludeList
- the list of attributes to excludet
- the tag of the attribute to testvr
- the VR of the attribute to testpublic boolean isCellEditable(int row, int col)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel