Examples of TimetableEvent


Examples of org.openfaces.component.timetable.TimetableEvent

        event.setId(generateEventId());
        events.add(event);
    }

    public void updateEvent(List<AbstractTimetableEvent> events, TimetableEvent editedEvent) {
        TimetableEvent event = (TimetableEvent) eventById(events, editedEvent.getId());
        event.setName(editedEvent.getName());
        event.setStart(editedEvent.getStart());
        event.setEnd(editedEvent.getEnd());
        event.setDescription(editedEvent.getDescription());
        event.setResourceId(editedEvent.getResourceId());
        event.setColor(editedEvent.getColor());

    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

    public Color getEventColor2() {
        return getEventColor(events2);
    }

    public Color getEventColor(List<AbstractTimetableEvent> events) {
        TimetableEvent event = getEvent();
        return ((TimetableEvent) eventById(events, event.getId())).getColor();
    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

    public void setEventColor2(Color color) {
        setEventColor(color, events2);
    }

    public void setEventColor(Color color, List<AbstractTimetableEvent> events) {
        TimetableEvent event = getEvent();
        ((TimetableEvent) eventById(events, event.getId())).setColor(color);
    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

    public void moveEvent() {
        moveEvent(events2);
    }

    public void moveEvent(List<AbstractTimetableEvent> events) {
        TimetableEvent event = getEvent();
        String resourceId = event.getResourceId();
        for (int i = 0; i < resources.size(); i++) {
            TimetableResource timetableResource = resources.get(i);
            if (timetableResource.getId().equals(resourceId)) {
                TimetableResource nextResource = resources.get((i + 1) % resources.size());
                eventById(events, event.getId()).setResourceId(nextResource.getId());
                return;
            }
        }
    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

    public void removeEvent() {
        removeEvent(events2);
    }

    public void removeEvent(List<AbstractTimetableEvent> events) {
        TimetableEvent event = getEvent();
        String resourceId = event.getResourceId();
        for (TimetableResource timetableResource : resources) {
            if (timetableResource.getId().equals(resourceId)) {
                AbstractTimetableEvent eventToRemove = eventById(events, event.getId());
                events.remove(eventToRemove);
                return;
            }
        }
    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

        Color green = new Color(0, 180, 0);       
        Color blue = new Color(51, 102, 255);
        Color orange = new Color(247, 103, 24);       

//        today
        events.add(new TimetableEvent(generateEventId(), todayAt(6, 50), todayAt(8, 0), "Yoga, Level 1",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
        events.add(new TimetableEvent(generateEventId(), todayAt(10, 50), todayAt(12, 0), "Power Yoga, Level 1",
                "Instructor: Gregory House <br/>Fee: $30", blue));
        events.add(new TimetableEvent(generateEventId(), todayAt(13, 0), todayAt(14, 55), "Yoga, Level 2",
                "Instructor: Melany Scott <br/>Fee: $25", red1));
        events.add(new TimetableEvent(generateEventId(), todayAt(15, 30), todayAt(17, 30), "Intro to Yoga",
                "Instructor: Tony Bricks <br/>Fee: Free", orange));
        events.add(new TimetableEvent(generateEventId(), todayAt(17, 55), todayAt(19, 25), "Gentle Yoga, Level 1",
                "Instructor: Alex West <br/>Fee: $30", blue));
        ReservedTimeEvent reservedTimeEvent1 = new ReservedTimeEvent(generateEventId(), null, todayAt(19, 45), todayAt(20, 15));
        events.add(reservedTimeEvent1);
        reservedTimes.add(reservedTimeEvent1);
        events.add(new TimetableEvent(generateEventId(), todayAt(21, 40), todayAt(23, 30), "Meditation",
                "Instructor: Gregory House <br/>Fee: $20", green));

        //yesterday
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(7, 0), yesterdayAt(8, 20), "Yoga, Level 1",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(9, 0), yesterdayAt(11, 30), "Meditation",
                "Instructor: Tony Bricks <br/>Fee: $20", green));
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(13, 0), yesterdayAt(14, 55), "Yoga, Level 3",
                "Instructor: Melany Scott <br/>Fee: $25", red2));
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(19, 55), yesterdayAt(19, 25), "Gentle Yoga For Those with Special Considerations",
                "Instructor: Alex West <br/>Fee: $25", blue));
        ReservedTimeEvent reservedTimeEvent2 = new ReservedTimeEvent(generateEventId(), null, yesterdayAt(21, 5), yesterdayAt(24, 0));
        events.add(reservedTimeEvent2);
        reservedTimes.add(reservedTimeEvent2);

        //tomorrow
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(8, 30), tomorrowAt(11, 30), "Meditation",
                "Instructor: Tony Bricks <br/>Fee: $20", green));
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(13, 0), tomorrowAt(14, 30), "Yoga, Level 2/3",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(16, 0), tomorrowAt(17, 55), "Yoga and Meditation, Level 2/3",
                "Instructor: Melany Scott <br/>Fee: $45", red2));
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(20, 30), tomorrowAt(22, 0), "Gentle Yoga and Meditation",
                "Instructor: Matt Hunt <br/>Fee: $55", blue));
    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

        event.setId(generateEventId());
        events.add(event);
    }

    public void updateEvent(List<AbstractTimetableEvent> events, TimetableEvent editedEvent) {
        TimetableEvent event = (TimetableEvent) eventById(events, editedEvent.getId());
        event.setName(editedEvent.getName());
        event.setStart(editedEvent.getStart());
        event.setEnd(editedEvent.getEnd());
        event.setDescription(editedEvent.getDescription());
        event.setResourceId(editedEvent.getResourceId());
        event.setColor(editedEvent.getColor());

    }
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

            removeEvent(events, eventId);
        }
    }

    public void doLater(ActionEvent actionEvent) {
        TimetableEvent modifiedEvent = getEvent();
        if (modifiedEvent != null) {
            AbstractTimetableEvent event = eventById(events, modifiedEvent.getId());
            if (event != null) {
                Date startDate = modifyDate(event.getStart(), Calendar.HOUR_OF_DAY, 1);
                Date endDate = modifyDate(event.getEnd(), Calendar.HOUR_OF_DAY, 1);
                if(isTimeAvailable(startDate, endDate)) {
                    event.setStart(startDate);
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

        Color green = new Color(0, 180, 0);
        Color blue = new Color(51, 102, 255);
        Color orange = new Color(247, 103, 24);

//        today
        events.add(new TimetableEvent(generateEventId(), thisMonth(2), thisMonth(14), "Vacation",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
   /*     events.add(new TimetableEvent(generateEventId(), thisMonth(14), thisMonth(15), "Ill",
                "Instructor: Gregory House <br/>Fee: $30", blue));
        events.add(new TimetableEvent(generateEventId(), thisMonth(17), thisMonth(17), "Day Off",
                "Instructor: Melany Scott <br/>Fee: $25", red1));
View Full Code Here

Examples of org.openfaces.component.timetable.TimetableEvent

        Color green = new Color(0, 180, 0);
        Color blue = new Color(51, 102, 255);
        Color orange = new Color(247, 103, 24);

//        today
        events.add(new TimetableEvent(generateEventId(), todayAt(6, 50), todayAt(8, 0), "Yoga, Level 1",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
        events.add(new TimetableEvent(generateEventId(), todayAt(10, 50), todayAt(12, 0), "Power Yoga, Level 1",
                "Instructor: Gregory House <br/>Fee: $30", blue));
        events.add(new TimetableEvent(generateEventId(), todayAt(13, 0), todayAt(14, 55), "Yoga, Level 2",
                "Instructor: Melany Scott <br/>Fee: $25", red1));
        events.add(new TimetableEvent(generateEventId(), todayAt(15, 30), todayAt(17, 30), "Intro to Yoga",
                "Instructor: Tony Bricks <br/>Fee: Free", orange));
        events.add(new TimetableEvent(generateEventId(), todayAt(17, 55), todayAt(19, 25), "Gentle Yoga, Level 1",
                "Instructor: Alex West <br/>Fee: $30", blue));
        events.add(new TimetableEvent(generateEventId(), todayAt(21, 40), todayAt(23, 30), "Meditation",
                "Instructor: Gregory House <br/>Fee: $20", green));

        //yesterday
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(7, 0), yesterdayAt(8, 20), "Yoga, Level 1",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(9, 0), yesterdayAt(11, 30), "Meditation",
                "Instructor: Tony Bricks <br/>Fee: $20", green));
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(13, 0), yesterdayAt(14, 55), "Yoga, Level 3",
                "Instructor: Melany Scott <br/>Fee: $25", red2));
        events.add(new TimetableEvent(generateEventId(), yesterdayAt(19, 55), yesterdayAt(19, 25), "Gentle Yoga For Those with Special Considerations",
                "Instructor: Alex West <br/>Fee: $25", blue));

        //tomorrow
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(8, 30), tomorrowAt(11, 30), "Meditation",
                "Instructor: Tony Bricks <br/>Fee: $20", green));
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(13, 0), tomorrowAt(14, 30), "Yoga, Level 2/3",
                "Instructor: Ivan Doe <br/>Fee: $40", red1));
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(16, 0), tomorrowAt(17, 55), "Yoga and Meditation, Level 2/3",
                "Instructor: Melany Scott <br/>Fee: $45", red2));
        events.add(new TimetableEvent(generateEventId(), tomorrowAt(20, 30), tomorrowAt(22, 0), "Gentle Yoga and Meditation",
                "Instructor: Matt Hunt <br/>Fee: $55", blue));

        for (AbstractTimetableEvent event : events) {
            TimetableEvent timetableEvent = (TimetableEvent) event;
            Task task = new Task(timetableEvent.getName(),
                    timetableEvent.getStart(), timetableEvent.getEnd(),
                    timetableEvent.getDescription());
            tasks.add(task);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.