Class JTreeTable

    • Constructor Detail

      • JTreeTable

        public JTreeTable​(TreeTableModel treeTableModel)
        Creates a new JTreeTable object.
        Parameters:
        treeTableModel - The tree table model.
    • Method Detail

      • getToolTipText

        public String getToolTipText​(MouseEvent event)
        The code in this method is copy and pasted from source code to the same method in javax.swing.JTable, except for one value change on one line. If you'd like to see the change, please read the source code below.
        Overrides:
        getToolTipText in class JTable
        Parameters:
        event - the mouse event we're reacting to
      • updateUI

        public void updateUI()
        Overridden to message super and forward the method to the tree. Since the tree is not actually in the component hierarchy it will never receive this unless we forward it in this manner.
        Overrides:
        updateUI in class JTable
      • getEditingRow

        public int getEditingRow()
        Returns the row being edited.
        Overrides:
        getEditingRow in class JTable
        Returns:
        the row being edited.
      • setRowHeight

        public void setRowHeight​(int rowHeight)
        Overridden to pass the new rowHeight to the tree.
        Overrides:
        setRowHeight in class JTable
        Parameters:
        rowHeight - the new height of the row
      • getTree

        public JTree getTree()
        Returns the tree that is being shared between the model.
        Returns:
        the JTree that is being shared between the model.