Package org.jdesktop.swingx.treetable

Examples of org.jdesktop.swingx.treetable.TreeTableModel


     * may be shared by any number of JXTreeTable instances.
     *
     * @param treeModel data model for this JXTreeTable
     */
    public void setTreeTableModel(TreeTableModel treeModel) {
        TreeTableModel old = getTreeTableModel();
//        boolean rootVisible = isRootVisible();
//        setRootVisible(false);
        renderer.setModel(treeModel);
//        setRootVisible(rootVisible);
       
View Full Code Here


                    updateAfterExpansionEvent(event);
                }
            });
            tree.addPropertyChangeListener("model", new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent evt) {
                    TreeTableModel model = (TreeTableModel) evt.getOldValue();
                    model.removeTreeModelListener(getTreeModelListener());
                   
                    model = (TreeTableModel) evt.getNewValue();
                    model.addTreeModelListener(getTreeModelListener());
                   
                    fireTableStructureChanged();
                }
            });
        }
View Full Code Here

    DefaultMutableTreeTableNode root = new DefaultMutableTreeTableNode("root");
    root.add(new DefaultMutableTreeTableNode("child1"));
    root.add(new MyMutableTreeTableNode(new String[]{"child2", "1", "2", "3"}));
    root.add(new DefaultMutableTreeTableNode("child3"));
    List<String> columns = Arrays.asList("root", "col1", "col2", "col3");
    TreeTableModel m = new DefaultTreeTableModel(root, columns);
    treeTable.setTreeTableModel(m);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    add(treeTable, BorderLayout.CENTER);
    pack();
    repaint();
View Full Code Here

        String text = filterField.getText();
        return StringUtils.isBlank(text) ? null : new DbObjectsViewStringFilter(text);
    }

    private DbObjectsTreeModel getModel() {
        TreeTableModel model = treeTable.getTreeTableModel();
        return (model instanceof DbObjectsTreeModel) ? (DbObjectsTreeModel) model : null;
    }
View Full Code Here

        selectionListeners = new SelectionListeners();
    }

    private JXTreeTable createTreeTable() {
        TreeTableNode root = new RootNode(model.getProjectItem());
        TreeTableModel model = new DbObjectsTreeModel(root);
        JXTreeTable t = new TreeTableImpl(model);
        t.setRootVisible(true);
        t.addTreeExpansionListener(expansionListener);
        t.getSelectionModel().addListSelectionListener(new SelectionDispatcher());
        return t;
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.treetable.TreeTableModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.