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

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

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

revision 1.16 by mark, Thu Jul 22 19:45:38 2004 UTC revision 1.17 by mark, Fri Jul 30 20:21:19 2004 UTC
# Line 731  public abstract class AbstractButton ext Line 731  public abstract class AbstractButton ext
731    
732      if (old != mne)      if (old != mne)
733        {        {
734      getModel().setMnemonic(mne);          getModel().setMnemonic(mne);
735    
736          if (text != null && ! text.equals(""))          if (text != null && ! text.equals(""))
737        {            {
738              // Since lower case char = upper case char for              // Since lower case char = upper case char for
739              // mnemonic, we will convert both text and mnemonic              // mnemonic, we will convert both text and mnemonic
740              // to upper case before checking if mnemonic character occurs              // to upper case before checking if mnemonic character occurs
# Line 744  public abstract class AbstractButton ext Line 744  public abstract class AbstractButton ext
744              setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne));              setDisplayedMnemonicIndex(upperCaseText.indexOf(upperCaseMne));
745            }            }
746    
747          firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne);          firePropertyChange(MNEMONIC_CHANGED_PROPERTY, old, mne);
748          revalidate();          revalidate();
749          repaint();          repaint();
750        }        }
751    }    }
752    
# Line 1153  public abstract class AbstractButton ext Line 1153  public abstract class AbstractButton ext
1153      if (t != old)      if (t != old)
1154        {        {
1155          firePropertyChange(TEXT_CHANGED_PROPERTY, old, t);          firePropertyChange(TEXT_CHANGED_PROPERTY, old, t);
1156      revalidate();          revalidate();
1157      repaint();          repaint();
1158    }        }
1159    }    }
1160    
1161    /**    /**
# Line 1441  public abstract class AbstractButton ext Line 1441  public abstract class AbstractButton ext
1441    
1442          // Set actionCommand to button's text by default if it is not specified          // Set actionCommand to button's text by default if it is not specified
1443          if (actionCommand != null)          if (actionCommand != null)
1444          setActionCommand((String)(a.getValue(Action.ACTION_COMMAND_KEY)));             setActionCommand((String)(a.getValue(Action.ACTION_COMMAND_KEY)));
1445           else           else
1446             setActionCommand(getText());             setActionCommand(getText());
1447        }        }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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