classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: AbstractColorChooserPanel


From: David Gilbert
Subject: [cp-patches] FYI: AbstractColorChooserPanel
Date: Wed, 26 Oct 2005 11:17:36 +0100
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050728)

I saw in the JAPI report for 1.4 that these two easy-to-implement methods were missing from GNU Classpath, so I committed this patch:

2005-10-26  David Gilbert  <address@hidden>

        * javax/swing/colorchooser/AbstractColorChooserPanel.java
        (getMnemonic): implemented,
        (getDisplayedMnemonicIndex): implemented.

Regards,

Dave
Index: javax/swing/colorchooser/AbstractColorChooserPanel.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/swing/colorchooser/AbstractColorChooserPanel.java,v
retrieving revision 1.7
diff -u -r1.7 AbstractColorChooserPanel.java
--- javax/swing/colorchooser/AbstractColorChooserPanel.java     18 Oct 2005 
20:29:11 -0000      1.7
+++ javax/swing/colorchooser/AbstractColorChooserPanel.java     26 Oct 2005 
10:06:48 -0000
@@ -1,5 +1,5 @@
 /* AbstractColorChooserPanel.java --
-   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -74,6 +74,36 @@
    */
   public abstract String getDisplayName();
 
+  /**
+   * Returns the key code for the mnemonic for this panel.  This method returns
+   * zero to indicate no mnemonic, subclasses can override this.
+   * 
+   * @return <code>0</code>, to indicate no mnemonic key code.
+   * 
+   * @see #getDisplayedMnemonicIndex()
+   * @since 1.4
+   */
+  public int getMnemonic()
+  {
+    return 0;
+  }
+  
+  /**
+   * Returns the index of the character in the display name that is the 
+   * mnemonic.  This method returns <code>-1</code> to indicate no mnemonic,
+   * subclasses can override.
+   * 
+   * @return <code>-1</code>, to indicate no mnemonic.
+   * 
+   * @see #getDisplayName()
+   * @see #getMnemonic()
+   * @since 1.4
+   */
+  public int getDisplayedMnemonicIndex()
+  {
+    return -1;
+  }
+  
   /**
    * This method updates the chooser panel when the JColorChooser's color has
    * changed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]