Example usage for javafx.scene.text TextFlow getStyleClass

List of usage examples for javafx.scene.text TextFlow getStyleClass

Introduction

In this page you can find the example usage for javafx.scene.text TextFlow getStyleClass.

Prototype

@Override
    public final ObservableList<String> getStyleClass() 

Source Link

Usage

From source file:com.github.drbookings.ui.controller.UpcomingController.java

private static void addCheckInSummary(final LocalDate date, final VBox box,
        final List<CheckInOutDetails> checkInNotes) {
    final TextFlow tf = new TextFlow();
    if (checkInNotes.size() > 0) {
        final Text t1 = new Text(checkInNotes.size() + " ");
        t1.getStyleClass().add("emphasis");
        t1.getStyleClass().add("copyable-label");
        final Text t2;
        if (checkInNotes.size() > 1) {
            t2 = new Text("check-ins,");
        } else {/*from w ww . j  a  va 2 s .  c o m*/
            t2 = new Text("check-in,");
        }
        t2.getStyleClass().add("emphasis");
        tf.getStyleClass().add("copyable-label");
        tf.getChildren().addAll(t1, t2);
    }

    if (checkInNotes.isEmpty()) {
        // tf.getChildren().add(new Text("no check-ins,"));
    }
    box.getChildren().add(tf);
}