Use Aqua settings for some properties if we're on a Mac.

@param d the UI defaults map.
322871
private void defineAquaSettings(UIDefaults d) {
        try {

            // Instantiate Aqua but don't install it.
            Class<?>    lnfClass     = Class.forName(UIManager.getSystemLookAndFeelClassName(), true,
                                                     Thread.currentThread().getContextClassLoader());
            LookAndFeel aqua         = (LookAndFeel) lnfClass.newInstance();
            UIDefaults  aquaDefaults = aqua.getDefaults();

            // Use Aqua for any menu UI classes.
            d.put("MenuBarUI", aquaDefaults.get("MenuBarUI"));
            d.put("MenuUI", aquaDefaults.get("MenuUI"));
        } catch (Exception e) {

            // TODO Should we do something with this exception?
            e.printStackTrace();
        }
    }
78621
private void definePanels(UIDefaults d) {
        String p = "Panel";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".background", new ColorUIResource((Color) d.get("control")));
        d.put(p + ".opaque", Boolean.TRUE);
    }
200079
function Map (properties) {
		ok.Data.apply(this, arguments);
		var defaults = this.getDefaults();
		if (!this.properties) {
			this.properties = {};
		}
		if (defaults) {
			this.initProperties(defaults);
		}
		if (properties) {
			this.setMap(properties);
		}
	}
952109
@SuppressWarnings("unchecked")
    public void setSettings(Object presets) {

        if (presets == null) {
            m_settingPresets = null;
        } else if (!(presets instanceof Map)) {
            throw new IllegalArgumentException(
                "cms:container -- value of 'settings' attribute  should be a map, but is "
                    + ClassUtils.getCanonicalName(presets));
        } else {
            m_settingPresets = new HashMap<>((Map<String, String>)presets);
        }
    }
828761
public static void setViewBackground(View v, Drawable d) {
        if (Build.VERSION.SDK_INT >= 16) {
            v.setBackground(d);
        } else {
            v.setBackgroundDrawable(d);
        }
    }
1093338
public void setStartGalleriesSetting(Map<String, String> settings) {

        m_startGalleriesSettings = new TreeMap<String, String>(settings);
    }
1181218
public void setDay(int d) {
		if (d < 1) {
			d = 1;
		}
		Calendar tmpCalendar = (Calendar) calendar.clone();
		tmpCalendar.set(Calendar.DAY_OF_MONTH, 1);
		tmpCalendar.add(Calendar.MONTH, 1);
		tmpCalendar.add(Calendar.DATE, -1);

		int maxDaysInMonth = tmpCalendar.get(Calendar.DATE);

		if (d > maxDaysInMonth) {
			d = maxDaysInMonth;
		}

		int oldDay = day;
		day = d;

		if (selectedDay != null) {
			selectedDay.setBackground(oldDayBackgroundColor);
			selectedDay.repaint();
		}

		for (int i = 7; i < 49; i++) {
			if (days[i].getText().equals(Integer.toString(day))) {
				selectedDay = days[i];
				selectedDay.setBackground(selectedColor);
				break;
			}
		}

		if (alwaysFireDayProperty) {
			firePropertyChange("day", 0, day);
		} else {
			firePropertyChange("day", oldDay, day);
		}
	}
553035
private void defineScrollPane(UIDefaults d) {
        // Define ScrollPane border painters.
        String c = PAINTER_PREFIX + "ScrollPanePainter";
        String p = "ScrollPane";
        d.put(p + ".opaque", Boolean.FALSE);
        d.put(p + ".contentMargins", new InsetsUIResource(3, 3, 3, 3));
        // d.put(p + ".useChildTextComponentFocus", Boolean.TRUE);
        d.put(p + ".backgroundPainter", new LazyPainter(c, ScrollPanePainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Enabled+Focused].borderPainter", new LazyPainter(c, ScrollPanePainter.Which.BORDER_ENABLED_FOCUSED));
        d.put(p + "[Enabled].borderPainter", new LazyPainter(c, ScrollPanePainter.Which.BORDER_ENABLED));

        // Store ScrollPane Corner Component
        d.put(p + ".cornerPainter", new LazyPainter(c, ScrollPanePainter.Which.CORNER_ENABLED));
        
        //Initialize Viewport
        p = "Viewport";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".opaque", Boolean.TRUE);
    }
1150400
private void defineDefaultBorders(UIDefaults d) {
        try {
            if (Boolean.FALSE.toString().equalsIgnoreCase(System.getProperty("SeaGlass.BorderFactory.overrideDefaults"))) {
                return; 
            }
            
            // Etched Borders
            Field highLightColor = EtchedBorder.class.getDeclaredField("highlight");
            highLightColor.setAccessible(true);
            Field shadowcolor = EtchedBorder.class.getDeclaredField("shadow");
            shadowcolor.setAccessible(true);

            Border etchedBorder = BorderFactory.createEtchedBorder();
            highLightColor.set(etchedBorder, new Color(0xd5e8f7));
            shadowcolor.set(etchedBorder, new Color(0x709ad0));

            Border raisedEtchedBorder = BorderFactory.createEtchedBorder(EtchedBorder.RAISED);
            highLightColor.set(raisedEtchedBorder, new Color(0xd5e8f7));
            shadowcolor.set(raisedEtchedBorder, new Color(0x709ad0));
            
            // Bevel Borders
            Field highlightOuter = BevelBorder.class.getDeclaredField("highlightOuter");
            highlightOuter.setAccessible(true);
            Field highlightInner = BevelBorder.class.getDeclaredField("highlightInner");
            highlightInner.setAccessible(true);
            Field shadowOuter = BevelBorder.class.getDeclaredField("shadowOuter");
            shadowOuter.setAccessible(true);
            Field shadowInner = BevelBorder.class.getDeclaredField("shadowInner");
            shadowInner.setAccessible(true);

            Border loweredBevelBorder = BorderFactory.createLoweredBevelBorder();
            highlightOuter.set(loweredBevelBorder, new Color(0xd5e8f7));
            highlightInner.set(loweredBevelBorder, Color.WHITE);
            shadowOuter.set(loweredBevelBorder, new Color(0x5f83a0));
            shadowInner.set(loweredBevelBorder, new Color(0xd5e8f7));

            Border raisedBevelBorder = BorderFactory.createRaisedBevelBorder();
            highlightOuter.set(raisedBevelBorder, new Color(0x95c5eb));
            highlightInner.set(raisedBevelBorder, Color.WHITE);
            shadowOuter.set(raisedBevelBorder, new Color(0x5f83a0));
            shadowInner.set(raisedBevelBorder, new Color(0xd5e8f7));
            
        } catch (SecurityException e) {
            e.printStackTrace();
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        
    }
1172710
function setDpi() {
    const dpiO = {};
    const e = document.body.appendChild( document.createElement( 'DIV' ) );
    e.style.width = '1in';
    e.style.padding = '0';
    dpiO.v = e.offsetWidth;
    e.parentNode.removeChild( e );
    dpi = dpiO.v;
}
1259207
public void setDisplayerSetting( DisplayerAttributeDef displayerAttributeDef, String value ) {
        settings.put(getSettingPath(displayerAttributeDef), value);
    }
293017
public void setNonStrokingColor (final double g) throws IOException
  {
    if (_isOutsideOneInterval (g))
    {
      throw new IllegalArgumentException ("Parameter must be within 0..1, but is " + g);
    }
    writeOperand ((float) g);
    writeOperator ((byte) 'g');
  }
156522
public void setAccentColor(@ColorInt int color) {
        mAccentColor = Color.argb(255, Color.red(color), Color.green(color), Color.blue(color));
    }
624080
public void setIntProperty( String key , int value )
    {
        settings.setProperty(key, String.valueOf(value));
    }
139224
public static void setHiddenOn(final UIObject uiObject,
                                   final DeviceSize deviceSize) {
        // Split the enum up by _ to get the different devices
        // Separates the SM_MD into [SM, MD] so we can add the right styles
        final String[] deviceString = deviceSize.name().split("_");

        for (final String device : deviceString) {
            // Case back to basic enum (PRINT, XS, SM, MD, LG)
            final DeviceSize size = DeviceSize.valueOf(device);
            switch (size) {
                case PRINT:
                    addEnumStyleName(uiObject, Responsiveness.HIDDEN_PRINT);
                    break;
                case XS:
                    addEnumStyleName(uiObject, Responsiveness.HIDDEN_XS);
                    break;
                case SM:
                    addEnumStyleName(uiObject, Responsiveness.HIDDEN_SM);
                    break;
                case MD:
                    addEnumStyleName(uiObject, Responsiveness.HIDDEN_MD);
                    break;
                case LG:
                    addEnumStyleName(uiObject, Responsiveness.HIDDEN_LG);
                    break;
                default:
                    break;
            }
        }
    }
1129848
public void setProperties(Properties properties) throws ConfigurationException {
//		initialRequest = application.getCurrentRequest();
		autoReload = Boolean.valueOf(properties.getProperty("autoreload", "true"));

		defaultMappingName = properties.getProperty("defaultmapping", defaultMappingName);

/*		strict = section.getValue("strict", new GenericValue(strict), "abort mapping loading on errors").toBoolean().booleanValue();
        Environment.System.out.println("checking mapping strictly: " + strict);*/

		mappingFilesMap = PropertiesSupport.getSubsection(properties, "mapping");
	}
1189770
private void defineInternalFrames(UIDefaults d) {
        
        // Copied from nimbus
        
        //Initialize InternalFrameTitlePane
        d.put("InternalFrameTitlePane.contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put("InternalFrameTitlePane.maxFrameIconSize", new DimensionUIResource(18, 18));

        //Initialize InternalFrame
        d.put("InternalFrame.contentMargins", new InsetsUIResource(1, 6, 6, 6));
        d.put("InternalFrame:InternalFrameTitlePane.contentMargins", new InsetsUIResource(3, 0, 3, 0));
        d.put("InternalFrame:InternalFrameTitlePane.titleAlignment", "CENTER");
        d.put("InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.menuButton\".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put("InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.iconifyButton\".contentMargins", new InsetsUIResource(9, 9, 9, 9));
        d.put("InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.maximizeButton\".contentMargins", new InsetsUIResource(9, 9, 9, 9));
        d.put("InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.closeButton\".contentMargins", new InsetsUIResource(9, 9, 9, 9));
        
        // Seaglass starts below
        
        if (PlatformUtils.isMac()) {
            d.put("frameBaseActive", new Color(0xa8a8a8));
        } else {
            d.put("frameBaseActive", new Color(0x96adc4));
        }

        d.put("frameBaseInactive", new Color(0xe0e0e0));

        d.put("frameBorderBase", new Color(0x545454));

        d.put("frameInnerHighlightInactive", new Color(0x55ffffff, true));
        d.put("frameInnerHighlightActive", new Color(0x55ffffff, true));

        d.put("seaGlassTitlePaneButtonEnabledBorder", new Color(0x99000000, true));
        d.put("seaGlassTitlePaneButtonEnabledCorner", new Color(0x26000000, true));
        d.put("seaGlassTitlePaneButtonEnabledInterior", new Color(0x99ffffff, true));

        d.put("seaGlassTitlePaneButtonHoverBorder", new Color(0xe5101010, true));
        d.put("seaGlassTitlePaneButtonHoverCorner", new Color(0x267a7a7a, true));
        d.put("seaGlassTitlePaneButtonHoverInterior", new Color(0xffffff));

        d.put("seaGlassTitlePaneButtonPressedBorder", new Color(0xe50e0e0e, true));
        d.put("seaGlassTitlePaneButtonPressedCorner", new Color(0x876e6e6e, true));
        d.put("seaGlassTitlePaneButtonPressedInterior", new Color(0xe6e6e6));

        String p = "InternalFrame";
        String c = PAINTER_PREFIX + "FrameAndRootPainter";
        
        d.put(p + ".titleFont", new DerivedFont("defaultFont", 1.0f, true, null));

        d.put(p + ".States", "Enabled,WindowFocused");
        d.put(p + ":InternalFrameTitlePane.WindowFocused", new TitlePaneWindowFocusedState());
        d.put(p + ".WindowFocused", new InternalFrameWindowFocusedState());

        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, FrameAndRootPainter.Which.BACKGROUND_ENABLED));
        d.put(p + "[Enabled+WindowFocused].backgroundPainter",
              new LazyPainter(c,
                              FrameAndRootPainter.Which.BACKGROUND_ENABLED_WINDOWFOCUSED));

        p = "InternalFrameTitlePane";
        d.put(p + ".buttonSpacing", 0);

        p = "InternalFrame:InternalFrameTitlePane";
        d.put(p + "[Enabled].textForeground", d.get("seaGlassDisabledText"));
        d.put(p + "[WindowFocused].textForeground", Color.BLACK);
    }