Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoShowOccupation


    }

    @Override
    public StringBuilder lastRender(LessonSlot lessonSlot, String context) {
        StringBuilder strBuffer = new StringBuilder();
        InfoShowOccupation showOccupation = lessonSlot.getInfoLessonWrapper().getInfoShowOccupation();
        if (showOccupation instanceof InfoLesson) {
            InfoLesson lesson = (InfoLesson) showOccupation;
            strBuffer.append(getURL(lesson.getInfoShift().getShift(), context));
            strBuffer.append("<img src=\"").append(context).append("/images/").append(getImage()).append("\"/>").append("</a>");
        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {
View Full Code Here


    @Override
    public StringBuilder render(String context, LessonSlot lessonSlot) {

        StringBuilder strBuffer = new StringBuilder();
        InfoShowOccupation showOccupation = lessonSlot.getInfoLessonWrapper().getInfoShowOccupation();

        if (showOccupation instanceof InfoLesson) {

            InfoLesson lesson = (InfoLesson) showOccupation;
View Full Code Here

        TimeTable timeTable = new TimeTable(numberOfHours, numberOfDays, calendar, slotSizeMinutes, locale, pageContext);
        Iterator lessonIterator = lessonList.iterator();

        while (lessonIterator.hasNext()) {
            InfoShowOccupation infoShowOccupation = (InfoShowOccupation) lessonIterator.next();
            timeTable.addLesson(infoShowOccupation);
        }
        return timeTable;
    }
View Full Code Here

        List<SubtitleEntry> listaAuxiliar = new ArrayList<SubtitleEntry>();
        Iterator<InfoShowOccupation> iterator = listaAulas.iterator();

        while (iterator.hasNext()) {

            InfoShowOccupation elem = iterator.next();

            if (elem instanceof InfoLesson || elem instanceof InfoLessonInstance) {
                SubtitleEntry subtitleEntry =
                        new SubtitleEntry(elem.getInfoShift().getInfoDisciplinaExecucao().getSigla(), elem.getInfoShift()
                                .getInfoDisciplinaExecucao().getNome());

                if (!listaAuxiliar.contains(subtitleEntry)) {
                    listaAuxiliar.add(subtitleEntry);
                }
            }
        }

        if (listaAuxiliar.size() > 1) {

            Collections.sort(listaAuxiliar);

            result.append("<br/><b>");
            result.append(getMessageResource(pageContext, "public.degree.information.label.legend"));
            result.append("</b><br /><br /><table cellpadding='0' cellspacing='0' style='margin-left:5px'>");

            for (int i = 0; i < listaAuxiliar.size(); i++) {

                SubtitleEntry elem = listaAuxiliar.get(i);

                boolean oddElement = (i % 2 == 1);
                if (!oddElement) {
                    result.append("<tr>\r\n");
                }
                result.append("<td width='60'><b>");
                result.append(elem.getKey());
                result.append("</b></td><td  style='vertical-align:top'>-</td><td>");
                result.append(elem.getValue());
                result.append("</td>");

                if (oddElement) {
                    result.append("</tr>\r\n");
                }
View Full Code Here

        lessonSlot.getInfoLessonWrapper().setFirstRowAlreadyAppended(true);
        return builder;
    }

    public String renderTitleText(final LessonSlot lessonSlot) {
        final InfoShowOccupation occupation = lessonSlot.getInfoLessonWrapper().getInfoShowOccupation();

        final StringBuilder builder = new StringBuilder();
        builder.append(occupation.getBeginHourMinuteSecond().toString("HH:mm"));
        builder.append("-");
        builder.append(occupation.getEndHourMinuteSecond().toString("HH:mm"));

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

        if (infoLessonWrapper == null || infoLessonWrapper.getInfoShowOccupation() == null) {
            /* blank slot color */
            return "#CCCCCC";
        }

        final InfoShowOccupation infoShowOccupation = infoLessonWrapper.getInfoShowOccupation();
        final String colorKeyInfoLesson = getColorKeyFromInfoLesson(infoShowOccupation);
        final String color = lessonColors.get(colorKeyInfoLesson);
        final String result = color == null ? getNextColor(colorKeyInfoLesson) : color;
        return result;
    }
View Full Code Here

                        strBuffer.append(" class='");
                        strBuffer.append(getSlotCssClass(infoLessonWrapper, hourIndex));
                        strBuffer.append("' ");
                        if (infoLessonWrapper != null) {
                            final InfoShowOccupation occupation =
                                    infoLessonWrapper.getLessonSlot().getInfoLessonWrapper().getInfoShowOccupation();
                            strBuffer.append(" title='")
                                    .append(this.lessonSlotContentRenderer.renderTitleText(infoLessonWrapper.getLessonSlot()))
                                    .append("'");
                        }
View Full Code Here

        InfoSiteRoomTimeTable bodyComponent = RoomSiteComponentBuilder.getInfoSiteRoomTimeTable(rightNow, room, null);
        List<FenixRoomEvent> roomEvents = new ArrayList<FenixRoomEvent>();

        try {
            for (Object occupation : bodyComponent.getInfoShowOccupation()) {
                InfoShowOccupation showOccupation = (InfoShowOccupation) occupation;
                DateTime date = new DateTime(rightNow);
                DateTime newDate = date.withDayOfWeek(showOccupation.getDiaSemana().getDiaSemanaInDayOfWeekJodaFormat());
                String day = newDate.toString("dd/MM/yyyy");

                FenixRoomEvent roomEvent = null;

                if (showOccupation instanceof InfoLesson || showOccupation instanceof InfoLessonInstance) {
                    InfoShowOccupation lesson = showOccupation;
                    InfoExecutionCourse infoExecutionCourse = lesson.getInfoShift().getInfoDisciplinaExecucao();

                    String start = dataFormatHour.format(lesson.getInicio().getTime());
                    String end = dataFormatHour.format(lesson.getFim().getTime());
                    String weekday = lesson.getDiaSemana().getDiaSemanaString();

                    FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);

                    String info = lesson.getInfoShift().getShiftTypesCodePrettyPrint();

                    FenixCourse course = new FenixCourse(infoExecutionCourse.getExecutionCourse());

                    roomEvent = new FenixRoomEvent.LessonEvent(start, end, weekday, day, period, info, course);
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.InfoShowOccupation

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.