Package pt.ist.fenixWebFramework.renderers.components

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


                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


        groupRow.setClasses(getCourseGroupRowClass());
        addTabsToRow(groupRow, level);

        final HtmlTableCell cell = groupRow.createCell();
        cell.setClasses(getLabelCellClass());
        cell.setBody(new HtmlText(courseGroup.getNameI18N().getContent()));

        if (showCourses() && courseGroup.hasAnyChildContextWithCurricularCourse()) {
            cell.setColspan(getMaxColSpanForTextOnGroupsWithChilds() - level);
            drawCurricularPeriodHeader(groupRow);
            drawCourseLoadHeader(groupRow);
View Full Code Here

        return new Layout() {

            @Override
            public HtmlComponent createComponent(Object object, Class type) {
                if (object == null) {
                    return new HtmlText();
                }

                Summary summary = (Summary) object;
                StringBuilder builder = new StringBuilder();
                Lesson lesson = null;

                builder.append(summary.getSummaryDateYearMonthDay().getDayOfMonth()).append("/");
                builder.append(summary.getSummaryDateYearMonthDay().getMonthOfYear()).append("/");
                builder.append(summary.getSummaryDateYearMonthDay().getYear());
                builder.append(" - ").append(RenderUtils.getResourceString("DEFAULT", "label.lesson") + ": ");

                if (summary.isExtraSummary()) {

                    builder.append(RenderUtils.getEnumString(SummaryType.EXTRA_SUMMARY, null)).append(" ");
                    builder.append(" (").append(summary.getSummaryHourHourMinuteSecond().getHour());
                    builder.append(":").append(summary.getSummaryHourHourMinuteSecond().getMinuteOfHour()).append(") ");

                } else {

                    lesson = summary.getLesson();
                    if (lesson != null) {

                        builder.append(lesson.getDiaSemana().toString()).append(" (");
                        builder.append(DateFormatUtil.format("HH:mm", lesson.getInicio().getTime()));
                        builder.append("-").append(DateFormatUtil.format("HH:mm", lesson.getFim().getTime()));
                        builder.append(") ");
                    }
                }
                if (lesson != null && lesson.hasSala()) {
                    builder.append(lesson.getSala().getName());
                }

                return new HtmlText(builder.toString());
            }
        };
    }
View Full Code Here

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

        if (getBolonhaStudentEnrollmentBean() == null) {
            return new HtmlText();
        }

        final HtmlBlockContainer container = new HtmlBlockContainer();

        HtmlMultipleHiddenField hiddenEnrollments = new HtmlMultipleHiddenField();
View Full Code Here

        groupHeaderRow.setClasses(getRenderer().getGroupRowClasses());

        final HtmlTableCell titleCell = groupHeaderRow.createCell();
        if (studentCurriculumGroupBean.getCurriculumModule().isRoot()) {
            if (studentCurriculumGroupBean.getCurriculumModule().getDegreeCurricularPlanOfStudent().isEmpty()) {
                titleCell.setBody(new HtmlText(studentCurriculumGroupBean.getCurriculumModule().getName().getContent()));
            } else {
                titleCell.setBody(createDegreeCurricularPlanLink(studentCurriculumGroupBean));
            }
        } else if (studentCurriculumGroupBean.getCurriculumModule().isCycleCurriculumGroup()) {
            setTitleCellInformation(groupHeaderRow, titleCell, studentCurriculumGroupBean, executionSemester);

        } else {
            titleCell.setBody(new HtmlText(buildCurriculumGroupLabel(studentCurriculumGroupBean.getCurriculumModule(),
                    executionSemester), false));
        }

        final HtmlTableCell checkBoxCell = groupHeaderRow.createCell();
        checkBoxCell.setClasses("aright");
View Full Code Here

            final StudentCurriculumGroupBean studentCurriculumGroupBean, final ExecutionSemester executionSemester) {

        final CycleCurriculumGroup group = (CycleCurriculumGroup) studentCurriculumGroupBean.getCurriculumModule();
        final boolean concluded = group.isConcluded();

        titleCell.setBody(new HtmlText(buildCycleCurriculumGroupLabel(group, concluded, executionSemester), false));

        if (concluded) {
            groupHeaderRow.setClasses(getRenderer().getConcludedGroupRowClasses());
        }
    }
