From 0fcfa9517e6fdc1693e55950dd51025ec76356e5 Mon Sep 17 00:00:00 2001 From: SPaikmos Date: Wed, 20 Dec 2023 15:32:40 -0800 Subject: [PATCH] Fix enum tags The following enums should be ALL CAPS: MessageDialogButton.CANCEL MessageDialogButton.CONTINUE LinearLayout.Alignment.END --- tool/src/main/java/apdu4j/tool/FancyChooser.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tool/src/main/java/apdu4j/tool/FancyChooser.java b/tool/src/main/java/apdu4j/tool/FancyChooser.java index 90a7da9..d072a5c 100644 --- a/tool/src/main/java/apdu4j/tool/FancyChooser.java +++ b/tool/src/main/java/apdu4j/tool/FancyChooser.java @@ -113,12 +113,12 @@ synchronized public void readerListChanged(List 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. @@ -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); }