@Override protected void installDefaults(AbstractButton b) { super.installDefaults(b); String pp = getPropertyPrefix(); // b.setOpaque(QuaquaManager.getBoolean(pp+"opaque")); QuaquaUtilities.installProperty(b, "opaque", UIManager.get(pp + "opaque")); b.setRequestFocusEnabled(UIManager.getBoolean(pp + "requestFocusEnabled")); b.setFocusable(UIManager.getBoolean(pp + "focusable")); }
@Override public void paint(Graphics g, JComponent c) { String style = (String) c.getClientProperty("Quaqua.Button.style"); if (style != null && style.equals("help")) { Insets insets = c.getInsets(); UIManager.getIcon("Button.helpIcon").paintIcon(c, g, insets.left, insets.top); return; } Object oldHints = QuaquaUtilities.beginGraphics((Graphics2D) g); if (((AbstractButton) c).isBorderPainted()) { Border b = c.getBorder(); if (b != null && b instanceof BackgroundBorder) { ((BackgroundBorder) b) .getBackgroundBorder() .paintBorder(c, g, 0, 0, c.getWidth(), c.getHeight()); } } super.paint(g, c); QuaquaUtilities.endGraphics((Graphics2D) g, oldHints); Debug.paint(g, c, this); }