Package org.jsurveylib.gui.swing.renderer

Examples of org.jsurveylib.gui.swing.renderer.PageRenderer


    private void createPages() {

        for (Page page : survey.getPages()) {

            String pageLabel = page.getLabel().trim();
            PageRenderer pageRenderer = startNewPage(pageLabel);

            //add the questions
            for (SurveyElement element : page.getSurveyElements()) {
                pageRenderer.addElement(element);
                if (element instanceof Question) {
                    ((Question) element).addAnswerListener(this);
                }
            }
            pageRenderer.packElements();
        }
    }
View Full Code Here


     * Create a new page object and return its renderer
     * @return The PageRenderer of this page
     * @param pageLabel The label of this page
     */
    private PageRenderer startNewPage(String pageLabel) {
        PageRenderer cPage = new PageRenderer(survey.getStrings());
        cPage.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), pageLabel));
        pageComponents.add(cPage);
        return cPage;
    }
View Full Code Here

TOP

Related Classes of org.jsurveylib.gui.swing.renderer.PageRenderer

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.