Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8125025

[Label] Ellipsis is not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      jdk 1.8.0-ea-b57

      Description

      When prefWidth of the label decreases it clips the text, though it must use ellipsis.

      To reproduce shrink window width and there will be no ellipsis.

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.OverrunStyle;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class Label_ellipsis extends Application {

          public static void main(String[] args) {
              launch(args);
          }

          @Override
          public void start(Stage stage) throws Exception
          {
              Label label = new Label("The quick brown fox jumps over the lazy dog 01234567890");
              label.setEllipsisString("...");
              label.setTextOverrun(OverrunStyle.ELLIPSIS);

              VBox root = new VBox(10d);
              root.getChildren().add(label);
              
              Scene scene = new Scene(root);
              stage.setScene(scene);
              stage.show();
          }

      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                leifs Leif Samuelsson (Inactive)
                Reporter:
                dzinkevi Dmitry Zinkevich (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: