Package pt.ist.fenixWebFramework.renderers.components

Examples of pt.ist.fenixWebFramework.renderers.components.HtmlContainer


    /* methods to draw information */

    @Override
    public HtmlComponent createComponent(Object object, Class type) {
        final HtmlContainer container = new HtmlBlockContainer();
        draw(getDegreeCurricularPlan(), createMainTable(container));
        return container;
    }
View Full Code Here


        page.bind(bean, "page");
        selected.bind(bean, "selected");
        selected.setConverter(new DomainObjectKeyConverter());

        HtmlContainer container = new HtmlBlockContainer();
        container.addChild(page);
        container.addChild(selected);

        addPreviousNextButtons(container, page, "previous", "next");

        container.addChild(table);

        if (table.getHeader() != null) {
            for (HtmlTableRow row : table.getHeader().getRows()) {
                row.createCell("");
            }
View Full Code Here

    @Override
    protected Layout getLayout(Object object, Class type) {
        return new Layout() {

            private HtmlComponent processUnionGroup(UnionGroup object) {
                HtmlContainer container = new HtmlInlineContainer();
                container.setIndented(false);

                int i = object.getChildren().size();

                for (Group child : object.getChildren()) {
                    if (child instanceof UnionGroup) {
                        container.addChild(processUnionGroup((UnionGroup) child));
                    } else {
                        container.addChild(new HtmlText(child.getPresentationName()));
                    }
                    i--;
                    if (i > 0) {
                        container.addChild(new HtmlText(", "));
                    }
                }

                return container;
            }

            @Override
            public HtmlComponent createComponent(Object object, Class type) {

                HtmlInlineContainer container = new HtmlInlineContainer();

                if (object instanceof UnionGroup) {
                    container.addChild(processUnionGroup((UnionGroup) object));
                } else {
                    Group group = (Group) object;
                    container.addChild(new HtmlText(group.getPresentationName()));
                }

                return container;
            }
View Full Code Here

    private class SearchExecutionCourseAttendsLayout extends Layout {

        @Override
        public HtmlComponent createComponent(Object object, Class type) {
            bean = (SearchExecutionCourseAttendsBean) object;
            HtmlContainer blockContainer = new HtmlBlockContainer();
            blockContainer.addChild(renderSearcher());

            // bean.getExecutionCourse().searchAttends(bean);
            //
            // blockContainer.addChild(renderAttendsListSize());
            //
View Full Code Here

            htmlForm.getSubmitButton().setVisible(false);
            htmlForm.getCancelButton().setVisible(false);

            this.studentCurricularPlan = (StudentCurricularPlan) object;

            final HtmlContainer container = new HtmlBlockContainer();
            if (this.studentCurricularPlan == null) {
                container.addChild(createHtmlTextItalic(BundleUtil.getString(Bundle.STUDENT, "message.no.curricularplan")));

                return container;
            }

            this.executionYearContext = initializeExecutionYear();
            this.executionPeriodContext = executionYearContext.getLastExecutionPeriod();

            if (isOrganizedByGroups() && !this.studentCurricularPlan.isBoxStructure()) {
                container.addChild(createHtmlTextItalic(BundleUtil.getString(Bundle.STUDENT, "not.applicable")));

                return container;
            }

            final HtmlTable mainTable = new HtmlTable();
            container.addChild(mainTable);
            mainTable.setClasses(getStudentCurricularPlanClass());

            if (isOrganizedByGroups()) {
                generateRowsForGroupsOrganization(mainTable, this.studentCurricularPlan.getRoot(), 0);
            } else if (isOrganizedByExecutionYears()) {
View Full Code Here

        @Override
        public HtmlComponent createComponent(Object object, Class type) {
            this.curriculum = (Curriculum) object;

            final HtmlContainer container = new HtmlBlockContainer();

            if (this.curriculum == null) {
                container.addChild(createHtmlTextItalic(BundleUtil.getString(Bundle.STUDENT, "message.no.average")));

                return container;
            }

            if (!this.curriculum.getStudentCurricularPlan().isBoxStructure()) {
                container.addChild(createHtmlTextItalic(BundleUtil.getString(Bundle.STUDENT, "not.applicable")));

                return container;
            }

            if (this.curriculum.isEmpty()) {
                container.addChild(createHtmlTextItalic(BundleUtil.getString(Bundle.STUDENT, "message.no.approvals")));

                return container;
            }

            if (this.curriculum.getCurriculumEntries().isEmpty()) {
                container.addChild(createHtmlTextItalic(BundleUtil.getString(Bundle.STUDENT, "message.empty.curriculum")));
            } else {
                final HtmlContainer averageContainer = new HtmlBlockContainer();
                averageContainer.setStyle("padding-bottom: 3.5em;");
                container.addChild(averageContainer);
                final HtmlTable averageEntriesTable = new HtmlTable();
                averageContainer.addChild(averageEntriesTable);
                averageEntriesTable.setClasses(getTableClass());
                generateAverageRows(averageEntriesTable);
                generateAverageSums(averageEntriesTable);
            }

            if (isVisibleCurricularYearEntries()) {
                final HtmlContainer curricularYearContainer = new HtmlBlockContainer();
                container.addChild(curricularYearContainer);
                final HtmlTable curricularYearTable = new HtmlTable();
                curricularYearContainer.addChild(curricularYearTable);
                curricularYearTable.setClasses(getTableClass());
                generateCurricularYearRows(curricularYearTable);
                generateCurricularYearSums(curricularYearTable);
            }
View Full Code Here

    private class ExecutionCourseAttendsSpreadSheetLayout extends Layout {

        @Override
        public HtmlComponent createComponent(Object object, Class type) {
            bean = (SearchExecutionCourseAttendsBean) object;
            HtmlContainer blockContainer = new HtmlBlockContainer();
            blockContainer.addChild(renderAttendsList());
            return blockContainer;
        }
View Full Code Here

TOP

Related Classes of pt.ist.fenixWebFramework.renderers.components.HtmlContainer

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.