/** * Lazily checks and answers whether the Aqua look&feel is active. * * @return {@code true} if the current look&feel is Aqua * * @deprecated Replaced by {@link FormUtils#isLafAqua()}. */ public static boolean isLafAqua() { return FormUtils.isLafAqua(); }
/** * Looks up and returns the font used for title labels. * Since Mac Aqua uses an inappropriate titled border font, * we use a bold label font instead. Actually if the title * is used in a titled separator, the bold weight is questionable. * It seems that most native Aqua tools use a plain label in * titled separators. * * @return the font used for title labels */ private static Font getTitleFont() { return FormUtils.isLafAqua() ? UIManager.getFont("Label.font").deriveFont(Font.BOLD) : UIManager.getFont("TitledBorder.font"); }
/** * Looks up and returns the font used for title labels. * Since Mac Aqua uses an inappropriate titled border font, * we use a bold label font instead. Actually if the title * is used in a titled separator, the bold weight is questionable. * It seems that most native Aqua tools use a plain label in * titled separators. * * @return the font used for title labels */ private Font getTitleFont() { return FormUtils.isLafAqua() ? UIManager.getFont("Label.font").deriveFont(Font.BOLD) : UIManager.getFont("TitledBorder.font"); }
+ " must be one of: LEFT, CENTER, RIGHT."); JPanel panel = new JPanel(new TitledSeparatorLayout(!FormUtils.isLafAqua())); panel.setOpaque(false); panel.add(label);
|| horizontalAlignment == SwingConstants.RIGHT, "The label's horizontal alignment must be one of: LEFT, CENTER, RIGHT."); JPanel panel = new JPanel(new TitledSeparatorLayout(!FormUtils.isLafAqua())); panel.setOpaque(false); panel.add(label);