Skip to content

Commit

Permalink
Fix enum tags
Browse files Browse the repository at this point in the history
The following enums should be ALL CAPS:
  MessageDialogButton.CANCEL
  MessageDialogButton.CONTINUE
  LinearLayout.Alignment.END
  • Loading branch information
spaikmos authored and martinpaljak committed Dec 21, 2023
1 parent cbe346d commit ae176f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tool/src/main/java/apdu4j/tool/FancyChooser.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ synchronized public void readerListChanged(List<PCSCReader> readers) {
MessageDialog warn = new MessageDialogBuilder()
.setTitle(" Warning! ")
.setText("Reader is in exclusive use by some other application")
.addButton(MessageDialogButton.Cancel)
.addButton(MessageDialogButton.Continue)
.addButton(MessageDialogButton.CANCEL)
.addButton(MessageDialogButton.CONTINUE)
.build();
warn.setCloseWindowWithEscape(true);
MessageDialogButton d = warn.showDialog(gui);
if (d == null || d == MessageDialogButton.Cancel) {
if (d == null || d == MessageDialogButton.CANCEL) {
return;
}
// Fall through if clause and set chosen one.
Expand Down Expand Up @@ -252,9 +252,9 @@ private FancyChooser(Terminal terminal, Screen screen, TerminalManager manager,
// Empty line between quit button
mainPanel.addComponent(new EmptySpace(new TerminalSize(0, 1)));
quitButton = new Button("Cancel and quit", () -> mainWindow.close());
quitButton.setLayoutData(LinearLayout.createLayoutData(LinearLayout.Alignment.End));
quitButton.setLayoutData(LinearLayout.createLayoutData(LinearLayout.Alignment.END));
mainPanel.addComponent(quitButton);
//mainPanel.setLayoutData(LinearLayout.createLayoutData(LinearLayout.Alignment.End));
//mainPanel.setLayoutData(LinearLayout.createLayoutData(LinearLayout.Alignment.END));
mainWindow.setComponent(mainPanel);
}

Expand Down

0 comments on commit ae176f7

Please sign in to comment.