Package org.jsurveylib.model

Examples of org.jsurveylib.model.Menu


    public Map<String, Template> getTemplateMap() {
        return templateMap;
    }

    public Menu getMenu() {
        Menu menu = new Menu();
        if (xmlRoot.getElementsByTagName("menu").getLength() == 0) {
            menu.setExists(false);
            return menu;
        } else {
            menu.setExists(true);

            Element menuElement = (Element) xmlRoot.getElementsByTagName("menu").item(0);
            menu.setFirstPage(menuElement.getElementsByTagName("firstPage").getLength() == 1);
            menu.setLastPage(menuElement.getElementsByTagName("lastPage").getLength() == 1);
            menu.setNextPage(menuElement.getElementsByTagName("nextPage").getLength() == 1);
            menu.setOpen(menuElement.getElementsByTagName("open").getLength() == 1);
            menu.setPreviousPage(menuElement.getElementsByTagName("previousPage").getLength() == 1);
            menu.setSave(menuElement.getElementsByTagName("save").getLength() == 1);
            menu.setSaveAs(menuElement.getElementsByTagName("saveAs").getLength() == 1);
            return menu;
        }
    }
View Full Code Here

TOP

Related Classes of org.jsurveylib.model.Menu

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.