Skip to content

Commit edcc2e2

Browse files
committed
Update dialog properties in demo
1 parent 4f07b50 commit edcc2e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tabshell-demos/tabshell-demos-full/src/main/java/com/techsenger/tabshell/demos/full/EditorTabViewModel.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,31 @@ public ShellTabKey getKey() {
5959
void showInfoDialog() {
6060
var viewModel = new AlertDialogViewModel(DialogScope.SHELL, AlertDialogType.INFO,
6161
"All done! Time for coffee.");
62+
viewModel.setPrefWidth(400);
6263
getComponentHelper().openAlertDialog(viewModel);
6364
}
6465

6566
void showWarningDialog() {
6667
var viewModel = new AlertDialogViewModel(DialogScope.SHELL, AlertDialogType.WARNING,
6768
"Attention! You shouldn't do it!");
69+
viewModel.setPrefWidth(400);
6870
getComponentHelper().openAlertDialog(viewModel);
6971
}
7072

7173
void showErrorDialog() {
7274
var viewModel = new AlertDialogViewModel(DialogScope.SHELL, AlertDialogType.ERROR,
7375
"Oops! That didn’t work.");
76+
viewModel.setPrefWidth(400);
7477
getComponentHelper().openAlertDialog(viewModel);
7578
}
7679

7780
void showYesNoDialog() {
7881
var viewModel = new YesNoDialogViewModel(DialogScope.SHELL,
79-
"This choice will determine the fate of the world! Are you sure?");
82+
"Are you really sure?");
8083
viewModel.setTitle("Confirm");
8184
viewModel.setYesText("Yes");
8285
viewModel.setNoText("No");
86+
viewModel.setPrefWidth(400);
8387
getComponentHelper().openYesNoDialog(viewModel);
8488
}
8589

0 commit comments

Comments
 (0)