Text cut off in new Dialogs API

Jonathan Giles jonathan.giles at oracle.com
Mon Nov 17 22:42:05 UTC 2014


I've filed https://javafx-jira.kenai.com/browse/RT-39422

-- Jonathan

On 18/11/2014 5:00 a.m., Kevin Rushforth wrote:
> Please file a JIRA.
>
> -- Kevin
>
>
> Robert Lichtenberger wrote:
>> I hope this is the right place to post bugs to. If not, please accept 
>> my apologies and advise where to post bugs.
>>
>> I've just tried the upcoming (u40) new Dialogs API (good job, BTW, 
>> looks/feels great) and noticed that long content texts will be cut 
>> off (elipsis).
>>
>> Here's an example:
>>
>> import javafx.application.Application;
>> import javafx.event.ActionEvent;
>> import javafx.event.EventHandler;
>> import javafx.scene.Scene;
>> import javafx.scene.control.Alert;
>> import javafx.scene.control.Alert.AlertType;
>> import javafx.scene.control.Menu;
>> import javafx.scene.control.MenuBar;
>> import javafx.scene.control.MenuItem;
>> import javafx.scene.input.KeyCombination;
>> import javafx.scene.layout.VBox;
>> import javafx.stage.Stage;
>>
>> public class DialogCutOffBug extends Application {
>>
>>     public DialogCutOffBug() {
>>     }
>>
>>     @Override
>>     public void start(Stage stage) throws Exception {
>>         stage.setTitle("Menu Sample");
>>         Scene scene = new Scene(new VBox(), 400, 350);
>>
>>         MenuBar menuBar = new MenuBar();
>>
>>         // --- Menu File
>>         Menu menuFile = new Menu("File");
>>         menuBar.getMenus().addAll(menuFile);
>>
>>         MenuItem test = new MenuItem("Open Dialog");
>> test.setAccelerator(KeyCombination.keyCombination("Ctrl+O"));
>>         test.setOnAction(new EventHandler<ActionEvent>() {
>>             public void handle(ActionEvent t) {
>>                 Alert alert = new Alert(AlertType.INFORMATION);
>>                 alert.setTitle("Information Dialog");
>>                 alert.setHeaderText("Short");
>>                 alert.setContentText("Whenever I start to use 
>> dialogs, there is certain verboseness involved, which will make the 
>> dialog basically useless, however JavaFX should not produce ellipses 
>> here, because the Dialog text should always be displayed in Full");
>>                 alert.showAndWait();
>>             }
>>         });
>>
>>         menuFile.getItems().add(test);
>>
>>         ((VBox) scene.getRoot()).getChildren().addAll(menuBar);
>>
>>         stage.setScene(scene);
>>         stage.show();
>>     }
>>
>>     public static void main(String[] args) {
>>         launch(args);
>>     }
>> }
>>
>> It looks like this (red line added by me, of course):
>>
>>
>> Best regards,
>> Robert Lichtenberger
>>



More information about the openjfx-dev mailing list