Class TreeTable

    • Constructor Detail

      • TreeTable

        public TreeTable​(ParseTreeTableModel treeTableModel)
        Creates TreeTable base on TreeTableModel.
        treeTableModel - Tree table model
    • Method Detail

      • makeCodeSelection

        private void makeCodeSelection()
        Make selection of code in a text area.
      • setColumnsInitialWidth

        private void setColumnsInitialWidth()
        Set initial value of width for columns in table.
      • updateTreeTable

        private void updateTreeTable​(String xpath,
                                     Deque<DetailAST> nodes)
        Updates the Treetable by expanding paths in the tree and highlighting associated code.
        xpath - the XPath query to show in case of no match
        nodes - the deque of DetailAST nodes to match in TreeTable and XPath editor
      • expandTreeTableByPath

        private void expandTreeTableByPath​(DetailAST node)
        Expands path in tree table to given node so that user can see the node.
        node - node to expand table by
      • getAllMatchingXpathQueriesText

        private static String getAllMatchingXpathQueriesText​(Deque<DetailAST> nodes)
        Generates a String with all matching XPath queries separated by newlines.
        nodes - deque of nodes to generate queries for
        complete text of all XPath expressions separated by newlines.
      • 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.
        updateUI in class JTable
      • setRowHeight

        public void setRowHeight​(int newRowHeight)
        Overridden to pass the new rowHeight to the tree.
        setRowHeight in class JTable
      • getTree

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

        public void setEditor​(JTextArea textArea)
        Sets text area editor.
        textArea - JTextArea component.
      • setXpathEditor

        public void setXpathEditor​(JTextArea xpathTextArea)
        Sets text area xpathEditor.
        xpathTextArea - JTextArea component.