/[classpath]/classpath/javax/swing/JLabel.java
ViewVC logotype

Diff of /classpath/javax/swing/JLabel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by mark, Sat Sep 4 20:31:20 2004 UTC revision 1.15 by mark, Thu Sep 23 15:03:21 2004 UTC
# Line 368  public class JLabel extends JComponent i Line 368  public class JLabel extends JComponent i
368    public void setDisplayedMnemonic(int mnemonic)    public void setDisplayedMnemonic(int mnemonic)
369    {    {
370      if (displayedMnemonic != mnemonic)      if (displayedMnemonic != mnemonic)
371    {        {
372          firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY,          firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY,
373                             displayedMnemonic, mnemonic);                             displayedMnemonic, mnemonic);
374          displayedMnemonic = mnemonic;          displayedMnemonic = mnemonic;
# Line 386  public class JLabel extends JComponent i Line 386  public class JLabel extends JComponent i
386     * @param mnemonic The character to use for the mnemonic.     * @param mnemonic The character to use for the mnemonic.
387     */     */
388    public void setDisplayedMnemonic(char mnemonic)    public void setDisplayedMnemonic(char mnemonic)
389        {    {
390      setDisplayedMnemonic((int) mnemonic);      setDisplayedMnemonic((int) mnemonic);
391    }    }
392    
# Line 416  public class JLabel extends JComponent i Line 416  public class JLabel extends JComponent i
416    {    {
417      if (newIndex < -1 || (text != null && newIndex >= text.length()))      if (newIndex < -1 || (text != null && newIndex >= text.length()))
418        throw new IllegalArgumentException();        throw new IllegalArgumentException();
419          
420      if (text == null || text.charAt(newIndex) != displayedMnemonic)      if (text == null || text.charAt(newIndex) != displayedMnemonic)
421        newIndex = -1;        newIndex = -1;
422          
423      if (newIndex != displayedMnemonicIndex)      if (newIndex != displayedMnemonicIndex)
424      {        {
425        firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY,          firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY,
426                             displayedMnemonicIndex, newIndex);                             displayedMnemonicIndex, newIndex);
427          displayedMnemonicIndex = newIndex;          displayedMnemonicIndex = newIndex;
428      }        }
429    }    }
430    
431    /**    /**

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26