Package net.ftlines.wicket.fullcalendar

Examples of net.ftlines.wicket.fullcalendar.Event


    Request r = getCalendar().getRequest();
    String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    Event event = source.getEventProvider().getEventForId(eventId);

    onClicked(new ClickedEvent(source, event), new CalendarResponse(getCalendar(), target));
  }
View Full Code Here


    Request r = getCalendar().getRequest();
    String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    Event event = source.getEventProvider().getEventForId(eventId);

    int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();
    boolean allDay = r.getRequestParameters().getParameterValue("allDay").toBoolean();
View Full Code Here

    Request r = getCalendar().getRequest();
    String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    Event event = source.getEventProvider().getEventForId(eventId);

    int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();

    return onEventResized(new ResizedEvent(source, event, dayDelta, minuteDelta), new CalendarResponse(
View Full Code Here

        final Collection<ObjectAdapter> entityList = model.getObject();
       
        final Function<ObjectAdapter, Event> function = new Function<ObjectAdapter, Event>() {

            public Event apply(ObjectAdapter input) {
                Event event = new Event();

                final String associationId = dateAssociation.getId();
                final String associationName = dateAssociation.getName();
                final DateValueFacet facet = dateAssociation.getSpecification().getFacet(DateValueFacet.class);
                final ObjectAdapter dateAdapter = dateAssociation.get(input);
                final Date dateValue = facet.dateValue(dateAdapter);
                if(dateValue == null) {
                    return null;
                }
                final DateTime start = new DateTime(dateValue.getTime());
                final DateTime end = start;

                event.setStart(start);
                event.setEnd(end);

                final String oidStr = input.getOid().enString(IsisContext.getOidMarshaller());
                event.setId(oidStr + "-" + associationId);

                event.setAllDay(true);
                //event.setBackgroundColor(backgroundColor)
                //event.setBorderColor(borderColor)
                event.setClassName("fullCalendar-event-" + associationId);
                //event.setColor(color)
                event.setEditable(false);
                event.setPayload(oidStr);
                //event.setTextColor(textColor)
                event.setTitle(input.titleString() + "\n" + associationName);
                //event.setUrl(url)
               
                return event;
            }
        };
       
        final Collection<Event> events = Collections2.filter(Collections2.transform(entityList, function), NOT_NULL);
        for (Event event : events) {
            eventById.put(event.getId(), event);
        }
    }
View Full Code Here

    final Request r = getCalendar().getRequest();
    final String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    final String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    final EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    final Event event = source.getEventProvider().getEventForId(eventId);

    onClicked(new ClickedEvent(source, event), new CalendarResponse(getCalendar(), target));
  }
View Full Code Here

    final Request r = getCalendar().getRequest();
    final String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    final String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    final EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    final Event event = source.getEventProvider().getEventForId(eventId);

    final int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    final int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();
    final boolean allDay = r.getRequestParameters().getParameterValue("allDay").toBoolean();
View Full Code Here

  @Override
  public Collection<Event> getEvents(final DateTime start, final DateTime end)
  {
    events.clear();
    for (final PollEventDO iterationEvent : pollEventCache.keySet()) {
      Event event = pollEventCache.get(iterationEvent);
      if (event == null) {
        event = new Event();
        // randomizer is needed if the system adds events and the machine is able to add
        // more than one element per millisecond -> double entries for one id is not allowed!
        event.setId("" + (System.currentTimeMillis() % randomizer.nextInt()));
        event.setStart(new DateTime(iterationEvent.getStartDate().getTime()));
        event.setEnd(new DateTime(iterationEvent.getEndDate().getTime()));
        event.setTitle("");
        pollEventCache.put(iterationEvent, event);
      }
      events.put("" + event.getId(), event);
    }
    return events.values();
  }
View Full Code Here

  }

  private PollEventDO searchById(final String id)
  {
    PollEventDO result = null;
    Event temp = null;
    for (final PollEventDO key : pollEventCache.keySet()) {
      temp = pollEventCache.get(key);
      if (temp != null && StringUtils.equals(temp.getId(), id)) {
        result = key;
        break;
      }
    }
    return result;
View Full Code Here

    final Request r = getCalendar().getRequest();
    final String eventId = r.getRequestParameters().getParameterValue("eventId").toString();
    final String sourceId = r.getRequestParameters().getParameterValue("sourceId").toString();

    final EventSource source = getCalendar().getEventManager().getEventSource(sourceId);
    final Event event = source.getEventProvider().getEventForId(eventId);

    final int dayDelta = r.getRequestParameters().getParameterValue("dayDelta").toInt();
    final int minuteDelta = r.getRequestParameters().getParameterValue("minuteDelta").toInt();

    return onEventResized(new ResizedEvent(source, event, dayDelta, minuteDelta), new CalendarResponse(
View Full Code Here

      return;
    }
    if (log.isDebugEnabled() == true) {
      log.debug("Date: " + start + ", hours=" + hours + ", duration: " + durationDays);
    }
    final Event event = new Event().setAllDay(true);
    event.setClassName(EVENT_CLASS_NAME);
    final String id = "" + entry.getId() + "-" + suffix;
    event.setId(id);
    event.setStart(start);
    if (durationDays > 0) {
      event.setEnd(start.plusDays(durationDays));
    } else {
      event.setEnd(start);
    }
    final StringBuffer buf = new StringBuffer();
    buf.append(NumberHelper.formatFraction2(hours)).append(getString("calendar.unit.hour")).append(" ")
    .append(entry.getProjektNameOrStatus());
    if (StringUtils.isNotBlank(entry.getDescription()) == true) {
      buf.append(": ");
      if (durationDays > 2) {
        buf.append(StringUtils.abbreviate(entry.getDescription(), 100));
      } else if (durationDays > 1) {
        buf.append(StringUtils.abbreviate(entry.getDescription(), 50));
      } else {
        buf.append(StringUtils.abbreviate(entry.getDescription(), 20));
      }
    }
    event.setTitle(buf.toString());
    events.put(id, event);
  }
View Full Code Here

TOP

Related Classes of net.ftlines.wicket.fullcalendar.Event

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.