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 |
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 |
|
|
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 |
/** |
/** |
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 |
} |
} |