public SessionContent(Session session, Event event, DataService dataService) {
      // event title
      eventTitle = new ResizableWrappingText(session.getTitle());
      eventTitle.setFont(BASE_FONT);
      eventTitle.setFill(Color.WHITE);

      item1Label = new Text(session == null ? "Time" : "Speakers");
      item1Label.setFill(VLIGHT_GRAY);
      item1Label.setFont(BASE_FONT);

      item1Value = new ResizableWrappingText(session.getSpeakersDisplay());
      item1Value.setFill(Color.WHITE);
      item1Value.setFont(LIGHT_FONT);

      item2Label = new Text("Time");
      item2Label.setFill(VLIGHT_GRAY);
      item2Label.setFont(BASE_FONT);

      item2Value =
          new ResizableWrappingText(
              DAY_TIME_FORMAT.format(event.getStart())
                  + " to "
                  + TIME_FORMAT.format(event.getEnd()));
      item2Value.setFill(Color.WHITE);
      item2Value.setFont(LIGHT_FONT);

      item3Label = new Text("Location");
      item3Label.setFill(VLIGHT_GRAY);
      item3Label.setFont(BASE_FONT);

      item3Value = new ResizableWrappingText(session.getSessionTimes()[0].getRoom().toString());
      item3Value.setFill(Color.WHITE);
      item3Value.setFont(LIGHT_FONT);

      // description
      desc = new ResizableWrappingText(session.getSummary());
      desc.setFill(Color.WHITE);
      desc.setFont(LIGHT_FONT);

      // Button is either a delete button or a favorite button
      fav = event.getSessionTime().getEvent() != null;
      button = fav ? new DeleteButton(event, dataService) : new AddButton(event, dataService);

      getChildren()
          .addAll(
              eventTitle,
              item1Label,
              item1Value,
              item2Label,
              item2Value,
              item3Label,
              item3Value,
              desc,
              button);
    }
    public EventContent(Event event, DataService dataService) {
      // event title
      eventTitle = new ResizableWrappingText(event.getTitle());
      eventTitle.setFont(BASE_FONT);
      eventTitle.setFill(Color.WHITE);

      item1Label = new Text("Time");
      item1Label.setFill(VLIGHT_GRAY);
      item1Label.setFont(BASE_FONT);

      item1Value =
          new ResizableWrappingText(
              DAY_TIME_FORMAT.format(event.getStart())
                  + " to "
                  + TIME_FORMAT.format(event.getEnd()));
      item1Value.setFill(Color.WHITE);
      item1Value.setFont(LIGHT_FONT);

      getChildren().addAll(eventTitle, item1Label, item1Value);

      final String organizer = event.getOrganizer();
      if (organizer != null && !"null".equals(organizer)) {
        item2Label = new Text("Organizer");
        item2Label.setFill(VLIGHT_GRAY);
        item2Label.setFont(BASE_FONT);

        item2Value = new ResizableWrappingText(organizer);
        item2Value.setFill(Color.WHITE);
        item2Value.setFont(LIGHT_FONT);

        getChildren().addAll(item2Label, item2Value);
      }

      final String location = event.getLocation();
      if (location != null && !"null".equals(location)) {
        item3Label = new Text("Location");
        item3Label.setFill(VLIGHT_GRAY);
        item3Label.setFont(BASE_FONT);

        item3Value = new ResizableWrappingText(location);
        item3Value.setFill(Color.WHITE);
        item3Value.setFont(LIGHT_FONT);

        getChildren().addAll(item3Label, item3Value);
      }
    }
  public EventPopoverPage(final DataService dataService, final Event event, boolean showBack) {
    this.showBack = showBack;
    getStyleClass().add("event-popover-page");

    final Session session = event.getSession();

    scrollPane = new ScrollPane();
    scrollPane.setFitToWidth(true);
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    content =
        session == null
            ? new EventContent(event, dataService)
            : new SessionContent(session, event, dataService);
    scrollPane.setContent(content);
    getChildren().add(scrollPane);

    if (CHECK_AVAIL_TASK != null) {
      CHECK_AVAIL_TASK.cancel();
    }

    if (!ConferenceScheduleApp.getInstance().getSessionManagement().isGuestProperty().get()
        && content instanceof SessionContent) {
      CHECK_AVAIL_TASK = dataService.checkAvailability(event);
      CHECK_AVAIL_TASK.setOnSucceeded(
          new EventHandler<WorkerStateEvent>() {
            @Override
            public void handle(WorkerStateEvent event) {
              final SessionContent sc = (SessionContent) content;
              final Availability avail = CHECK_AVAIL_TASK.getValue();
              if (!sc.fav) {
                sc.button.setText(avail.full ? "Session Full" : "Register");
                full.set(avail.full);
              }
            }
          });
      FILTER_EXECUTOR.submit(CHECK_AVAIL_TASK);
    }
  }