Package pt.ist.fenixWebFramework.renderers.components

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


    }

    abstract protected void draw(DegreeCurricularPlan degreeCurricularPlan, HtmlTable createMainTable);

    protected HtmlTable createMainTable(final HtmlContainer container) {
        final HtmlTable main = new HtmlTable();
        container.addChild(main);
        main.setClasses(getDegreeCurricularPlanClass());
        return main;
    }
View Full Code Here


            list.add(scope.getDegreeModuleScopeCurricularCourseScope());
        }

        private void generateBranch(HtmlBlockContainer container, final Branch branch, final Set<DegreeModuleScope> scopes,
                int depth) {
            final HtmlTable groupTable = new HtmlTable();
            container.addChild(groupTable);
            groupTable.setClasses(getTablesClasses());
            groupTable.setStyle("width: " + (getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());
            String name = branch.getName().trim();
            if (name.length() == 0) {
                name = "Tronco Comum";
            }
View Full Code Here

        container.addChild(hiddenExtraCurricularEnrollments);

        generateGroup(container, getBolonhaStudentEnrollmentBean().getStudentCurricularPlan(), getBolonhaStudentEnrollmentBean()
                .getRootStudentCurriculumGroupBean(), getBolonhaStudentEnrollmentBean().getExecutionPeriod(), 0);

        HtmlTable groupTable = createGroupTable(container, 0);

        HtmlTableRow htmlTableRow = groupTable.createRow();
        htmlTableRow.setClasses(getRenderer().getGroupRowClasses());
        htmlTableRow.createCell().setBody(new HtmlText("Other Curricular Units", false));
        HtmlTableCell cell = htmlTableRow.createCell();
        cell.setClasses("aright");

        HtmlCheckBox checkBox = new HtmlCheckBox(false);
        final String name = "degreeModuleToEnrolCheckBox";
        checkBox.setName(name);
        checkBox.setUserValue("true");
        checkBox.setChecked(true);

        cell.setBody(checkBox);
        groupTable = createCoursesTable(container, 0);
        NoCourseGroupCurriculumGroup group =
                getBolonhaStudentEnrollmentBean().getStudentCurricularPlan().getNoCourseGroupCurriculumGroup(
                        NoCourseGroupCurriculumGroupType.STANDALONE);
        HashSet<CurricularCourse> set = new HashSet<CurricularCourse>();
        ErasmusBolonhaStudentEnrollmentBean erasmusBolonhaStudentEnrollmentBean =
                (ErasmusBolonhaStudentEnrollmentBean) getBolonhaStudentEnrollmentBean();
        set.addAll(erasmusBolonhaStudentEnrollmentBean.getCandidacy().getCurricularCoursesSet());
        for (Enrolment enrolment : group.getEnrolments()) {
            set.add(enrolment.getCurricularCourse());
        }

        for (CurricularCourse curricularCourse : set) {
            if (erasmusBolonhaStudentEnrollmentBean.getStudentCurricularPlan().getEnrolmentByCurricularCourseAndExecutionPeriod(
                    curricularCourse, erasmusBolonhaStudentEnrollmentBean.getExecutionPeriod()) != null) {
                if (!group.hasEnrolmentWithEnroledState(curricularCourse,
                        erasmusBolonhaStudentEnrollmentBean.getExecutionPeriod())) {

                    continue;
                }
            }

            if (!isContextValid(curricularCourse)) {
                continue;
            }

            htmlTableRow = groupTable.createRow();
            HtmlTableCell cellName = htmlTableRow.createCell();
            cellName.setClasses(getRenderer().getCurricularCourseToEnrolNameClasses());

            String degreeName = curricularCourse.getName();
View Full Code Here

        MetaObject listMetaObject = MetaObjectFactory.createObject(objects, schema);

        PresentationContext context = getContext().createSubContext(listMetaObject);
        context.setRenderMode(RenderMode.OUTPUT);

        HtmlTable table = (HtmlTable) RenderKit.getInstance().renderUsing(getRenderer(), context, objects, objects.getClass());
        return decorateTable(table, objects);
    }
View Full Code Here

            generateBranchScopes(container, scopes, depth + getWidthDecreasePerLevel());
        }

        private void generateBranchScopes(final HtmlBlockContainer container, final Set<DegreeModuleScope> scopes, int depth) {

            final HtmlTable table = new HtmlTable();
            container.addChild(table);
            table.setClasses(getTablesClasses());
            table.setStyle("width: " + (getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");

            for (final DegreeModuleScope scope : scopes) {
                final HtmlTableRow htmlTableRow = table.createRow();
                HtmlTableCell cellName = htmlTableRow.createCell();
                cellName.setClasses(getCurricularCourseNameClasses());
                cellName.setBody(new HtmlText(scope.getCurricularCourse().getName()));

                // Year
View Full Code Here

            }
        }

        // Bolonha Structure
        private void generateCourseGroup(HtmlBlockContainer blockContainer, CourseGroup courseGroup, int depth) {
            final HtmlTable groupTable = new HtmlTable();
            blockContainer.addChild(groupTable);
            groupTable.setClasses(getTablesClasses());
            groupTable.setStyle("width: " + (getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());
            htmlTableRow.createCell().setBody(new HtmlText(courseGroup.getName()));

            final List<Context> childCourseGroupContexts =
                    courseGroup.getValidChildContexts(CourseGroup.class,
View Full Code Here

            }
        }

        private void generateCurricularCourses(HtmlBlockContainer blockContainer, List<Context> contexts, int depth) {

            final HtmlTable table = new HtmlTable();
            blockContainer.addChild(table);
            table.setClasses(getTablesClasses());
            table.setStyle("width: " + (getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");

            for (final Context context : contexts) {
                final CurricularCourse curricularCourse = (CurricularCourse) context.getChildDegreeModule();
                if (!curricularCourse.isOptionalCurricularCourse()) {

                    final HtmlTableRow htmlTableRow = table.createRow();
                    HtmlTableCell cellName = htmlTableRow.createCell();
                    cellName.setClasses(getCurricularCourseNameClasses());
                    cellName.setBody(new HtmlText(getCurricularCoursePresentationName(curricularCourse)));

                    // Year
View Full Code Here

    protected void generateGroup(final HtmlBlockContainer blockContainer, final StudentCurricularPlan studentCurricularPlan,
            final StudentCurriculumGroupBean studentCurriculumGroupBean, final ExecutionSemester executionSemester,
            final int depth) {

        final HtmlTable groupTable = createGroupTable(blockContainer, depth);
        addGroupHeaderRow(groupTable, studentCurriculumGroupBean, executionSemester);

        if (canPerformStudentEnrolments || !groupIsConcluded(studentCurriculumGroupBean)) {

            if (getRenderer().isEncodeGroupRules()) {
                encodeCurricularRules(groupTable, studentCurriculumGroupBean.getCurriculumModule());
            }

            final HtmlTable coursesTable = createCoursesTable(blockContainer, depth);
            generateEnrolments(studentCurriculumGroupBean, coursesTable);
            generateCurricularCoursesToEnrol(coursesTable, studentCurriculumGroupBean);

            generateGroups(blockContainer, studentCurriculumGroupBean, studentCurricularPlan, executionSemester, depth);
        }
View Full Code Here

        }
        return null;
    }

    protected HtmlTable createGroupTable(final HtmlBlockContainer blockContainer, final int depth) {
        final HtmlTable groupTable = new HtmlTable();
        groupTable.setClasses(getRenderer().getTablesClasses());
        groupTable.setStyle("width: " + (getRenderer().getInitialWidth() - depth) + "em; margin-left: " + depth + "em;");

        blockContainer.addChild(groupTable);

        return groupTable;
    }
View Full Code Here

                .getExternalId());
        return degreeCurricularPlanLink;
    }

    protected HtmlTable createCoursesTable(final HtmlBlockContainer blockContainer, final int depth) {
        final HtmlTable coursesTable = new HtmlTable();
        blockContainer.addChild(coursesTable);
        coursesTable.setClasses(getRenderer().getTablesClasses());
        coursesTable.setStyle("width: " + (getRenderer().getInitialWidth() - depth - getRenderer().getWidthDecreasePerLevel())
                + "em; margin-left: " + (depth + getRenderer().getWidthDecreasePerLevel()) + "em;");
        return coursesTable;
    }
View Full Code Here

TOP

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

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.