Class AttributeListTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
com.pixelmed.dicom.AttributeListTableModel
All Implemented Interfaces:
Serializable, TableModel
Direct Known Subclasses:
AttributeListFunctionalGroupsTableModel

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.

See Also:
  • Field Details

    • columnCount

      protected int columnCount
    • rowCount

      protected int rowCount
    • columnNames

      protected String[] columnNames
    • data

      protected Object[][] data
    • includeList

      protected HashSet includeList
    • excludeList

      protected HashSet excludeList
  • Constructor Details

    • AttributeListTableModel

      public AttributeListTableModel()

      Construct an empty table model.

    • AttributeListTableModel

      public AttributeListTableModel(AttributeList list)

      Construct the table model from an attribute list.

      Parameters:
      list - the list of attributes whose values to use
    • AttributeListTableModel

      public AttributeListTableModel(AttributeList list, HashSet includeList, HashSet excludeList)

      Construct the table model from an attribute list.

      Parameters:
      list - the list of attributes whose values to use
      includeList - attributes to include
      excludeList - attributes to exclude
  • Method Details

    • isAcceptable

      protected 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.

      Parameters:
      includeList - the list of attributes to include
      excludeList - the list of attributes to exclude
      t - the tag of the attribute to test
      vr - the VR of the attribute to test
      Returns:
      true if attribute is acceptable for inclusion
    • initializeModelFromAttributeList

      public void initializeModelFromAttributeList(AttributeList list)

      Populate the table model from an attribute list.

      Parameters:
      list - the attributes whose values to use
    • getColumnCount

      public int getColumnCount()
    • getRowCount

      public int getRowCount()
    • getValueAt

      public Object getValueAt(int row, int col)
    • isCellEditable

      public boolean isCellEditable(int row, int col)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • getColumnName

      public String getColumnName(int col)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel