// history visualizer
historicalVisualizer = new HistoricalVisualizer(this);
getChildren().add(historicalVisualizer);
// add the duration as text
Text lTimeText = new Text(startAsString + "-" + endAsString);
{
lTimeText.getStyleClass().add("AppointmentTimeLabel");
lTimeText.setX( padding );
lTimeText.setY(lTimeText.prefHeight(0));
Rectangle lClip = new Rectangle(0,0,0,0);
lClip.widthProperty().bind(widthProperty().subtract(padding));
lClip.heightProperty().bind(heightProperty());
lTimeText.setClip(lClip);
getChildren().add(lTimeText);
}
// add summary
Text lSummaryText = new Text(appointment.getSummary());
{
lSummaryText.getStyleClass().add("AppointmentLabel");
lSummaryText.setX( padding );
lSummaryText.setY( lTimeText.getY() + textHeightProperty.get());
lSummaryText.wrappingWidthProperty().bind(widthProperty().subtract(padding));
Rectangle lClip = new Rectangle(0,0,0,0);
lClip.widthProperty().bind(widthProperty());
lClip.heightProperty().bind(heightProperty().subtract(padding));
lSummaryText.setClip(lClip);
getChildren().add(lSummaryText);
}
}