View Full Code Here

                degreeName +=
                        " (" + BundleUtil.getString(Bundle.STUDENT, "label.grade.scale") + " - "
                                + curricularCourse.getGradeScaleChain().getDescription() + ") ";
            }

            cellName.setBody(new HtmlText(degreeName));

            // Year
            final HtmlTableCell yearCell = htmlTableRow.createCell();
            yearCell.setClasses(getRenderer().getCurricularCourseToEnrolYearClasses());
            yearCell.setColspan(2);
            yearCell.setBody(new HtmlText(degreeModuleToEvaluate.getYearFullLabel()));

            if (!degreeModuleToEvaluate.isOptionalCurricularCourse()) {
                // Ects
                final HtmlTableCell ectsCell = htmlTableRow.createCell();
                ectsCell.setClasses(getRenderer().getCurricularCourseToEnrolEctsClasses());

                final StringBuilder ects = new StringBuilder();
                ects.append(degreeModuleToEvaluate.getEctsCredits()).append(" ")
                        .append(BundleUtil.getString(Bundle.STUDENT, "label.credits.abbreviation"));
                ectsCell.setBody(new HtmlText(ects.toString()));

                HtmlTableCell checkBoxCell = htmlTableRow.createCell();
                checkBoxCell.setClasses(getRenderer().getCurricularCourseToEnrolCheckBoxClasses());

                HtmlCheckBox checkBox = new HtmlCheckBox(false);
                checkBox.setName("degreeModuleToEnrolCheckBox" + degreeModuleToEvaluate.getKey());
                checkBox.setUserValue(degreeModuleToEvaluate.getKey());
                getDegreeModulesToEvaluateController().addCheckBox(checkBox);
                checkBoxCell.setBody(checkBox);
            } else {
                final HtmlTableCell cell = htmlTableRow.createCell();
                cell.setClasses(getRenderer().getCurricularCourseToEnrolEctsClasses());
                cell.setBody(new HtmlText(""));

                HtmlTableCell linkTableCell = htmlTableRow.createCell();
                linkTableCell.setClasses(getRenderer().getCurricularCourseToEnrolCheckBoxClasses());

                final HtmlActionLink actionLink = new HtmlActionLink();
View Full Code Here

        rulesTable.setStyle("width: 100%;");

        for (final CurricularRule curricularRule : curricularRules) {
            final HtmlTableCell cellName = rulesTable.createRow().createCell();
            cellName.setStyle("color: #888");
            cellName.setBody(new HtmlText(CurricularRuleLabelFormatter.getLabel(curricularRule, I18N.getLocale())));
        }
    }
View Full Code Here

            enrolmentName +=
                    " (" + BundleUtil.getString(Bundle.STUDENT, "label.grade.scale") + " - "
                            + curricularCourse.getGradeScaleChain().getDescription() + ") ";
        }

        cellName.setBody(new HtmlText(enrolmentName));

        // Year
        final HtmlTableCell yearCell = htmlTableRow.createCell();
        yearCell.setClasses(enrolmentYearClasses);

        final String year = enrolment.getExecutionPeriod().getExecutionYear().getYear();
        yearCell.setBody(new HtmlText(year));

        // Semester
        final HtmlTableCell semesterCell = htmlTableRow.createCell();
        semesterCell.setClasses(enrolmentSemesterClasses);

        final StringBuilder semester = new StringBuilder();
        semester.append(enrolment.getExecutionPeriod().getSemester().toString());
        semester.append(" ");
        semester.append(BundleUtil.getString(Bundle.ENUMERATION, "SEMESTER.ABBREVIATION"));
        semesterCell.setBody(new HtmlText(semester.toString()));

        // Ects
        final HtmlTableCell ectsCell = htmlTableRow.createCell();
        ectsCell.setClasses(enrolmentEctsClasses);

        final StringBuilder ects = new StringBuilder();
        final double ectsCredits =
                (enrolment.isBolonhaDegree() && getBolonhaStudentEnrollmentBean().getCurricularRuleLevel().isNormal()) ? enrolment
                        .getAccumulatedEctsCredits(enrolment.getExecutionPeriod()) : enrolment.getEctsCredits();
        ects.append(ectsCredits).append(" ").append(BundleUtil.getString(Bundle.STUDENT, "label.credits.abbreviation"));

        ectsCell.setBody(new HtmlText(ects.toString()));

        MetaObject enrolmentMetaObject = MetaObjectFactory.createObject(enrolment, new Schema(Enrolment.class));

        HtmlCheckBox checkBox = new HtmlCheckBox(true);
        checkBox.setName("enrolmentCheckBox" + enrolment.getExternalId());
View Full Code Here

            int depth) {
        final HtmlTable groupTable = createGroupTable(blockContainer, depth);

        HtmlTableRow htmlTableRow = groupTable.createRow();
        htmlTableRow.setClasses(getRenderer().getGroupRowClasses());
        htmlTableRow.createCell().setBody(new HtmlText(degreeModuleToEnrol.getContext().getChildDegreeModule().getName()));
        HtmlTableCell cell = htmlTableRow.createCell();
        cell.setClasses("aright");

        HtmlCheckBox checkBox = new HtmlCheckBox(false);
        final String name =
View Full Code Here

TOP

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

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.