// bind picker to agenda
lAgenda.displayedCalendar().bind(lCalendarPicker.calendarProperty());
// image
final ImageView lImageView = new ImageView();
lImageView.setId("TheImage");
// layout scene
BorderPane lBorderPane = new BorderPane();
lBorderPane.setCenter(lAgenda);
VBox lVBox = new VBox();
lVBox.getChildren().add(lCalendarPicker);
lVBox.getChildren().add(lImageView);
lBorderPane.setLeft(lVBox);
lBorderPane.getStyleClass().add("screen");
// setup scene
Scene scene = new Scene(lBorderPane, 1000, 600);
// load custom CSS
scene.getStylesheets().addAll(this.getClass().getResource(this.getClass().getSimpleName() + ".css").toExternalForm());
// try
// {
//// File f = new File("/Documents and Settings/User/My Documents/jfxtras-styles/src/jmetro/JMetroLightTheme.css");
// File f = new File("/Documents and Settings/User/My Documents/jfxtras-styles/src/jmetro/JMetroDarkTheme.css");
// scene.getStylesheets().addAll(f.toURI().toURL().toExternalForm());
// }
// catch (MalformedURLException e) { e.printStackTrace(); }
// create stage
stage.setTitle(this.getClass().getSimpleName());
stage.setScene(scene);
stage.show();
// appear animation on image
lImageView.opacityProperty().set(0.0); // hide image
FadeTransitionBuilder.create()
.node(lImageView)
.delay(Duration.millis(2000))
.fromValue(0.0)
.toValue(1.0)
.duration(Duration.millis(2000))
.build()
.play();
lAgenda.editAppointmentCallbackProperty().set(new Callback<Agenda.Appointment, Void>()
{
@Override
public Void call(final Appointment appointment)
{
// create popup
final Popup lPopup = new Popup();
Button lButton = new Button("Close custom popup");
lButton.setPrefWidth(lImageView.getImage().getWidth());
lButton.setPrefHeight(lImageView.getImage().getHeight());
lButton.setOnAction(new EventHandler<ActionEvent>()
{
@Override
public void handle(ActionEvent evt)
{