More PMD warnings
authorKevin Lamonte <kevin.lamonte@gmail.com>
Sun, 3 Dec 2017 23:35:06 +0000 (18:35 -0500)
committerKevin Lamonte <kevin.lamonte@gmail.com>
Sun, 3 Dec 2017 23:35:06 +0000 (18:35 -0500)
21 files changed:
src/jexer/TApplication.java
src/jexer/TDesktop.java
src/jexer/TFileOpenBox.java
src/jexer/TInputBox.java
src/jexer/TMessageBox.java
src/jexer/bits/MnemonicString.java
src/jexer/demos/Demo1.java
src/jexer/demos/Demo5.java
src/jexer/demos/DemoApplication.java
src/jexer/demos/DemoCheckboxWindow.java
src/jexer/demos/DemoEditorWindow.java
src/jexer/demos/DemoMainWindow.java
src/jexer/demos/DemoMsgBoxWindow.java
src/jexer/demos/DemoTextFieldWindow.java
src/jexer/demos/DemoTextWindow.java
src/jexer/demos/DemoTreeViewWindow.java
src/jexer/demos/DesktopDemo.java
src/jexer/demos/DesktopDemoApplication.java
src/jexer/menu/TMenu.java
src/jexer/menu/TSubMenu.java
src/jexer/package-info.java

