Examples of Outline


Examples of org.netbeans.swing.outline.Outline

     *
     * @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

Examples of org.netbeans.swing.outline.Outline

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

Examples of org.netbeans.swing.outline.Outline

    /**
     * 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

Examples of org.netbeans.swing.outline.Outline

    }

    @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

Examples of org.netbeans.swing.outline.Outline

    }

    @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

Examples of org.netbeans.swing.outline.Outline

//            }
//        }
    }

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

Examples of org.netbeans.swing.outline.Outline

    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

Examples of org.netbeans.swing.outline.Outline

        //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
Copyright © 2018 www.massapi.com. 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.