Package com.pixelmed.dicom

## Class AttributeListTableModel

- java.lang.Object
- - javax.swing.table.AbstractTableModel
  - - com.pixelmed.dicom.AttributeListTableModel

- All Implemented Interfaces:
    `java.io.Serializable`, `javax.swing.table.TableModel`
  Direct Known Subclasses:
    `AttributeListFunctionalGroupsTableModel`

      public class AttributeListTableModel
      extends javax.swing.table.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:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | 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` |

    - ### Fields inherited from class javax.swing.table.AbstractTableModel

      `listenerList`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AttributeListTableModel()` | Construct an empty table model.
    `AttributeListTableModel​(AttributeList list)` | Construct the table model from an attribute list.
    `AttributeListTableModel​(AttributeList list, java.util.HashSet includeList, java.util.HashSet excludeList)` | Construct the table model from an attribute list.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getColumnCount()` |
    `java.lang.String` | `getColumnName​(int col)` |
    `int` | `getRowCount()` |
    `java.lang.Object` | `getValueAt​(int row, int col)` |
    `void` | `initializeModelFromAttributeList​(AttributeList list)` | Populate the table model from an attribute list.
    `protected boolean` | `isAcceptable​(java.util.HashSet includeList, java.util.HashSet excludeList, AttributeTag t, byte[] vr)` | Is an attribute acceptable for inclusion?
    `boolean` | `isCellEditable​(int row, int col)` |

    - ### Methods inherited from class javax.swing.table.AbstractTableModel

      `addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### columnCount

          protected int columnCount

    - #### rowCount

          protected int rowCount

    - #### columnNames

          protected java.lang.String[] columnNames

    - #### data

          protected java.lang.Object[][] data

    - #### includeList

          protected java.util.HashSet includeList

    - #### excludeList

          protected java.util.HashSet excludeList

  - ### Constructor Detail

    - #### 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,
                                         java.util.HashSet includeList,
                                         java.util.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 Detail

    - #### isAcceptable

          protected boolean isAcceptable​(java.util.HashSet includeList,
                                         java.util.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 java.lang.Object getValueAt​(int row,
                                             int col)

    - #### isCellEditable

          public boolean isCellEditable​(int row,
                                        int col)

      Specified by:
        `isCellEditable` in interface `javax.swing.table.TableModel`
      Overrides:
        `isCellEditable` in class `javax.swing.table.AbstractTableModel`

    - #### getColumnName

          public java.lang.String getColumnName​(int col)

      Specified by:
        `getColumnName` in interface `javax.swing.table.TableModel`
      Overrides:
        `getColumnName` in class `javax.swing.table.AbstractTableModel`