54 import javafx.scene.input.MouseEvent;
55 import javafx.scene.layout.Region;
56 import javafx.scene.layout.VBox;
57 import javafx.scene.paint.Color;
58 import javafx.scene.shape.Line;
59 import javafx.scene.shape.Polyline;
60 import javafx.scene.shape.Rectangle;
61 import javafx.scene.text.Font;
62 import javafx.scene.text.FontWeight;
63 import javafx.scene.text.Text;
64 import javafx.util.Callback;
65 import com.javafx.experiments.scheduleapp.TouchClickedEventAvoider;
66 import com.javafx.experiments.scheduleapp.ConferenceScheduleApp;
67 import com.javafx.experiments.scheduleapp.Page;
68 import com.javafx.experiments.scheduleapp.control.EventPopoverPage;
69 import com.javafx.experiments.scheduleapp.control.Popover;
70 import com.javafx.experiments.scheduleapp.data.DataService;
71 import com.javafx.experiments.scheduleapp.model.Event;
72 import com.javafx.experiments.scheduleapp.model.Session;
73 import com.javafx.experiments.scheduleapp.model.Track;
74 import com.sun.javafx.scene.control.skin.ListViewSkin;
75
76 import static com.javafx.experiments.scheduleapp.ConferenceScheduleApp.*;
77 import static com.javafx.experiments.scheduleapp.Theme.*;
78
79 public class TimelinePage extends Page implements Callback<ListView<Event>, ListCell<Event>> {
80 private static final DateFormat TIME_FORMAT = new SimpleDateFormat("hh:mma");
81 private static final DateFormat DAY_FORMAT = new SimpleDateFormat("EEEE MMMM d");
82 private static final Image DOT_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-dot.png").toExternalForm());
83 private static final Image PRESENTATION_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-presentation.png").toExternalForm());
84 private static final Image TOP_FADE_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-top-fade.png").toExternalForm());
85 private static final Image BOTTOM_FADE_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-bottom-fade.png").toExternalForm());
86 private static final Calendar TEMP_CALENDAR_1 = Calendar.getInstance();
87 private static final Calendar TEMP_CALENDAR_2 = Calendar.getInstance();
88 private static final int TOP = 20;
89 private static final int BOTTOM = 20;
90 private static final int LABEL_HEIGHT = 18;
91 private static final int BUBBLE_PADDING = 5;
92 private static final Font TIME_FONT = LARGE_FONT;
93 private static final Font TITLE_FONT = BASE_FONT;
94 private static final Color TITLE_COLOR = DARK_GREY;
|
54 import javafx.scene.input.MouseEvent;
55 import javafx.scene.layout.Region;
56 import javafx.scene.layout.VBox;
57 import javafx.scene.paint.Color;
58 import javafx.scene.shape.Line;
59 import javafx.scene.shape.Polyline;
60 import javafx.scene.shape.Rectangle;
61 import javafx.scene.text.Font;
62 import javafx.scene.text.FontWeight;
63 import javafx.scene.text.Text;
64 import javafx.util.Callback;
65 import com.javafx.experiments.scheduleapp.TouchClickedEventAvoider;
66 import com.javafx.experiments.scheduleapp.ConferenceScheduleApp;
67 import com.javafx.experiments.scheduleapp.Page;
68 import com.javafx.experiments.scheduleapp.control.EventPopoverPage;
69 import com.javafx.experiments.scheduleapp.control.Popover;
70 import com.javafx.experiments.scheduleapp.data.DataService;
71 import com.javafx.experiments.scheduleapp.model.Event;
72 import com.javafx.experiments.scheduleapp.model.Session;
73 import com.javafx.experiments.scheduleapp.model.Track;
74 import javafx.scene.control.skin.ListViewSkin;
75
76 import static com.javafx.experiments.scheduleapp.ConferenceScheduleApp.*;
77 import static com.javafx.experiments.scheduleapp.Theme.*;
78
79 public class TimelinePage extends Page implements Callback<ListView<Event>, ListCell<Event>> {
80 private static final DateFormat TIME_FORMAT = new SimpleDateFormat("hh:mma");
81 private static final DateFormat DAY_FORMAT = new SimpleDateFormat("EEEE MMMM d");
82 private static final Image DOT_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-dot.png").toExternalForm());
83 private static final Image PRESENTATION_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-presentation.png").toExternalForm());
84 private static final Image TOP_FADE_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-top-fade.png").toExternalForm());
85 private static final Image BOTTOM_FADE_IMAGE = new Image(ConferenceScheduleApp.class.getResource("images/timeline-bottom-fade.png").toExternalForm());
86 private static final Calendar TEMP_CALENDAR_1 = Calendar.getInstance();
87 private static final Calendar TEMP_CALENDAR_2 = Calendar.getInstance();
88 private static final int TOP = 20;
89 private static final int BOTTOM = 20;
90 private static final int LABEL_HEIGHT = 18;
91 private static final int BUBBLE_PADDING = 5;
92 private static final Font TIME_FONT = LARGE_FONT;
93 private static final Font TITLE_FONT = BASE_FONT;
94 private static final Color TITLE_COLOR = DARK_GREY;
|