index 6dd503f547a141d1a05f0511652c14e038a25f42..f802e2bcbfffccf27af84216543ff94adeb6b8d6 100644 (file)
@@ -2947,6 +2947,7 @@ public class TApplication implements Runnable {
      * @param title window title, will be centered along the top border
      * @param width width of window
      * @param height height of window
+     * @return the new window
      */
     public final TWindow addWindow(final String title, final int width,
         final int height) {
@@ -2963,6 +2964,7 @@ public class TApplication implements Runnable {
      * @param width width of window
      * @param height height of window
      * @param flags bitmask of RESIZABLE, CENTERED, or MODAL
+     * @return the new window
      */
     public final TWindow addWindow(final String title,
         final int width, final int height, final int flags) {
@@ -2979,6 +2981,7 @@ public class TApplication implements Runnable {
      * @param y row relative to parent
      * @param width width of window
      * @param height height of window
+     * @return the new window
      */
     public final TWindow addWindow(final String title,
         final int x, final int y, final int width, final int height) {
@@ -2996,6 +2999,7 @@ public class TApplication implements Runnable {
      * @param width width of window
      * @param height height of window
      * @param flags mask of RESIZABLE, CENTERED, or MODAL
+     * @return the new window
      */
     public final TWindow addWindow(final String title,
         final int x, final int y, final int width, final int height,
@@ -3010,6 +3014,7 @@ public class TApplication implements Runnable {
      * active.
      *
      * @param file the file to open
+     * @return the new editor window
      * @throws IOException if a java.io operation throws
      */
     public final TEditorWindow addEditor(final File file) throws IOException {
index 107427264eaeafa077266fadcef6b13fc4ff9614..1167e0cf004d0579538e11561f056a42711244c8 100644 (file)
@@ -47,7 +47,7 @@ import jexer.event.TMouseEvent;
  * <li>Keypress events are seen if no other windows are open.</li>
  * <li>Menu events are seen if no other windows are open.</li>
  * <li>Command events are seen if no other windows are open.</li>
- * <ul>
+ * </ul>
  */
 public class TDesktop extends TWindow {
 
index 18d65f22ea047b83cb17b709df4e7a71cc5e173d..094f8fa066409f8b937db55b1d2a2a98dc94f149 100644 (file)
@@ -43,7 +43,6 @@ import static jexer.TKeypress.*;
  * TFileOpenBox is a system-modal dialog for selecting a file to open.  Call
  * it like:
  *
- * <p>
  * <pre>
  * {@code
  *     filename = application.fileOpenBox("/path/to/file.ext",
index bf54f1c2c80e653a9f39c686542150f4eb60bd09..50dba36b606ec8a5cedfa691207a2f25239cc65e 100644 (file)
@@ -32,7 +32,6 @@ package jexer;
  * TInputBox is a system-modal dialog with an OK button and a text input
  * field.  Call it like:
  *
- * <p>
  * <pre>
  * {@code
  *     box = application.inputBox(title, caption);
index cd4a514ea912aa92b5f353f2545e293639ef7ae6..0e5cf7d4871fa5d78e7bb5ef340fc3405ecbd3cb 100644 (file)
@@ -39,7 +39,6 @@ import static jexer.TKeypress.*;
  * TMessageBox is a system-modal dialog with buttons for OK, Cancel, Yes, or
  * No.  Call it like:
  *
- * <p>
  * <pre>
  * {@code
  *     box = application.messageBox(title, caption,
index edd5227b7136349be47211f3e814a16cbd70c87b..d0032b6683ad497b3d223586f45dcf7264f8d447 100644 (file)
 package jexer.bits;
 
 /**
- * MnemonicString is used to render a string like "&File" into a highlighted
- * 'F' and the rest of 'ile'.  To insert a literal '&', use two '&&'
- * characters, e.g. "&File && Stuff" would be "File & Stuff" with the first
- * 'F' highlighted.
+ * MnemonicString is used to render a string like "&amp;File" into a
+ * highlighted 'F' and the rest of 'ile'.  To insert a literal '&amp;', use
+ * two '&amp;&amp;' characters, e.g. "&amp;File &amp;&amp; Stuff" would be
+ * "File &amp; Stuff" with the first 'F' highlighted.
  */
 public final class MnemonicString {
 
@@ -63,7 +63,7 @@ public final class MnemonicString {
      * Public constructor.
      *
      * @param label widget label or title.  Label must contain a keyboard
-     * shortcut, denoted by prefixing a letter with "&", e.g. "&File"
+     * shortcut, denoted by prefixing a letter with "&amp;", e.g. "&amp;File"
      */
     public MnemonicString(final String label) {
 
index 4715d79e4b04b3a49e158e201288ad948b63d610..d82a385e14f333142e222faadb40e8661eb6c844 100644 (file)
@@ -35,6 +35,7 @@ import jexer.TApplication;
  * capabilities.
  */
 public class Demo1 {
+
     /**
      * Main entry point.
      *
index df8075a982005ccb1839eb959990025496747a66..d383261af91c6bac99d93c5f2990d317c303de8f 100644 (file)
@@ -44,6 +44,10 @@ import jexer.backend.SwingBackend;
  */
 public class Demo5 implements WindowListener {
 
+    // ------------------------------------------------------------------------
+    // Variables --------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * The first demo application instance.
      */
@@ -54,6 +58,10 @@ public class Demo5 implements WindowListener {
      */
     DemoApplication app2 = null;
 
+    // ------------------------------------------------------------------------
+    // WindowListener ---------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Pass window events into the event queue.
      *
@@ -122,6 +130,10 @@ public class Demo5 implements WindowListener {
         // Ignore
     }
 
+    // ------------------------------------------------------------------------
+    // Demo5 ------------------------------------------------------------------
+    // ------------------------------------------------------------------------
+    
     /**
      * Run two demo applications in separate panes.
      */
index 5036dd017ff71ce0ae45a2590a1fcdb4d0890f02..a9b3468bbfa10288ab98b59e72c43ff18c7e8c75 100644 (file)
@@ -41,48 +41,9 @@ import jexer.backend.SwingTerminal;
  */
 public class DemoApplication extends TApplication {
 
-    /**
-     * Add all the widgets of the demo.
-     */
-    private void addAllWidgets() {
-        new DemoMainWindow(this);
-
-        // Add the menus
-        addFileMenu();
-        addEditMenu();
-
-        TMenu demoMenu = addMenu("&Demo");
-        TMenuItem item = demoMenu.addItem(2000, "&Checkable");
-        item.setCheckable(true);
-        item = demoMenu.addItem(2001, "Disabled");
-        item.setEnabled(false);
-        item = demoMenu.addItem(2002, "&Normal");
-        TSubMenu subMenu = demoMenu.addSubMenu("Sub-&Menu");
-        item = demoMenu.addItem(2010, "N&ormal A&&D");
-        item = demoMenu.addItem(2050, "Co&lors...");
-
-        item = subMenu.addItem(2000, "&Checkable (sub)");
-        item.setCheckable(true);
-        item = subMenu.addItem(2001, "Disabled (sub)");
-        item.setEnabled(false);
-        item = subMenu.addItem(2002, "&Normal (sub)");
-
-        subMenu = subMenu.addSubMenu("Sub-&Menu");
-        item = subMenu.addItem(2000, "&Checkable (sub)");
-        item.setCheckable(true);
-        item = subMenu.addItem(2001, "Disabled (sub)");
-        item.setEnabled(false);
-        item = subMenu.addItem(2002, "&Normal (sub)");
-
-        if (getScreen() instanceof SwingTerminal) {
-            TMenu swingMenu = addMenu("Swin&g");
-            item = swingMenu.addItem(3000, "&Bigger +2");
-            item = swingMenu.addItem(3001, "&Smaller -2");
-        }
-
-        addWindowMenu();
-        addHelpMenu();
-    }
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
 
     /**
      * Public constructor.
@@ -151,6 +112,22 @@ public class DemoApplication extends TApplication {
         addAllWidgets();
     }
 
+    /**
+     * Public constructor.
+     *
+     * @param backendType one of the TApplication.BackendType values
+     * @throws Exception if TApplication can't instantiate the Backend.
+     */
+    public DemoApplication(final BackendType backendType) throws Exception {
+        super(backendType);
+        addAllWidgets();
+        getBackend().setTitle("Jexer Demo Application");
+    }
+
+    // ------------------------------------------------------------------------
+    // TApplication -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Handle menu events.
      *
@@ -199,15 +176,51 @@ public class DemoApplication extends TApplication {
         return super.onMenu(menu);
     }
 
+    // ------------------------------------------------------------------------
+    // DemoApplication --------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
-     * Public constructor.
-     *
-     * @param backendType one of the TApplication.BackendType values
-     * @throws Exception if TApplication can't instantiate the Backend.
+     * Add all the widgets of the demo.
      */
-    public DemoApplication(final BackendType backendType) throws Exception {
-        super(backendType);
-        addAllWidgets();
-        getBackend().setTitle("Jexer Demo Application");
+    private void addAllWidgets() {
+        new DemoMainWindow(this);
+
+        // Add the menus
+        addFileMenu();
+        addEditMenu();
+
+        TMenu demoMenu = addMenu("&Demo");
+        TMenuItem item = demoMenu.addItem(2000, "&Checkable");
+        item.setCheckable(true);
+        item = demoMenu.addItem(2001, "Disabled");
+        item.setEnabled(false);
+        item = demoMenu.addItem(2002, "&Normal");
+        TSubMenu subMenu = demoMenu.addSubMenu("Sub-&Menu");
+        item = demoMenu.addItem(2010, "N&ormal A&&D");
+        item = demoMenu.addItem(2050, "Co&lors...");
+
+        item = subMenu.addItem(2000, "&Checkable (sub)");
+        item.setCheckable(true);
+        item = subMenu.addItem(2001, "Disabled (sub)");
+        item.setEnabled(false);
+        item = subMenu.addItem(2002, "&Normal (sub)");
+
+        subMenu = subMenu.addSubMenu("Sub-&Menu");
+        item = subMenu.addItem(2000, "&Checkable (sub)");
+        item.setCheckable(true);
+        item = subMenu.addItem(2001, "Disabled (sub)");
+        item.setEnabled(false);
+        item = subMenu.addItem(2002, "&Normal (sub)");
+
+        if (getScreen() instanceof SwingTerminal) {
+            TMenu swingMenu = addMenu("Swin&g");
+            item = swingMenu.addItem(3000, "&Bigger +2");
+            item = swingMenu.addItem(3001, "&Smaller -2");
+        }
+
+        addWindowMenu();
+        addHelpMenu();
     }
+
 }
index be0c81fed46f820859fea0f02f870f7de95db80a..2e45117ebbe544f4e191dc3c9afc5544c4fc7678 100644 (file)
@@ -38,6 +38,10 @@ import static jexer.TKeypress.*;
  */
 public class DemoCheckboxWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Constructor.
      *
index 005383135521ac619ee2c6173737b87789b97c6b..104715997261206c0d54b1cadd4bf54e70360751 100644 (file)
@@ -38,11 +38,19 @@ import static jexer.TKeypress.*;
  */
 public class DemoEditorWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Variables --------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Hang onto my TEditor so I can resize it with the window.
      */
     private TEditorWidget editField;
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Public constructor makes a text window out of any string.
      *
@@ -99,6 +107,10 @@ public class DemoEditorWindow extends TWindow {
 
     }
 
+    // ------------------------------------------------------------------------
+    // TWindow ----------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Handle window/screen resize events.
      *
index 209bd1350ccef2f4a2d7464dcd0d7b2c126d86f2..eef25e29aee47926195631f4ae7eea2bf517d22a 100644 (file)
@@ -41,21 +41,35 @@ import static jexer.TKeypress.*;
  */
 public class DemoMainWindow extends TWindow {
 
-    // Timer that increments a number.
+    // ------------------------------------------------------------------------
+    // Variables --------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
+    /**
+     * Timer that increments a number.
+     */
     private TTimer timer;
 
-    // Timer label is updated with timer ticks.
+    /**
+     * Timer label is updated with timer ticks.
+     */
     TLabel timerLabel;
 
     /**
-     * We need to override onClose so that the timer will no longer be called
-     * after we close the window.  TTimers currently are completely unaware
-     * of the rest of the UI classes.
+     * Timer increment used by the timer loop.  Has to be at class scope so
+     * that it can be accessed by the anonymous TAction class.
      */
-    @Override
-    public void onClose() {
-        getApplication().removeTimer(timer);
-    }
+    int timerI = 0;
+
+    /**
+     * Progress bar used by the timer loop.  Has to be at class scope so that
+     * it can be accessed by the anonymous TAction class.
+     */
+    TProgressBar progressBar;
+
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
 
     /**
      * Construct demo window.  It will be centered on screen.
@@ -66,11 +80,6 @@ public class DemoMainWindow extends TWindow {
         this(parent, CENTERED | RESIZABLE);
     }
 
-    // These are used by the timer loop.  They have to be at class scope so
-    // that they can be accessed by the anonymous TAction class.
-    int timerI = 0;
-    TProgressBar progressBar;
-
     /**
      * Constructor.
      *
@@ -212,6 +221,20 @@ public class DemoMainWindow extends TWindow {
         statusBar.addShortcutKeypress(kbF10, cmExit, "Exit");
     }
 
+    // ------------------------------------------------------------------------
+    // TWindow ----------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
+    /**
+     * We need to override onClose so that the timer will no longer be called
+     * after we close the window.  TTimers currently are completely unaware
+     * of the rest of the UI classes.
+     */
+    @Override
+    public void onClose() {
+        getApplication().removeTimer(timer);
+    }
+
     /**
      * Method that subclasses can override to handle posted command events.
      *
index 9a46c7bb5f999e359a31503866bcc69519738104..27ee79074b20fb1ca5dbec0227e490b44fa84241 100644 (file)
@@ -37,6 +37,10 @@ import static jexer.TKeypress.*;
  */
 public class DemoMsgBoxWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Constructor.
      *
index 51656ba7f4e964bbb61ff4af365eeaba67d7d7b5..2d9c5048c46b3df1a4cb2fea5a8f03b1085c6cc8 100644 (file)
@@ -37,6 +37,10 @@ import static jexer.TKeypress.*;
  */
 public class DemoTextFieldWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Constructor.
      *
@@ -88,4 +92,5 @@ public class DemoTextFieldWindow extends TWindow {
         statusBar.addShortcutKeypress(kbF3, cmOpen, "Open");
         statusBar.addShortcutKeypress(kbF10, cmExit, "Exit");
     }
+
 }
index 3538905d2a6cb1dca94998d3040e313965aa5acf..969ca6381aa79bfc6fe0b9c5f1e41cfe5d27cb20 100644 (file)
@@ -39,11 +39,19 @@ import static jexer.TKeypress.*;
  */
 public class DemoTextWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Variables --------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Hang onto my TText so I can resize it with the window.
      */
     private TText textField;
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Public constructor makes a text window out of any string.
      *
@@ -111,6 +119,10 @@ public class DemoTextWindow extends TWindow {
 
     }
 
+    // ------------------------------------------------------------------------
+    // TWindow ----------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Handle window/screen resize events.
      *
index a4bcbe25ef04ee854d85f99bd4ed3f9a54dbd27e..e31ef765ba7b9df1386996ed7dba811b3c42dac7 100644 (file)
@@ -41,11 +41,19 @@ import static jexer.TKeypress.*;
  */
 public class DemoTreeViewWindow extends TWindow {
 
+    // ------------------------------------------------------------------------
+    // Variables --------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Hang onto my TTreeView so I can resize it with the window.
      */
     private TTreeViewWidget treeView;
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Public constructor.
      *
@@ -66,6 +74,10 @@ public class DemoTreeViewWindow extends TWindow {
         statusBar.addShortcutKeypress(kbF10, cmExit, "Exit");
     }
 
+    // ------------------------------------------------------------------------
+    // TWindow ----------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Handle window/screen resize events.
      *
index 58d9893a15e2d06b755660fe41ec82e1c73eb61e..93e8597eb93753e99639d89e5b2260248eacd341 100644 (file)
@@ -36,11 +36,32 @@ import jexer.*;
  */
 public class DesktopDemo extends TDesktop {
 
+    // ------------------------------------------------------------------------
+    // Variables --------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * If true, draw the hatch.  Note package private access.
      */
     boolean drawHatch = true;
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
+    /**
+     * Public constructor.
+     *
+     * @param parent parent application
+     */
+    public DesktopDemo(final TApplication parent) {
+        super(parent);
+    }
+
+    // ------------------------------------------------------------------------
+    // TDesktop ---------------------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * The default TDesktop draws a hatch character across everything.  This
      * version is selectable.
@@ -52,13 +73,4 @@ public class DesktopDemo extends TDesktop {
         }
     }
 
-    /**
-     * Public constructor.
-     *
-     * @param parent parent application
-     */
-    public DesktopDemo(final TApplication parent) {
-        super(parent);
-    }
-
 }
index c546aacaadaa63e6b6447be3b0d0563305afadd0..0393860a3b0addfebf0e3b25004d70ca31c2b7aa 100644 (file)
@@ -40,6 +40,71 @@ import jexer.menu.*;
  */
 public class DesktopDemoApplication extends TApplication {
 
+    // ------------------------------------------------------------------------
+    // Constructors -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
+    /**
+     * Public constructor.
+     *
+     * @param backendType one of the TApplication.BackendType values
+     * @throws Exception if TApplication can't instantiate the Backend.
+     */
+    public DesktopDemoApplication(final BackendType backendType) throws Exception {
+        super(backendType);
+        addAllWidgets();
+        getBackend().setTitle("Jexer Demo Application");
+    }
+
+    // ------------------------------------------------------------------------
+    // TApplication -----------------------------------------------------------
+    // ------------------------------------------------------------------------
+
+    /**
+     * Handle menu events.
+     *
+     * @param menu menu event
+     * @return if true, the event was processed and should not be passed onto
+     * a window
+     */
+    @Override
+    public boolean onMenu(final TMenuEvent menu) {
+
+        if (menu.getId() == TMenu.MID_OPEN_FILE) {
+            try {
+                String filename = fileOpenBox(".");
+                 if (filename != null) {
+                     try {
+                         File file = new File(filename);
+                         StringBuilder fileContents = new StringBuilder();
+                         Scanner scanner = new Scanner(file);
+                         String EOL = System.getProperty("line.separator");
+
+                         try {
+                             while (scanner.hasNextLine()) {
+                                 fileContents.append(scanner.nextLine() + EOL);
+                             }
+                             new DemoTextWindow(this, filename,
+                                 fileContents.toString());
+                         } finally {
+                             scanner.close();
+                         }
+                     } catch (IOException e) {
+                         e.printStackTrace();
+                     }
+                 }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            return true;
+        }
+        return super.onMenu(menu);
+    }
+
+    // ------------------------------------------------------------------------
+    // DesktopDemoApplication -------------------------------------------------
+    // ------------------------------------------------------------------------
+
     /**
      * Add all the widgets of the demo.
      */
@@ -189,56 +254,4 @@ public class DesktopDemoApplication extends TApplication {
 
     }
 
-    /**
-     * Handle menu events.
-     *
-     * @param menu menu event
-     * @return if true, the event was processed and should not be passed onto
-     * a window
-     */
-    @Override
-    public boolean onMenu(final TMenuEvent menu) {
-
-        if (menu.getId() == TMenu.MID_OPEN_FILE) {
-            try {
-                String filename = fileOpenBox(".");
-                 if (filename != null) {
-                     try {
-                         File file = new File(filename);
-                         StringBuilder fileContents = new StringBuilder();
-                         Scanner scanner = new Scanner(file);
-                         String EOL = System.getProperty("line.separator");
-
-                         try {
-                             while (scanner.hasNextLine()) {
-                                 fileContents.append(scanner.nextLine() + EOL);
-                             }
-                             new DemoTextWindow(this, filename,
-                                 fileContents.toString());
-                         } finally {
-                             scanner.close();
-                         }
-                     } catch (IOException e) {
-                         e.printStackTrace();
-                     }
-                 }
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-            return true;
-        }
-        return super.onMenu(menu);
-    }
-
-    /**
-     * Public constructor.
-     *
-     * @param backendType one of the TApplication.BackendType values
-     * @throws Exception if TApplication can't instantiate the Backend.
-     */
-    public DesktopDemoApplication(final BackendType backendType) throws Exception {
-        super(backendType);
-        addAllWidgets();
-        getBackend().setTitle("Jexer Demo Application");
-    }
 }
index be4cf5dd12646bd107d7841a3dc49edd15996cd9..505af3e5cf31f56a3cd5e2c1d43b0ee8b3df315d 100644 (file)
@@ -128,8 +128,8 @@ public final class TMenu extends TWindow {
      * @param x column relative to parent
      * @param y row relative to parent
      * @param label mnemonic menu title.  Label must contain a keyboard
-     * shortcut (mnemonic), denoted by prefixing a letter with "&",
-     * e.g. "&File"
+     * shortcut (mnemonic), denoted by prefixing a letter with "&amp;",
+     * e.g. "&amp;File"
      */
     public TMenu(final TApplication parent, final int x, final int y,
         final String label) {
@@ -620,7 +620,7 @@ public final class TMenu extends TWindow {
      * Convenience function to add a sub-menu.
      *
      * @param title menu title.  Title must contain a keyboard shortcut,
-     * denoted by prefixing a letter with "&", e.g. "&File"
+     * denoted by prefixing a letter with "&amp;", e.g. "&amp;File"
      * @return the new sub-menu
      */
     public TSubMenu addSubMenu(final String title) {
index 88094daa155b0ba46e9f758084510a352c8c0415..488ccd48b5a96f32906d62668b3f953113d0f905 100644 (file)
@@ -58,7 +58,7 @@ public final class TSubMenu extends TMenuItem {
      *
      * @param parent parent widget
      * @param title menu title.  Title must contain a keyboard shortcut,
-     * denoted by prefixing a letter with "&", e.g. "&File"
+     * denoted by prefixing a letter with "&amp;", e.g. "&amp;File"
      * @param x column relative to parent
      * @param y row relative to parent
      */
@@ -246,7 +246,7 @@ public final class TSubMenu extends TMenuItem {
      * Convenience function to add a sub-menu.
      *
      * @param title menu title.  Title must contain a keyboard shortcut,
-     * denoted by prefixing a letter with "&", e.g. "&File"
+     * denoted by prefixing a letter with "&amp;", e.g. "&amp;File"
      * @return the new sub-menu
      */
     public TSubMenu addSubMenu(final String title) {
index e43328f89c13e535fb0bea554dbe7f73a0ae4a03..46c48fa995447bb0caa2269fdc6cc21bc5c11ecf 100644 (file)
@@ -41,7 +41,6 @@
  * still being worked on.  Generally the goal will be to build applications
  * somewhat as follows:
  *
- * <p>
  * <pre>
  * {@code
  * import jexer.*;