Package fr.soleil.salsa.client.view.component

Examples of fr.soleil.salsa.client.view.component.SimpleNode


     *
     * @param list
     * @return
     */
    private SimpleNode convertSuggestionsToTree(List<ISuggestionCategory> list) {
        SimpleNode root = new SimpleNode(null, "");

        for (ISuggestionCategory c : list) {
            SimpleNode cNode = new SimpleNode(null, c.getLabel());

            for (ISuggestionItem a : c.getSuggestionList()) {
                SimpleNode aNode = new SimpleNode(a.getValue(), a.getLabel());
                cNode.getChildren().add(aNode);
            }
            root.getChildren().add(cNode);
        }
        return root;
View Full Code Here


                && !newScanServerName.equals(this.scanServerName)) {
            this.scanServerName = newScanServerName;
            try {
                ISuggestions suggestions = ScanApi.getDevicesSuggestions(scanServerName);
                List<ISuggestionCategory> categories = suggestions.getActuatorSuggestionList();
                SimpleNode root = convertSuggestionsToTree(categories);
                actuatorsListView.setSuggestions(root);
            }
            catch (SalsaDeviceException exception) {
                Salsa.getApplicationController().errorMessage(exception.getMessage());
            }
View Full Code Here

     *
     * @param list
     * @return
     */
    protected SimpleNode convertSuggestionsToTree(List<ISuggestionCategory> list) {
        SimpleNode root = new SimpleNode(null, "");
        if (list != null) {
            for (ISuggestionCategory c : list) {
                SimpleNode cNode = new SimpleNode(null, c.getLabel());
                if (c.getSuggestionList() != null) {
                    for (ISuggestionItem a : c.getSuggestionList()) {
                        SimpleNode aNode = new SimpleNode(a.getValue(), a.getLabel());
                        cNode.getChildren().add(aNode);
                    }
                    root.getChildren().add(cNode);
                }
            }
View Full Code Here

                && (!newScanServerName.equals(this.scanServerName))) {
            this.scanServerName = newScanServerName;
            try {
                ISuggestions suggestions = ScanApi.getDevicesSuggestions(scanServerName);
                List<ISuggestionCategory> categories = getCategories(suggestions);
                SimpleNode root = convertSuggestionsToTree(categories);
                view.setSuggestions(root);
            } catch (SalsaDeviceException exception) {
                errorMessage(exception.getMessage());
            }
        }
View Full Code Here

    }

    private SimpleNode convertSuggestionsToTree(List<ISuggestionCategory> list) {

        SimpleNode root = new SimpleNode(null, "");
        if (list == null) {
            return root;
        }

        for (ISuggestionCategory c : list) {
            SimpleNode cNode = new SimpleNode(null, c.getLabel());
            if (c.getSuggestionList() == null) {
                continue;
            }
            for (ISuggestionItem a : c.getSuggestionList()) {
                SimpleNode aNode = new SimpleNode(a.getValue(), a.getLabel());
                cNode.getChildren().add(aNode);
            }
            root.getChildren().add(cNode);
        }
        return root;
View Full Code Here

                && !newScanServerName.equals(this.scanServerName)) {
            this.scanServerName = newScanServerName;
            try {
                ISuggestions suggestions = ScanApi.getDevicesSuggestions(scanServerName);
                List<ISuggestionCategory> categories = suggestions.getSensorSuggestionList();
                SimpleNode root = convertSuggestionsToTree(categories);
                view.setSuggestions(root);
            }
            catch (SalsaDeviceException exception) {
                errorMessage(exception.getMessage());
            }
View Full Code Here

     *
     * @param list
     * @return
     */
    protected SimpleNode convertSuggestionsToTree(List<ISuggestionCategory> list) {
        SimpleNode root = new SimpleNode(null, "");
        if (list != null) {
            for (ISuggestionCategory c : list) {
                SimpleNode cNode = new SimpleNode(null, c.getLabel());
                if (c.getSuggestionList() != null) {
                    for (ISuggestionItem a : c.getSuggestionList()) {
                        SimpleNode aNode = new SimpleNode(a.getValue(), a.getLabel());
                        cNode.getChildren().add(aNode);
                    }
                    root.getChildren().add(cNode);
                }
            }
View Full Code Here

                && (!newScanServerName.equals(this.scanServerName))) {
            this.scanServerName = newScanServerName;
            try {
                ISuggestions suggestions = ScanApi.getDevicesSuggestions(scanServerName);
                List<ISuggestionCategory> categories = getCategories(suggestions);
                SimpleNode root = convertSuggestionsToTree(categories);
                view.setSuggestions(root);
            }
            catch (SalsaDeviceException exception) {
                errorMessage(exception.getMessage());
            }
View Full Code Here

     *
     * @param list
     * @return
     */
    protected SimpleNode convertSuggestionsToTree(List<ISuggestionCategory> list) {
        SimpleNode root = new SimpleNode(null, "");
        if (list != null) {
            for (ISuggestionCategory c : list) {
                SimpleNode cNode = new SimpleNode(null, c.getLabel());
                if (c.getSuggestionList() != null) {
                    for (ISuggestionItem a : c.getSuggestionList()) {
                        SimpleNode aNode = new SimpleNode(a.getValue(), a.getLabel());
                        cNode.getChildren().add(aNode);
                    }
                    root.getChildren().add(cNode);
                }
            }
View Full Code Here

                && (!newScanServerName.equals(this.scanServerName))) {
            this.scanServerName = newScanServerName;
            try {
                ISuggestions suggestions = ScanApi.getDevicesSuggestions(scanServerName);
                List<ISuggestionCategory> categories = getCategories(suggestions);
                SimpleNode root = convertSuggestionsToTree(categories);
                view.setSuggestions(root);
            }
            catch (SalsaDeviceException exception) {
                errorMessage(exception.getMessage());
            }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.client.view.component.SimpleNode

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.