< prev index next >

src/java.desktop/share/classes/java/awt/MenuShortcut.java

Print this page

        

@@ -25,31 +25,31 @@
 package java.awt;
 
 import java.awt.event.KeyEvent;
 
 /**
- * The <code>MenuShortcut</code>class represents a keyboard accelerator
+ * The {@code MenuShortcut} class represents a keyboard accelerator
  * for a MenuItem.
  * <p>
  * Menu shortcuts are created using virtual keycodes, not characters.
  * For example, a menu shortcut for Ctrl-a (assuming that Control is
  * the accelerator key) would be created with code like the following:
  * <p>
- * <code>MenuShortcut ms = new MenuShortcut(KeyEvent.VK_A, false);</code>
+ * {@code MenuShortcut ms = new MenuShortcut(KeyEvent.VK_A, false);}
  * <p> or alternatively
  * <p>
- * <code>MenuShortcut ms = new MenuShortcut(KeyEvent.getExtendedKeyCodeForChar('A'), false);</code>
+ * {@code MenuShortcut ms = new MenuShortcut(KeyEvent.getExtendedKeyCodeForChar('A'), false);}
  * <p>
  * Menu shortcuts may also be constructed for a wider set of keycodes
- * using the <code>java.awt.event.KeyEvent.getExtendedKeyCodeForChar</code> call.
+ * using the {@code java.awt.event.KeyEvent.getExtendedKeyCodeForChar} call.
  * For example, a menu shortcut for "Ctrl+cyrillic ef" is created by
  * <p>
  * <code>MenuShortcut ms = new MenuShortcut(KeyEvent.getExtendedKeyCodeForChar('\u0444'), false);</code>
  * <p>
- * Note that shortcuts created with a keycode or an extended keycode defined as a constant in <code>KeyEvent</code>
+ * Note that shortcuts created with a keycode or an extended keycode defined as a constant in {@code KeyEvent}
  * work regardless of the current keyboard layout. However, a shortcut made of
- * an extended keycode not listed in <code>KeyEvent</code>
+ * an extended keycode not listed in {@code KeyEvent}
  * only work if the current keyboard layout produces a corresponding letter.
  * <p>
  * The accelerator key is platform-dependent and may be obtained
  * via {@link Toolkit#getMenuShortcutKeyMask}.
  *

@@ -126,12 +126,12 @@
         return key;
     }
 
     /**
      * Returns whether this MenuShortcut must be invoked using the SHIFT key.
-     * @return <code>true</code> if this MenuShortcut must be invoked using the
-     * SHIFT key, <code>false</code> otherwise.
+     * @return {@code true} if this MenuShortcut must be invoked using the
+     * SHIFT key, {@code false} otherwise.
      * @since 1.1
      */
     public boolean usesShiftModifier() {
         return usesShift;
     }

@@ -139,12 +139,12 @@
     /**
      * Returns whether this MenuShortcut is the same as another:
      * equality is defined to mean that both MenuShortcuts use the same key
      * and both either use or don't use the SHIFT key.
      * @param s the MenuShortcut to compare with this.
-     * @return <code>true</code> if this MenuShortcut is the same as another,
-     * <code>false</code> otherwise.
+     * @return {@code true} if this MenuShortcut is the same as another,
+     * {@code false} otherwise.
      * @since 1.1
      */
     public boolean equals(MenuShortcut s) {
         return (s != null && (s.getKey() == key) &&
                 (s.usesShiftModifier() == usesShift));

@@ -153,12 +153,12 @@
     /**
      * Returns whether this MenuShortcut is the same as another:
      * equality is defined to mean that both MenuShortcuts use the same key
      * and both either use or don't use the SHIFT key.
      * @param obj the Object to compare with this.
-     * @return <code>true</code> if this MenuShortcut is the same as another,
-     * <code>false</code> otherwise.
+     * @return {@code true} if this MenuShortcut is the same as another,
+     * {@code false} otherwise.
      * @since 1.2
      */
     public boolean equals(Object obj) {
         if (obj instanceof MenuShortcut) {
             return equals( (MenuShortcut) obj );
< prev index next >