| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Font f1 = Font.decode(fontName);
String fontName = f1.getFontName();
if (fontName.equals(f1.deriveFont(Font.BOLD).getFontName())) {
boldCheckBox.setSelected(false);
boldCheckBox.setEnabled(false);
} else {
boldCheckBox.setEnabled(true);
}Steve
Our app has this same kind of functionality. We have a method called getFontsForFamily() - we simply iterate over this list to see if any of font (names) for a given family contain "Bold", which has worked well.
For italic, we check for both "Italic" and "Oblique".
jeff
_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.