Class TagInfoTableModel

    • Field Detail

      • m_Infos

        protected List<TagInfo> m_Infos
        the underlying tag infos.
    • Constructor Detail

      • TagInfoTableModel

        public TagInfoTableModel()
        Default constructor.
      • TagInfoTableModel

        public TagInfoTableModel​(TagInfo[] infos)
        Initializes the model with the provided tag infos.
        Parameters:
        infos - the tag infos to use
      • TagInfoTableModel

        public TagInfoTableModel​(List<TagInfo> infos)
        Initializes the model with the provided tag infos.
        Parameters:
        infos - the tag infos to use
    • Method Detail

      • clear

        public void clear()
        Removes all tags.
      • add

        public void add​(TagInfo info)
        Adds the tag info.
        Parameters:
        info - the info to add
      • addAll

        public void addAll​(TagInfo[] infos)
        Adds all the tag infos.
        Parameters:
        infos - the tag infos to add
      • addAll

        public void addAll​(List<TagInfo> infos)
        Adds all the tag infos.
        Parameters:
        infos - the tag infos to add
      • remove

        public TagInfo remove​(int rowIndex)
        Removes the tag info at the specified index.
        Parameters:
        rowIndex - the index to remove
        Returns:
        the removed tag info
      • get

        public TagInfo get​(int rowIndex)
        Returns the tag info at the specified location.
        Parameters:
        rowIndex - the index of the tag
        Returns:
        the associated tag
      • set

        public void set​(int rowIndex,
                        TagInfo info)
        Updates the tag info.
        Parameters:
        rowIndex - the index of the tag info
        info - the new tag info
      • isEmpty

        public boolean isEmpty()
        Returns whether there are no tags present.
        Returns:
        true if empty
      • getRowCount

        public int getRowCount()
        Returns the number of rows in the model. A JTable uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.
        Returns:
        the number of rows in the model
        See Also:
        getColumnCount()
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns in the model. A JTable uses this method to determine how many columns it should create and display by default.
        Returns:
        the number of columns in the model
        See Also:
        getRowCount()
      • getValueAt

        public Object getValueAt​(int rowIndex,
                                 int columnIndex)
        Returns the value for the cell at columnIndex and rowIndex.
        Parameters:
        rowIndex - the row whose value is to be queried
        columnIndex - the column whose value is to be queried
        Returns:
        the value Object at the specified cell
      • toArray

        public TagInfo[] toArray()
        Returns the underlying tags as array.
        Returns:
        the array