Package org.netbeans.swing.outline

Examples of org.netbeans.swing.outline.Outline


            // will not happen.
        }
        SchemaRowModel rowModel = new SchemaRowModel();
        OutlineModel outlineModel = DefaultOutlineModel.createOutlineModel(model, rowModel, false, "Name");
       
        myOutline = new Outline();
        myOutline.setRootVisible(false);
        myOutline.setShowGrid(false);
        myOutline.setColumnHidingAllowed(false);
        myOutline.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
        myOutline.getColumnModel().setColumnSelectionAllowed(false);
View Full Code Here


    public NodeDataTable() {
        attributeUtils = AttributeUtils.getDefault();
        attributeColumnsController = Lookup.getDefault().lookup(AttributeColumnsController.class);

        outlineTable = new Outline();

        quickFilter = new QuickFilter() {

            public boolean accept(Object value) {
                if (value == null) {
View Full Code Here

     *
     * @return A list of the profile resource nodes selected in the outline.
     */
    public List<ProfileResourceNode> getSelectedNodes() {
        List<ProfileResourceNode> results = new ArrayList<ProfileResourceNode>();
        Outline outline = getResultsOutline();
        int[] selectedRows = outline.getSelectedRows();
        for (int i = selectedRows.length; i > 0; i--) {
            int index = selectedRows[i - 1];
            DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
                    .getValueAt(index, 0);
            ProfileResourceNode prn = (ProfileResourceNode) treeNode
                    .getUserObject();
            results.add(prn);
        }
View Full Code Here

    /**
     *
     * @return whether any rows are selected in the profile.
     */
    public boolean anyRowsSelected() {
        Outline outline = getResultsOutline();
        return outline.getSelectedRows().length > 0;
    }
View Full Code Here

    /**
     * Expands the selected nodes in the tree.
     * @param recursive whether to expand all children.
     */
    public void expandSelectedNodes(boolean recursive) {
        Outline outline = getResultsOutline();
        int[] selectedRows = outline.getSelectedRows();
        for (int i = selectedRows.length; i > 0; i--) {
            int index = selectedRows[i - 1];
            DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
                    .getValueAt(index, 0);
            expandNode(treeNode, recursive, 1);
        }
    }
View Full Code Here

    }

    @Override
    public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == F5_KEY_CODE) {
            Outline outline = droidContext.getSelectedProfile().getResultsOutline();
            // if any row is selected and hte node is not the root node.
            if (outline.getSelectedRow() != -1 && !getSelectedNode().isRoot()) {
                populateNode();
            }
        }
    }
View Full Code Here

    }

    @Override
    public void valueChanged(ListSelectionEvent event) {
        if (!event.getValueIsAdjusting()) {
            Outline outline = droidContext.getSelectedProfile().getResultsOutline();
            ListSelectionModel m = outline.getSelectionModel();
            if (outline.getSelectedRow() != -1 && m.getMinSelectionIndex() == m.getMaxSelectionIndex()) {
                if (!getSelectedNode().isRoot() && getSelectedNode().getDepth() == 0) {
                    populateNode();
                }
            }
        }
View Full Code Here

//            }
//        }
    }

    private DefaultMutableTreeNode getSelectedNode() {
        Outline outline = droidContext.getSelectedProfile().getResultsOutline();
        return (DefaultMutableTreeNode) outline.getValueAt(outline.getSelectedRow(), 0);
    }
View Full Code Here

    public void remove() {

        ProfileForm selectedProfile = droidContext.getSelectedProfile();

        DefaultTreeModel treeMdl = selectedProfile.getTreeModel();
        Outline outline = selectedProfile.getResultsOutline();
        ProfileInstance profile = selectedProfile.getProfile();

        int[] selectedRows = outline.getSelectedRows();

        for (int i = selectedRows.length; i > 0; i--) {
            // remove node from profile spec
            int index = selectedRows[i - 1];

            DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
                    .getValueAt(index, 0);
            ProfileResourceNode prn = (ProfileResourceNode) treeNode
                    .getUserObject();
            if (profile.removeResource(prn.getUri())) {
                treeMdl.removeNodeFromParent(treeNode);
View Full Code Here

        //ProfileForm selectedProfile = droidContext.getSelectedProfile();
        //DefaultTreeModel treeMdl = (DefaultTreeModel) selectedProfile
        DefaultTreeModel treeMdl = (DefaultTreeModel) profileToFilter
                .getTreeModel();

        Outline outline = profileToFilter.getResultsOutline();
        for (int i = outline.getRowCount(); i > 0; i--) {
            // remove node from profile spec
            DefaultMutableTreeNode node = (DefaultMutableTreeNode) outline.getValueAt(i - 1, 0);
            if (!node.isRoot()) {
                treeMdl.removeNodeFromParent(node);
            }
        }
        treeMdl.reload();
View Full Code Here

TOP

Related Classes of org.netbeans.swing.outline.Outline

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.