Package pt.ist.fenixWebFramework.renderers.components

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


                                    RenderUtils.getResourceString(enumerationBundle, CLASS_NAME
                                            + DurationFieldType.millis().getName() + SHORT));
                }
                result.append(periodFormatterBuilder.toFormatter().print(period));
            }
            return new HtmlText(result.toString());
        }
View Full Code Here


        return new Layout() {
            @Override
            public HtmlComponent createComponent(Object unfiltered, Class type) {
                List<MetaObject> contacts = getFilteredContacts((Collection<PartyContact>) unfiltered);
                if (contacts.isEmpty()) {
                    return new HtmlText();
                }
                HtmlList list = new HtmlList();
                list.setClasses(getClasses());
                for (MetaObject meta : contacts) {
                    HtmlListItem item = list.createItem();
View Full Code Here

                newContext.setProperties(new Properties());
                newContext.setRenderMode(RenderMode.OUTPUT);

                container.addChild(getScript());
                container.addChild(input);
                container.addChild(new HtmlText("<br/>", false));
                HtmlText text =
                        new HtmlText(RenderUtils.getResourceString("RENDERER_RESOURCES",
                                "renderers.label.tags.are.space.separated"));
                text.setClasses(getTextClasses());
                container.addChild(text);
                container.addChild(RenderKit.getInstance().renderUsing(tagCloud, newContext, tagList, tagList.getClass()));

                return container;
View Full Code Here

            @Override
            public HtmlComponent createComponent(Object object, Class type) {
                if (object != null) {
                    final Number number = ((Money) object).getAmount();
                    return new HtmlText(new DecimalFormat(getFormat()).format(number));
                } else {
                    return new HtmlText("");
                }
            }
        };
    }
View Full Code Here

            public HtmlComponent createComponent(Object object, Class type) {
                ExecutionSemester executionSemester = (ExecutionSemester) object;
                StringBuilder text = new StringBuilder();
                text.append(executionSemester.getExecutionYear().getYear()).append(", ");
                text.append(executionSemester.getSemester()).append(RenderUtils.getResourceString("label.semester.short"));
                return new HtmlText(text.toString());
            }
        };
    }
View Full Code Here

            HtmlBlockContainer container = new HtmlBlockContainer();
            if (dismissalBean == null
                    || dismissalBean.getExecutionPeriod() == null
                    || dismissalBean.getStudentCurricularPlan().getStartExecutionPeriod()
                            .isAfter(dismissalBean.getExecutionPeriod())) {
                return new HtmlText();
            }

            DismissalType dismissalTypeValue =
                    getDismissalType() == null ? dismissalBean.getDismissalType() : DismissalType.valueOf(getDismissalType());
View Full Code Here

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());

            final HtmlTableCell nameCell = htmlTableRow.createCell();
            nameCell.setBody(new HtmlText(curriculumGroup.getFullPath()));
            nameCell.setClasses(getGroupNameClasses());

            final HtmlTableCell radioButtonCell = htmlTableRow.createCell();
            final HtmlRadioButton radioButton = radioButtonGroup.createRadioButton();
            radioButton.setUserValue(MetaObjectFactory.createObject(curriculumGroup, new Schema(CurriculumGroup.class)).getKey()
View Full Code Here

                final String oneFullName = curricularCourse.getOneFullName(executionSemester);
                final String name =
                        " <span class='bold'>" + curricularCourse.getName(dismissalBean.getExecutionPeriod()) + "</span> ("
                                + oneFullName.substring(0, oneFullName.lastIndexOf(">")) + ")";
                final String codeAndname = StringUtils.isEmpty(code) ? name : code + " - " + name;
                nameCell.setBody(new HtmlText(codeAndname, false));

                nameCell.setClasses(getCurricularCourseNameClasses());

                final HtmlTableCell checkBoxCell = htmlTableRow.createCell();
                checkBoxCell.setClasses(getCurricularCourseCheckBoxClasses());
View Full Code Here

            final HtmlTableRow htmlTableRow = groupTable.createRow();
            htmlTableRow.setClasses(getGroupRowClasses());

            final HtmlTableCell nameCell = htmlTableRow.createCell();
            nameCell.setBody(new HtmlText(courseGroup.getName()));
            nameCell.setClasses(getGroupNameClasses());

            final HtmlTableCell currentCreditsCell = htmlTableRow.createCell();
            final double ectsCreditsForCourseGroup =
                    studentCurricularPlan.getCreditsConcludedForCourseGroup(courseGroup).doubleValue();
            if (ectsCreditsForCourseGroup == 0d) {
                currentCreditsCell.setBody(new HtmlText("ECTS:  -"));
            } else {
                currentCreditsCell.setBody(new HtmlText("ECTS: " + ectsCreditsForCourseGroup));
            }
            currentCreditsCell.setClasses("smalltxt");
            currentCreditsCell.setStyle("width: 6em;");

            final HtmlTableCell creditsMinCell = htmlTableRow.createCell();
            creditsMinCell.setBody(new HtmlText("Min: " + courseGroup.getMinEctsCredits(executionSemester)));
            creditsMinCell.setClasses("smalltxt");
            creditsMinCell.setStyle("width: 6em;");

            final HtmlTableCell creditsMaxCell = htmlTableRow.createCell();
            creditsMaxCell.setBody(new HtmlText("Max: " + courseGroup.getMaxEctsCredits(executionSemester)));
            creditsMaxCell.setClasses("smalltxt");
            creditsMaxCell.setStyle("width: 6em;");

            final HtmlTableCell radioButtonCell = htmlTableRow.createCell();
            final HtmlRadioButton radioButton = radioButtonGroup.createRadioButton();
View Full Code Here

        addTabsToRow(groupRow, level);

        // curricular period full label
        final HtmlTableCell cell1 = groupRow.createCell();
        cell1.setClasses(getLabelCellClass());
        cell1.setBody(new HtmlText(child.getFullLabel()));
        cell1.setColspan(getMaxColSpanForTextOnGroupsWithChilds());

        // Group
        final HtmlTableCell cell2 = groupRow.createCell();
        cell2.setClasses(getLabelCellClass());
        cell2.setBody(new HtmlText(getLabel("label.degreeCurricularPlan.renderer.group")));

        final HtmlTableCell cell3 = groupRow.createCell();
        cell3.setClasses(getLabelCellClass());
        cell3.setColspan(getMaxLineSize() - getMaxColSpanForTextOnGroupsWithChilds() - 1);
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.