/** * Constructor * * @param controller The TimeLineController for this action. */ @NbBundle.Messages({ "RebuildDataBase.text=Update DB", "RebuildDataBase.longText=Update the DB to include new events." }) public UpdateDB(TimeLineController controller) { super(Bundle.RebuildDataBase_text()); setLongText(Bundle.RebuildDataBase_longText()); setGraphic(new ImageView(DB_REFRESH)); setEventHandler(actionEvent -> controller.rebuildRepo()); disabledProperty().bind(controller.eventsDBStaleProperty().not()); }
@NbBundle.Messages({ "ZoomIn.longText=Zoom in to view about half as much time.", "ZoomIn.action.text=Zoom in" }) public ZoomIn(TimeLineController controller) { super(Bundle.ZoomIn_action_text()); setLongText(Bundle.ZoomIn_longText()); setGraphic(new ImageView(MAGNIFIER_IN)); setEventHandler( actionEvent -> { controller.pushZoomInTime(); }); }
private String formatSpan(DateTime date) { return date.toString(TimeLineController.getZonedFormatter()); }