Examples of ATreeNode


Examples of fr.soleil.salsa.client.view.tool.ATreeNode

    public void expandNode(ATreeNode treeNode) {
        int nbRows = configTree.getRowCount();
        TreePath treePath;
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            treePath = configTree.getPathForRow(rowIndex);
            ATreeNode searchTreeNode = (ATreeNode) ((DefaultMutableTreeNode) treePath
                    .getLastPathComponent()).getUserObject();
            if (searchTreeNode.equals(treeNode)) {
                configTree.expandRow(rowIndex);
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

            if (rootDirectory == null) {
                rootDirectory = savedDirectory;
            }
            currentDirectory = savedDirectory;
            refresh();
            ATreeNode treeNode = new DirectoryTreeNode(currentDirectory);
            if (savedDirectory.getDirectory() != null) {
                view.expandNode(new DirectoryTreeNode(savedDirectory.getDirectory()));
            }
            view.setSelection(treeNode);
        }
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

     */
    private void filterMultipleSelection(List<ATreeNode> multipleSelection) {
        int size = multipleSelection.size();
        int cursorSearch = 0;
        int cursorCompare;
        ATreeNode searchNode;
        ATreeNode compareNode;
        while (cursorSearch < size - 1) {
            searchNode = multipleSelection.get(cursorSearch);
            for (cursorCompare = cursorSearch + 1; cursorCompare < size; ++cursorCompare) {
                compareNode = multipleSelection.get(cursorCompare);
                if (isChild(compareNode, searchNode)) {
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

            if (rootDirectory == null) {
                rootDirectory = savedDirectory;
            }
            currentDirectory = savedDirectory;
            refresh();
            ATreeNode treeNode = new DirectoryTreeNode(currentDirectory);
            if (savedDirectory.getDirectory() != null) {
                view.expandNode(new DirectoryTreeNode(savedDirectory.getDirectory()));
            }
            view.setSelection(treeNode);
        }
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

     */
    private void filterMultipleSelection(List<ATreeNode> multipleSelection) {
        int size = multipleSelection.size();
        int cursorSearch = 0;
        int cursorCompare;
        ATreeNode searchNode;
        ATreeNode compareNode;
        while (cursorSearch < size - 1) {
            searchNode = multipleSelection.get(cursorSearch);
            for (cursorCompare = cursorSearch + 1; cursorCompare < size; ++cursorCompare) {
                compareNode = multipleSelection.get(cursorCompare);
                if (isChild(compareNode, searchNode)) {
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

            if (rootDirectory == null) {
                rootDirectory = savedDirectory;
            }
            currentDirectory = savedDirectory;
            refresh();
            ATreeNode treeNode = new DirectoryTreeNode(currentDirectory);
            if (savedDirectory.getDirectory() != null) {
                view.expandNode(new DirectoryTreeNode(savedDirectory.getDirectory()));
            }
            view.setSelection(treeNode);
        }
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

     */
    private void filterMultipleSelection(List<ATreeNode> multipleSelection) {
        int size = multipleSelection.size();
        int cursorSearch = 0;
        int cursorCompare;
        ATreeNode searchNode;
        ATreeNode compareNode;
        while (cursorSearch < size - 1) {
            searchNode = multipleSelection.get(cursorSearch);
            for (cursorCompare = cursorSearch + 1; cursorCompare < size; ++cursorCompare) {
                compareNode = multipleSelection.get(cursorCompare);
                if (isChild(compareNode, searchNode)) {
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

            if (rootDirectory == null) {
                rootDirectory = savedDirectory;
            }
            currentDirectory = savedDirectory;
            refresh();
            ATreeNode treeNode = new DirectoryTreeNode(currentDirectory);
            if (savedDirectory.getDirectory() != null) {
                view.expandNode(new DirectoryTreeNode(savedDirectory.getDirectory()));
            }
            view.setSelection(treeNode);
        }
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

     */
    private void filterMultipleSelection(List<ATreeNode> multipleSelection) {
        int size = multipleSelection.size();
        int cursorSearch = 0;
        int cursorCompare;
        ATreeNode searchNode;
        ATreeNode compareNode;
        while (cursorSearch < size - 1) {
            searchNode = multipleSelection.get(cursorSearch);
            for (cursorCompare = cursorSearch + 1; cursorCompare < size; ++cursorCompare) {
                compareNode = multipleSelection.get(cursorCompare);
                if (isChild(compareNode, searchNode)) {
View Full Code Here

Examples of fr.soleil.salsa.client.view.tool.ATreeNode

     *
     * @param rootDirectoryTreeNode the root directory of the tree structure.
     */
    public void setTreeContent(DirectoryTreeNode rootDirectoryTreeNode) {
        innerSelection = true;
        ATreeNode selectedNode = this.getSelection();

        int nbRows = configTree.getRowCount();
        Set<ATreeNode> expandedNodesSet = new HashSet<ATreeNode>();
        TreePath treePath;
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            if (configTree.isExpanded(rowIndex)) {
                treePath = configTree.getPathForRow(rowIndex);
                Object[] pathElementsArray = treePath.getPath();
                List<ATreeNode> pathElementsList = new ArrayList<ATreeNode>(
                        pathElementsArray.length);
                for (Object element : pathElementsArray) {
                    pathElementsList.add((ATreeNode) ((DefaultMutableTreeNode) element)
                            .getUserObject());
                }
                expandedNodesSet.addAll(pathElementsList);
            }
        }

        DefaultMutableTreeNode rootNode = buildJTreeNodeFromWrapper(rootDirectoryTreeNode);

        treeModel = new DefaultTreeModel(rootNode);
        configTree.setModel(treeModel);

        nbRows = configTree.getRowCount();
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            treePath = configTree.getPathForRow(rowIndex);
            ATreeNode treeNode = (ATreeNode) ((DefaultMutableTreeNode) treePath
                    .getLastPathComponent()).getUserObject();
            if (expandedNodesSet.contains(treeNode)) {
                configTree.expandRow(rowIndex);
                nbRows = configTree.getRowCount();
            }
        }

        ATreeNode treeNode;
        for (int rowIndex = 0; rowIndex < nbRows; ++rowIndex) {
            treePath = configTree.getPathForRow(rowIndex);
            treeNode = (ATreeNode) ((DefaultMutableTreeNode) treePath.getLastPathComponent())
                    .getUserObject();
            if (treeNode.equals(selectedNode)) {
                configTree.addSelectionRow(rowIndex);
            }
        }
        innerSelection = false;
    }
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.