-
Bug
-
Resolution: Fixed
-
P2
-
8
-
jdk 1.8.0-ea-b57
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();
}
}
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();
}
}
- duplicates
-
JDK-8118638 [Labeled] setEllipsisString does not work
- Closed
-
JDK-8125926 [Labeled] OverrunStyles CLIP and ELLIPSIS does not work.
- Closed
- relates to
-
JDK-8101897 Improve ellipses performance
- Resolved
-
JDK-8118318 TableCell shows less of truncated string following RT-25267 ellipsis fix
- Closed