Package ucar.ui.table

Class TreeTableModelSorted

    • Constructor Detail

      • TreeTableModelSorted

        public TreeTableModelSorted​(String[] colName,
                                    ArrayList rows)
        This uses the mode where the selected column becomes the root of the tree.
        Parameters:
        colName - list of column names, must have length > 0.
        rows - array of rows that implement TableRow interface, may be empty but not null.
      • TreeTableModelSorted

        public TreeTableModelSorted​(ThreadSorter threadSorter,
                                    String[] colName,
                                    ArrayList rows)
        This is the mode that adds a column for threads.
        Parameters:
        threadSorter - if non-null, add thread column.
        colName - list of column names, must have length > 0.
        rows - array of rows that implement TableRow interface, may be empty but not null. We make a copy of the Array, but these point to the original objects.
    • Method Detail

      • isTreeSort

        public boolean isTreeSort()
      • useThreads

        public boolean useThreads()
      • isThreadsOn

        public boolean isThreadsOn()
      • setThreadsOn

        public void setThreadsOn​(boolean threadsOn)
      • getReverse

        public boolean getReverse()
      • setReverse

        public void setReverse​(boolean reverse)
      • getSortCol

        public int getSortCol()
      • setSortCol

        public void setSortCol​(int sortCol)
      • setSorter

        public void setSorter​(RowSorter sorter)
      • setRows

        public void setRows​(ArrayList rows)
        Set a new rowlist. This will automaticaly sort. We make a copy of the Array, but these point to the original objects.
        Parameters:
        rows - array of rows that implement TableRow interface
      • getRowCount

        public int getRowCount()
      • sort

        public void sort()
        sort using the current sortCol and reverse
      • sort

        public boolean sort​(int sortCol)
        sort using the current sortCol; toggle reverse
      • sort

        public void sort​(int sortCol,
                         boolean reverse)
        sort using the named sortCol and reverse
      • getChildCount

        public int getChildCount​(Object parent)
      • getChild

        public Object getChild​(Object parent,
                               int index)
      • getColumnCount

        public int getColumnCount()
        Description copied from interface: TreeTableModel
        Returns the number ofs availible column.
      • getColumnName

        public String getColumnName​(int col)
        Description copied from interface: TreeTableModel
        Returns the name for column number column.
      • getValueAt

        public Object getValueAt​(Object node,
                                 int col)
        Description copied from interface: TreeTableModel
        Returns the value to be displayed for node node, at column number column.
      • getRow

        public TableRow getRow​(int rowno)
      • addRowsToSetFromPath

        public void addRowsToSetFromPath​(JTree tree,
                                         TreePath path,
                                         Set set)