Package javafx.scene.text

Examples of javafx.scene.text.Text.prefHeight()


      // 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);
View Full Code Here


      // add the duration as text
      final Text lTimeText = new Text(startAsString + " " + appointment.getSummary());
      {
        lTimeText.getStyleClass().add("AppointmentTimeLabel");
        lTimeText.setX( menuIcon.getWidth() + padding );
        lTimeText.setY(lTimeText.prefHeight(0) / 2);
        lTimeText.wrappingWidthProperty().bind(widthProperty().subtract(padding));
        // add a clip to mask out all except the first line
        lTimeText.fontProperty().addListener( (observable) -> {
          Rectangle lClip = new Rectangle();
          lClip.widthProperty().bind(widthProperty().subtract(padding));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.