void updateStyle(AbstractButton b) { SynthContext context = getContext(b, SynthConstants.ENABLED); SynthStyle oldStyle = style; style = SynthLookAndFeel.updateStyle(context, this); if (style != oldStyle) { if (b.getMargin() == null || (b.getMargin() instanceof UIResource)) { Insets margin = (Insets) style.get(context, getPropertyPrefix() + "margin"); if (margin == null) { // Some places assume margins are non-null. margin = SynthLookAndFeel.EMPTY_UIRESOURCE_INSETS; } b.setMargin(margin); } Object value = style.get(context, getPropertyPrefix() + "iconTextGap"); if (value != null) { LookAndFeel.installProperty(b, "iconTextGap", value); } value = style.get(context, getPropertyPrefix() + "contentAreaFilled"); LookAndFeel.installProperty(b, "contentAreaFilled", value != null ? value : Boolean.TRUE); if (oldStyle != null) { uninstallKeyboardActions(b); installKeyboardActions(b); } } }
protected void installDefaults(JFileChooser fc) { installIcons(fc); installStrings(fc); usesSingleFilePane = UIManager.getBoolean("FileChooser.usesSingleFilePane"); readOnly = UIManager.getBoolean("FileChooser.readOnly"); TransferHandler th = fc.getTransferHandler(); if (th == null || th instanceof UIResource) { fc.setTransferHandler(defaultTransferHandler); } LookAndFeel.installProperty(fc, "opaque", Boolean.FALSE); }
protected void installDefaults() { if (desktop.getBackground() == null || desktop.getBackground() instanceof UIResource) { desktop.setBackground(UIManager.getColor("Desktop.background")); } LookAndFeel.installProperty(desktop, "opaque", Boolean.TRUE); }
/** {@inheritDoc} */ @Override protected void installDefaults(AbstractButton b) { updateStyle(b); LookAndFeel.installProperty(b, "rolloverEnabled", Boolean.TRUE); }