Java 类javax.swing.plaf.InsetsUIResource 实例源码

项目:orbit-image-analysis    文件:AWTConverters.java   
public void register(ConverterRegistry registry) {
  registry.addConverter(Dimension.class, String.class, this);
  registry.addConverter(String.class, Dimension.class, this);
  registry.addConverter(DimensionUIResource.class, String.class, this);

  registry.addConverter(Insets.class, String.class, this);
  registry.addConverter(String.class, Insets.class, this);
  registry.addConverter(InsetsUIResource.class, String.class, this);

  registry.addConverter(Point.class, String.class, this);
  registry.addConverter(String.class, Point.class, this);

  registry.addConverter(Rectangle.class, String.class, this);
  registry.addConverter(String.class, Rectangle.class, this);

  registry.addConverter(Font.class, String.class, this);
  registry.addConverter(FontUIResource.class, String.class, this);
}
项目:MercuryTrade    文件:AdrManagerFrame.java   
public AdrManagerFrame(AdrProfileDescriptor selectedProfile) {
    super();
    this.processingHideEvent = false;
    this.setTitle("MercuryTrade ADR");
    this.setFocusable(true);
    this.setFocusableWindowState(true);
    this.setAlwaysOnTop(false);
    this.selectedProfile = selectedProfile;
    this.exportDialog = new AdrExportDialog(this, new ArrayList<>());
    this.iconSelectDialog = new AdrIconSelectDialog();
    this.iconSelectDialog.setLocationRelativeTo(null);
    FrameDescriptor frameDescriptor = this.framesConfig.get(this.getClass().getSimpleName());
    this.setPreferredSize(frameDescriptor.getFrameSize());
    UIManager.put("MenuItem.background", AppThemeColor.ADR_BG);
    UIManager.put("MenuItem.selectionBackground", AppThemeColor.ADR_POPUP_BG);
    UIManager.put("Menu.contentMargins", new InsetsUIResource(2, 0, 2, 0));
    UIManager.put("MenuItem.opaque", true);
    UIManager.put("ComboBox.selectionBackground", AppThemeColor.HEADER);
    UIManager.put("ComboBox.selectionForeground", AppThemeColor.ADR_POPUP_BG);
    UIManager.put("ComboBox.disabledForeground", AppThemeColor.ADR_FOOTER_BG);
}
项目:beautyeye    文件:BeautyEyeLookAndFeelWin.java   
/**
     * 因Windos LNF会在Vista及更新的操作系统(如win7)上对Windows LNF作附加设置,
     * 以保证与Vista及更新平台的外观的一致性(如让菜单菜项高度更大等),请参见
     * WindowsLookAndFeel.initVistaComponentDefaults(..)。
     * <p>
     * BeautyEye中因需要保证审美一致性(在所有win平台上)而不需要这些额外的设置,
     * 但因该方法是private私有方法,无法进行覆盖屏蔽,所以只能在此单列方法,以便针对Vista
     * 及更新的平台进行补救性重新设置以便与BeautyEye LNF的审核进行适配.
     * 
     * @see WindowsLookAndFeel.initVistaComponentDefaults(..)
     */
    protected void initForVista()
    {
        if(WinUtils.isOnVista())
        {
            UIManager.put("CheckBoxMenuItem.margin",new InsetsUIResource(0,0,0,0));
            UIManager.put("RadioButtonMenuItem.margin",new InsetsUIResource(0,0,0,0));
            UIManager.put("Menu.margin",new InsetsUIResource(0,0,0,0));//windows lnf xp中默认是2,2,2,2
            UIManager.put("MenuItem.margin",new InsetsUIResource(0,0,0,0));//windows lnf中  xp默认是2,2,2,2

            UIManager.put("Menu.border",new BorderUIResource(BorderFactory.createEmptyBorder(1,3,2,3)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
            UIManager.put("MenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(1,0,2,0)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
            UIManager.put("CheckBoxMenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(4,2,4,2)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
            UIManager.put("RadioButtonMenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(4,0,4,0)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;      
//          UIManager.put("PopupMenu.border",new BorderUIResource(BorderFactory.createEmptyBorder(20,10,20,10)));// 

            UIManager.put("CheckBoxMenuItem.checkIcon"
                    ,new org.jb2011.lnf.beautyeye.ch9_menu.BECheckBoxMenuItemUI.CheckBoxMenuItemIcon().setUsedForVista(true));//javax.swing.plaf.basic.BasicIconFactory.CheckBoxMenuItemIcon);
            UIManager.put("RadioButtonMenuItem.checkIcon"
                    ,new org.jb2011.lnf.beautyeye.ch9_menu.BERadioButtonMenuItemUI.RadioButtonMenuItemIcon().setUsedForVista(true));
        }
    }
项目:beautyeye    文件:__UI__.java   
/**
     * Ui impl.
     */
    public static void uiImpl()
    {
//      UIManager.put("CheckBox.border",new BorderUIResource(new BERoundBorder().setArcWidth(0)));

        UIManager.put("CheckBox.margin",new InsetsUIResource(4,3,4,3));
        UIManager.put("RadioButton.margin",new InsetsUIResource(4,3,4,3));//2, 2, 2, 2));

        UIManager.put("RadioButton.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
        UIManager.put("CheckBox.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));

        UIManager.put("CheckBox.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
        UIManager.put("RadioButton.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));

        UIManager.put("RadioButton.icon", new RadioButtonIcon());
        UIManager.put("CheckBox.icon", new CheckBoxIcon());

        //衬距设定
        UIManager.put("RadioButton.margin", new InsetsUIResource(1,1,1,1));//默认是2,2,2,2
        UIManager.put("CheckBox.margin", new InsetsUIResource(1,1,1,1));//默认是2,2,2,2
    }
项目:calibre2opds    文件:AWTConverters.java   
public void register(ConverterRegistry registry) {
  registry.addConverter(Dimension.class, String.class, this);
  registry.addConverter(String.class, Dimension.class, this);
  registry.addConverter(DimensionUIResource.class, String.class, this);

  registry.addConverter(Insets.class, String.class, this);
  registry.addConverter(String.class, Insets.class, this);
  registry.addConverter(InsetsUIResource.class, String.class, this);

  registry.addConverter(Point.class, String.class, this);
  registry.addConverter(String.class, Point.class, this);

  registry.addConverter(Rectangle.class, String.class, this);
  registry.addConverter(String.class, Rectangle.class, this);

  registry.addConverter(Font.class, String.class, this);
  registry.addConverter(FontUIResource.class, String.class, this);
}
项目:swingx    文件:SearchFieldAddon.java   
@Override
    protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
        super.addBasicDefaults(addon, defaults);
        defaults.add("SearchField.layoutStyle", LayoutStyle.MAC);
        defaults.add("SearchField.icon", getIcon("basic/resources/search.gif"));
        defaults.add("SearchField.rolloverIcon", getIcon("basic/resources/search_rollover.gif"));
        defaults.add("SearchField.pressedIcon", getIcon("basic/resources/search.gif"));
        defaults.add("SearchField.popupIcon", getIcon("basic/resources/search_popup.gif"));
        defaults.add("SearchField.popupRolloverIcon", getIcon("basic/resources/search_popup_rollover.gif"));
        defaults.add("SearchField.clearIcon", getIcon("basic/resources/clear.gif"));
        defaults.add("SearchField.clearRolloverIcon", getIcon("basic/resources/clear_rollover.gif"));
        defaults.add("SearchField.clearPressedIcon", getIcon("basic/resources/clear_pressed.gif"));
        defaults.add("SearchField.buttonMargin", new InsetsUIResource(1, 1, 1, 1));
        defaults.add("SearchField.popupSource", BUTTON_SOURCE);

        //webstart fix
        UIManagerExt.addResourceBundle("org.jdesktop.swingx.plaf.basic.resources.SearchField");
//      UIManager.getDefaults().addResourceBundle("org.jdesktop.swingx.plaf.basic.resources.SearchField");
    }
项目:swingx    文件:SearchFieldAddon.java   
@Override
protected void addMacDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
    super.addMacDefaults(addon, defaults);

    defaults.add("SearchField.icon", getIcon("macosx/resources/search.png"));
    defaults.add("SearchField.rolloverIcon", getIcon("macosx/resources/search.png"));
    defaults.add("SearchField.pressedIcon", getIcon("macosx/resources/search.png"));
    defaults.add("SearchField.popupIcon", getIcon("macosx/resources/search_popup.png"));
    defaults.add("SearchField.popupRolloverIcon", getIcon("macosx/resources/search_popup.png"));
    defaults.add("SearchField.popupPressedIcon", getIcon("macosx/resources/search_popup.png"));
    defaults.add("SearchField.clearIcon", getIcon("macosx/resources/clear.png"));
    defaults.add("SearchField.clearRolloverIcon", getIcon("macosx/resources/clear_rollover.png"));
    defaults.add("SearchField.clearPressedIcon", getIcon("macosx/resources/clear_pressed.png"));
    defaults.add("SearchField.buttonMargin", new InsetsUIResource(0, 0, 0, 0));
    defaults.add("SearchField.popupSource", SEARCH_FIELD_SOURCE);
}
项目:l2fprod-properties-editor    文件:AWTConverters.java   
@Override
public void register(Registry registry) {
    registry.addConverter(Dimension.class, String.class, this);
    registry.addConverter(String.class, Dimension.class, this);
    registry.addConverter(DimensionUIResource.class, String.class, this);

    registry.addConverter(Insets.class, String.class, this);
    registry.addConverter(String.class, Insets.class, this);
    registry.addConverter(InsetsUIResource.class, String.class, this);

    registry.addConverter(Point.class, String.class, this);
    registry.addConverter(String.class, Point.class, this);

    registry.addConverter(Rectangle.class, String.class, this);
    registry.addConverter(String.class, Rectangle.class, this);

    registry.addConverter(Font.class, String.class, this);
    registry.addConverter(FontUIResource.class, String.class, this);
}
项目:metasfresh    文件:SwingEventNotifierUI.java   
public static final Object[] getUIDefaults()
{
    return new Object[] {
            //
            // Notifications settings
            NOTIFICATIONS_MaxDisplayed, NOTIFICATIONS_MaxDisplayed_Default
            , NOTIFICATIONS_AutoFadeAwayTimeMillis, NOTIFICATIONS_AutoFadeAwayTimeMillis_Default
            , NOTIFICATIONS_BottomGap, NOTIFICATIONS_BottomGap_Default

            //
            // Item settings
            , ITEM_BackgroundColor, AdempierePLAF.createActiveValueProxy(AdempiereLookAndFeel.MANDATORY_BG_KEY, Color.WHITE) // same as mandatory background color
            , ITEM_Border, new BorderUIResource(BorderFactory.createLineBorder(Color.GRAY, 1))
            , ITEM_SummaryText_Font, new FontUIResource("Serif", Font.BOLD, 12)
            , ITEM_DetailText_Font, new FontUIResource("Serif", Font.PLAIN, 12)
            , ITEM_TextColor, null
            , ITEM_MinimumSize, new DimensionUIResource(230, 45)
            , ITEM_MaximumSize, null
            //
            // Button settings (i.e. the close button)
            , ITEM_Button_Insets, new InsetsUIResource(1, 4, 1, 4)
            , ITEM_Button_Size, 20
            , ITEM_Button_Border, new BorderUIResource(BorderFactory.createEmptyBorder())
    };
}
项目:seaglass    文件:SeaGlassLookAndFeel.java   
private void defineOptionPane(UIDefaults d) {
    //Initialize OptionPane
    d.put("OptionPane.contentMargins", new InsetsUIResource(15, 15, 15, 15));
    d.put("OptionPane.opaque", Boolean.TRUE);
    d.put("OptionPane.background", getDerivedColor("control", 0, 0, 0, 0, true));
    d.put("OptionPane.buttonOrientation", new Integer(4));
    d.put("OptionPane.messageAnchor", new Integer(17));
    d.put("OptionPane.separatorPadding", new Integer(0));
    d.put("OptionPane.sameSizeButtons", Boolean.FALSE);
    d.put("OptionPane:\"OptionPane.separator\".contentMargins", new InsetsUIResource(1, 0, 0, 0));
    d.put("OptionPane:\"OptionPane.messageArea\".contentMargins", new InsetsUIResource(0, 0, 10, 0));
    d.put("OptionPane:\"OptionPane.messageArea\":\"OptionPane.label\".contentMargins", new InsetsUIResource(0, 10, 10, 10));

    d.put("OptionPane[Enabled].errorIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.ERRORICON_ENABLED));
    d.put("OptionPane.errorIcon", new SeaGlassIcon("OptionPane", "errorIconPainter", 48, 48));
    d.put("OptionPane[Enabled].informationIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.INFORMATIONICON_ENABLED));
    d.put("OptionPane.informationIcon", new SeaGlassIcon("OptionPane", "informationIconPainter", 48, 48));
    d.put("OptionPane[Enabled].questionIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.QUESTIONICON_ENABLED));
    d.put("OptionPane.questionIcon", new SeaGlassIcon("OptionPane", "questionIconPainter", 48, 48));
    d.put("OptionPane[Enabled].warningIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.WARNINGICON_ENABLED));
    d.put("OptionPane.warningIcon", new SeaGlassIcon("OptionPane", "warningIconPainter", 48, 48));

    // Color Chooser Dialog
    d.put("ColorChooser.swatchesDefaultRecentColor", getDerivedColor("control", 0, 0, 0, 0, true));
}
项目:seaglass    文件:SeaGlassLookAndFeel.java   
private void defineFileChooser(UIDefaults d) {
    //Initialize FileChooser
    d.put("FileChooser.contentMargins", new InsetsUIResource(10, 10, 10, 10));
    d.put("FileChooser.opaque", Boolean.TRUE);
    d.put("FileChooser.usesSingleFilePane", Boolean.TRUE);
    d.put("FileChooser[Enabled].fileIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.FILEICON_ENABLED));
    d.put("FileChooser.fileIcon", new SeaGlassIcon("FileChooser", "fileIconPainter", 16, 16));
    d.put("FileChooser[Enabled].directoryIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.DIRECTORYICON_ENABLED));
    d.put("FileChooser.directoryIcon", new SeaGlassIcon("FileChooser", "directoryIconPainter", 16, 16));
    d.put("FileChooser[Enabled].upFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.UPFOLDERICON_ENABLED));
    d.put("FileChooser.upFolderIcon", new SeaGlassIcon("FileChooser", "upFolderIconPainter", 16, 16));
    d.put("FileChooser[Enabled].newFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.NEWFOLDERICON_ENABLED));
    d.put("FileChooser.newFolderIcon", new SeaGlassIcon("FileChooser", "newFolderIconPainter", 16, 16));
    d.put("FileChooser[Enabled].hardDriveIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.HARDDRIVEICON_ENABLED));
    d.put("FileChooser.hardDriveIcon", new SeaGlassIcon("FileChooser", "hardDriveIconPainter", 16, 16));
    d.put("FileChooser[Enabled].floppyDriveIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.FLOPPYDRIVEICON_ENABLED));
    d.put("FileChooser.floppyDriveIcon", new SeaGlassIcon("FileChooser", "floppyDriveIconPainter", 16, 16));
    d.put("FileChooser[Enabled].homeFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.HOMEFOLDERICON_ENABLED));
    d.put("FileChooser.homeFolderIcon", new SeaGlassIcon("FileChooser", "homeFolderIconPainter", 16, 16));
    d.put("FileChooser[Enabled].detailsViewIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.DETAILSVIEWICON_ENABLED));
    d.put("FileChooser.detailsViewIcon", new SeaGlassIcon("FileChooser", "detailsViewIconPainter", 16, 16));
    d.put("FileChooser[Enabled].listViewIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.LISTVIEWICON_ENABLED));
    d.put("FileChooser.listViewIcon", new SeaGlassIcon("FileChooser", "listViewIconPainter", 16, 16));
}
项目:seaglass    文件:SeaGlassLookAndFeel.java   
/**
 * Initialize the internal frame close button settings.
 *
 * @param d the UI defaults map.
 */
private void defineInternalFrameCloseButtons(UIDefaults d) {
    String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.closeButton\"";
    String c = PAINTER_PREFIX + "TitlePaneCloseButtonPainter";

    // Set the multiplicity of states for the Close button.
    d.put(p + ".States", "Enabled,MouseOver,Pressed,Disabled,Focused,Selected,WindowNotFocused");
    d.put(p + ".WindowNotFocused", new TitlePaneCloseButtonWindowNotFocusedState());
    d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));

    d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_DISABLED));
    d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_ENABLED));
    d.put(p + "[MouseOver].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_MOUSEOVER));
    d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_PRESSED));
    d.put(p + "[Enabled+WindowNotFocused].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_ENABLED_WINDOWNOTFOCUSED));
    d.put(p + "[MouseOver+WindowNotFocused].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_MOUSEOVER));
    d.put(p + "[Pressed+WindowNotFocused].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_PRESSED_WINDOWNOTFOCUSED));

    d.put(p + ".icon", new SeaGlassIcon(p, "iconPainter", 43, 18));
}
项目:seaglass    文件:SeaGlassLookAndFeel.java   
/**
 * Initialize the internal frame menu button settings.
 *
 * @param d the UI defaults map.
 */
private void defineInternalFrameMenuButtons(UIDefaults d) {
    String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.menuButton\"";
    String c = PAINTER_PREFIX + "TitlePaneMenuButtonPainter";

    d.put(p + ".WindowNotFocused", new TitlePaneMenuButtonWindowNotFocusedState());
    d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));

    // Set the states for the Menu button.
    d.put(p + "[Enabled].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_ENABLED));
    d.put(p + "[Disabled].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_DISABLED));
    d.put(p + "[MouseOver].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_MOUSEOVER));
    d.put(p + "[Pressed].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_PRESSED));
    d.put(p + "[Enabled+WindowNotFocused].iconPainter",
          new LazyPainter(c,
                          TitlePaneMenuButtonPainter.Which.ICON_ENABLED_WINDOWNOTFOCUSED));
    d.put(p + "[MouseOver+WindowNotFocused].iconPainter",
          new LazyPainter(c,
                          TitlePaneMenuButtonPainter.Which.ICON_MOUSEOVER_WINDOWNOTFOCUSED));
    d.put(p + "[Pressed+WindowNotFocused].iconPainter",
          new LazyPainter(c,
                          TitlePaneMenuButtonPainter.Which.ICON_PRESSED_WINDOWNOTFOCUSED));

    d.put(p + ".icon", new SeaGlassIcon(p, "iconPainter", 19, 18));
}
项目:seaglass    文件:SeaGlassLookAndFeel.java   
/**
     * Initialize the popup settings.
     *
     * @param d the UI defaults map.
     */
    private void definePopups(UIDefaults d) {
        d.put("seaGlassPopupBorder", new ColorUIResource(0xbbbbbb));

        d.put("popupMenuInteriorEnabled", Color.WHITE);
        // Rossi: Changed color of popup / submenus to get better contrast to bright backgrounds.
//        d.put("popupMenuBorderEnabled", new Color(0xdddddd));
        d.put("popupMenuBorderEnabled", new Color(0x5b7ea4));

        String c = PAINTER_PREFIX + "PopupMenuPainter";
        String p = "PopupMenu";

        d.put(p + ".contentMargins", new InsetsUIResource(6, 1, 6, 1));
        d.put(p + ".opaque", Boolean.TRUE);
        d.put(p + ".consumeEventOnClose", Boolean.TRUE);
        d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, PopupMenuPainter.Which.BACKGROUND_DISABLED));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, PopupMenuPainter.Which.BACKGROUND_ENABLED));

        // Initialize PopupMenuSeparator
        c = PAINTER_PREFIX + "SeparatorPainter";
        p = "PopupMenuSeparator";
        d.put(p + ".contentMargins", new InsetsUIResource(1, 0, 2, 0));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, SeparatorPainter.Which.BACKGROUND_ENABLED));
    }
项目:seaglass    文件:SeaGlassLookAndFeel.java   
/**
 * Initialize the scroll pane UI
 * @param d
 */
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);
}
项目:CodenameOne    文件:AWTConverters.java   
public void register(ConverterRegistry registry) {
  registry.addConverter(Dimension.class, String.class, this);
  registry.addConverter(String.class, Dimension.class, this);
  registry.addConverter(DimensionUIResource.class, String.class, this);

  registry.addConverter(Insets.class, String.class, this);
  registry.addConverter(String.class, Insets.class, this);
  registry.addConverter(InsetsUIResource.class, String.class, this);

  registry.addConverter(Point.class, String.class, this);
  registry.addConverter(String.class, Point.class, this);

  registry.addConverter(Rectangle.class, String.class, this);
  registry.addConverter(String.class, Rectangle.class, this);

  registry.addConverter(Font.class, String.class, this);
  registry.addConverter(FontUIResource.class, String.class, this);
}
项目:concurrent    文件:BeautyEyeLookAndFeelWin.java   
/**
     * 因Windos LNF会在Vista及更新的操作系统(如win7)上对Windows LNF作附加设置,
     * 以保证与Vista及更新平台的外观的一致性(如让菜单菜项高度更大等),请参见
     * WindowsLookAndFeel.initVistaComponentDefaults(..)。
     * <p>
     * BeautyEye中因需要保证审美一致性(在所有win平台上)而不需要这些额外的设置,
     * 但因该方法是private私有方法,无法进行覆盖屏蔽,所以只能在此单列方法,以便针对Vista
     * 及更新的平台进行补救性重新设置以便与BeautyEye LNF的审核进行适配.
     * 
     * @see WindowsLookAndFeel.initVistaComponentDefaults(..)
     */
    protected void initForVista()
    {
        if(WinUtils.isOnVista())
        {
            UIManager.put("CheckBoxMenuItem.margin",new InsetsUIResource(0,0,0,0));
            UIManager.put("RadioButtonMenuItem.margin",new InsetsUIResource(0,0,0,0));
            UIManager.put("Menu.margin",new InsetsUIResource(0,0,0,0));//windows lnf xp中默认是2,2,2,2
            UIManager.put("MenuItem.margin",new InsetsUIResource(0,0,0,0));//windows lnf中  xp默认是2,2,2,2

            UIManager.put("Menu.border",new BorderUIResource(BorderFactory.createEmptyBorder(1,3,2,3)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
            UIManager.put("MenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(1,0,2,0)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
            UIManager.put("CheckBoxMenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(4,2,4,2)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
            UIManager.put("RadioButtonMenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(4,0,4,0)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;      
//          UIManager.put("PopupMenu.border",new BorderUIResource(BorderFactory.createEmptyBorder(20,10,20,10)));// 

            UIManager.put("CheckBoxMenuItem.checkIcon"
                    ,new org.jb2011.lnf.beautyeye.ch9_menu.BECheckBoxMenuItemUI.CheckBoxMenuItemIcon().setUsedForVista(true));//javax.swing.plaf.basic.BasicIconFactory.CheckBoxMenuItemIcon);
            UIManager.put("RadioButtonMenuItem.checkIcon"
                    ,new org.jb2011.lnf.beautyeye.ch9_menu.BERadioButtonMenuItemUI.RadioButtonMenuItemIcon().setUsedForVista(true));
        }
    }
项目:concurrent    文件:__UI__.java   
/**
     * Ui impl.
     */
    public static void uiImpl()
    {
//      UIManager.put("CheckBox.border",new BorderUIResource(new BERoundBorder().setArcWidth(0)));

        UIManager.put("CheckBox.margin",new InsetsUIResource(4,3,4,3));
        UIManager.put("RadioButton.margin",new InsetsUIResource(4,3,4,3));//2, 2, 2, 2));

        UIManager.put("RadioButton.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
        UIManager.put("CheckBox.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));

        UIManager.put("CheckBox.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
        UIManager.put("RadioButton.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));

        UIManager.put("RadioButton.icon", new RadioButtonIcon());
        UIManager.put("CheckBox.icon", new CheckBoxIcon());

        //衬距设定
        UIManager.put("RadioButton.margin", new InsetsUIResource(1,1,1,1));//默认是2,2,2,2
        UIManager.put("CheckBox.margin", new InsetsUIResource(1,1,1,1));//默认是2,2,2,2
    }
项目:cn1    文件:AbstractButton.java   
public void setMargin(Insets margin) {

        /* default values are obtained from UI (Harmony-4655) */
        if (margin instanceof InsetsUIResource) {
            defaultMargin = (InsetsUIResource) margin;
        } else if (margin == null) {
            /*
             * According to spec if margin == null default value sets
             * (Harmony-4655)
             */
            margin = defaultMargin;
        }
        Insets oldValue = this.margin;
        this.margin = margin;
        firePropertyChange(MARGIN_CHANGED_PROPERTY, oldValue, margin);
    }
项目:cn1    文件:JTextComponent_byAuxiliaryComponentTest.java   
public void testJTextComponent() {
    jtComp = new JTextComp();
    assertNotNull(jtComp);
    assertTrue(jtComp.getUI() instanceof TextCompUI);
    assertTrue(jtComp.getCaret() instanceof BasicTextUI.BasicCaret);
    assertEquals("Dot=(0, Forward) Mark=(0, Forward)", jtComp.getCaret().toString());
    assertTrue(jtComp.getHighlighter() instanceof BasicTextUI.BasicHighlighter);
    assertEquals(ComponentOrientation.UNKNOWN, jtComp.getComponentOrientation());
    assertTrue(jtComp.isEditable());
    assertFalse(jtComp.getDragEnabled());
    assertEquals('\0', jtComp.getFocusAccelerator());
    assertEquals("TextCompUI", jtComp.getKeymap().getName());
    assertEquals(0, jtComp.getKeymap().getBoundActions().length);
    assertEquals(0, jtComp.getKeymap().getBoundKeyStrokes().length);
    assertEquals(new InsetsUIResource(0, 0, 0, 0), jtComp.getMargin());
}
项目:cn1    文件:BasicRadioButtonUITest.java   
public void testUninstallDefaults() {
    JRadioButton button = new JRadioButton();
    UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
    UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
    assertNotNull("font is installed", button.getFont());
    Font font = new FontUIResource(button.getFont().deriveFont(100f));
    UIManager.put("RadioButton.font", font);
    Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    UIManager.put("RadioButton.border", border);
    Insets margin = new InsetsUIResource(10, 20, 30, 40);
    UIManager.put("RadioButton.margin", margin);
    button.setUI(ui);
    ui.installDefaults(button);
    ui.uninstallDefaults(button);
    assertEquals("background", Color.blue, button.getBackground());
    assertEquals("foreground", Color.cyan, button.getForeground());
    assertEquals("font", font, button.getFont());
    assertNull("border", button.getBorder());
    assertEquals("margin", margin, button.getMargin());
}
项目:cn1    文件:BasicRadioButtonUITest.java   
public void testInstallDefaults() {
    JRadioButton button = new JRadioButton();
    UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
    UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
    assertNotNull("font is installed", button.getFont());
    Font font = new FontUIResource(button.getFont().deriveFont(100f));
    UIManager.put("RadioButton.font", font);
    Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    UIManager.put("RadioButton.border", border);
    Insets margin = new InsetsUIResource(10, 20, 30, 40);
    UIManager.put("RadioButton.margin", margin);
    Icon icon = new IconUIResource(new ImageIcon(new BufferedImage(10, 10,
            BufferedImage.TYPE_INT_RGB)));
    UIManager.put("RadioButton.icon", icon);
    button.setUI(ui);
    ui.installDefaults(button);
    assertEquals("background", Color.blue, button.getBackground());
    assertEquals("foreground", Color.cyan, button.getForeground());
    assertEquals("font", font, button.getFont());
    assertEquals("border", border, button.getBorder());
    assertEquals("margin", margin, button.getMargin());
    assertEquals("icon", icon, ui.getDefaultIcon());
}
项目:cn1    文件:AWTConverters.java   
public void register(ConverterRegistry registry) {
  registry.addConverter(Dimension.class, String.class, this);
  registry.addConverter(String.class, Dimension.class, this);
  registry.addConverter(DimensionUIResource.class, String.class, this);

  registry.addConverter(Insets.class, String.class, this);
  registry.addConverter(String.class, Insets.class, this);
  registry.addConverter(InsetsUIResource.class, String.class, this);

  registry.addConverter(Point.class, String.class, this);
  registry.addConverter(String.class, Point.class, this);

  registry.addConverter(Rectangle.class, String.class, this);
  registry.addConverter(String.class, Rectangle.class, this);

  registry.addConverter(Font.class, String.class, this);
  registry.addConverter(FontUIResource.class, String.class, this);
}
项目:IBMDataMovementTool    文件:MicroLayout.java   
public MicroLayout(
        InsetsUIResource textInsets,
        InsetsUIResource wrappedTextInsets,
        InsetsUIResource comboBoxEditorInsets,
        int comboBorderSize,
        int comboPopupBorderSize,
        Insets           buttonBorderInsets,
        InsetsUIResource buttonMargin,
        InsetsUIResource commitButtonMargin,
        InsetsUIResource checkBoxMargin,
        InsetsUIResource menuItemMargin,
        InsetsUIResource menuMargin,
        InsetsUIResource popupMenuSeparatorMargin) {
    this.textInsets = textInsets;
    this.wrappedTextInsets = wrappedTextInsets;
    this.comboBoxEditorInsets = comboBoxEditorInsets;
    this.buttonBorderInsets = buttonBorderInsets;
    this.buttonMargin = buttonMargin;
    this.commitButtonMargin = commitButtonMargin;
    this.comboBorderSize = comboBorderSize;
    this.comboPopupBorderSize = comboPopupBorderSize;
    this.checkBoxMargin = checkBoxMargin;
    this.menuItemMargin = menuItemMargin;
    this.menuMargin = menuMargin;
    this.popupMenuSeparatorMargin = popupMenuSeparatorMargin;
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticLowResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 1, 2, 1), // text insets
            new InsetsUIResource(2, 2, 2, 1), // wrapped text insets
            new InsetsUIResource(1, 1, 2, 1), // combo box editor insets
            -1,                               // combo border size
            1 ,                               // combo popup border size
            new Insets(2, 3, 3, 3),           // button border insets
            getButtonMargin(1, 1),            // button margin
            getButtonMargin(1, 1),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticHiResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 1, 2, 1), // text insets
            new InsetsUIResource(2, 2, 2, 1), // wrapped text insets
            new InsetsUIResource(1, 1, 2, 1), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(1, 3, 1, 3),           // button border insets
            getButtonMargin(2, 3),            // button margin
            getButtonMargin(2, 3),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticVistaMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 1, 1, 1), // text insets
            new InsetsUIResource(1, 2, 1, 1), // wrapped text insets
            new InsetsUIResource(1, 1, 1, 1), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(2, 3, 3, 3),           // button border insets
            getButtonMargin(0, 1),            // button margin
            getButtonMargin(0, 1),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticVistaClassicMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 1, 2, 1), // text insets
            new InsetsUIResource(2, 2, 2, 1), // wrapped text insets
            new InsetsUIResource(1, 1, 2, 1), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(3, 3, 3, 3),           // button border insets
            getButtonMargin(0, 1),            // button margin
            getButtonMargin(0, 1),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticXPLowResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(2, 2, 3, 2), // text insets
            new InsetsUIResource(2, 2, 3, 2), // wrapped text insets
            new InsetsUIResource(2, 2, 3, 2), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 3, 2),           // button border insets
            getButtonMargin(0, 1),            // button margin
            getButtonMargin(0, 1),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticXPHiResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(2, 2, 3, 2), // text insets
            new InsetsUIResource(2, 2, 3, 2), // wrapped text insets
            new InsetsUIResource(2, 2, 3, 2), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(2, 2, 2, 2),           // button border insets
            getButtonMargin(1, 2),            // button margin
            getButtonMargin(1, 2),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticXPVistaMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 2, 2, 2), // text insets
            new InsetsUIResource(1, 2, 2, 2), // wrapped text insets
            new InsetsUIResource(1, 2, 2, 2), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(2, 2, 3, 2),           // button border insets
            getButtonMargin(0, 0),            // button margin
            getButtonMargin(0, 0),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createPlasticXPVistaClassicMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(2, 2, 3, 2), // text insets
            new InsetsUIResource(2, 2, 3, 2), // wrapped text insets
            new InsetsUIResource(2, 2, 3, 2), // combo box editor insets
            -1,                               // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(0, 0),            // button margin
            getButtonMargin(0, 0),            // commit button margin
            PLASTIC_CHECK_BOX_MARGIN,         // check box margin
            PLASTIC_MENU_ITEM_MARGIN,         // menu item margin
            PLASTIC_MENU_MARGIN,              // menu margin
            null                              // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createWindowsClassicLowResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 2, 2, 2), // text insets
            new InsetsUIResource(1, 2, 2, 2), // wrapped text insets
            new InsetsUIResource(1, 2, 2, 2), // combo box editor insets
            2,                                // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(1, 1),            // button margin
            getButtonMargin(1, 1),            // commit button margin
            WINDOWS_CHECK_BOX_MARGIN,         // check box margin
            new InsetsUIResource(3, 0, 3, 0), // menu item margin
            new InsetsUIResource(2, 3, 2, 3), // menu margin
            new InsetsUIResource(2, 0, 3, 0)  // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createWindowsClassicHiResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 2, 2, 2), // text insets
            new InsetsUIResource(1, 2, 2, 2), // wrapped text insets
            new InsetsUIResource(1, 2, 2, 2), // combo box editor insets
            2,                                // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(1, 1),            // button margin
            getButtonMargin(1, 1),            // commit button margin
            WINDOWS_CHECK_BOX_MARGIN,         // check box margin
            new InsetsUIResource(2, 0, 2, 0), // menu item margin
            new InsetsUIResource(2, 4, 2, 4), // menu margin
            new InsetsUIResource(3, 0, 4, 0)  // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createWindowsXPLowResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(2, 2, 3, 2), // text insets
            new InsetsUIResource(2, 2, 3, 2), // wrapped text insets
            new InsetsUIResource(2, 2, 3, 2), // combo box editor insets
            1,                                // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(2, 3),            // button margin
            getButtonMargin(2, 3),            // commit button margin
            WINDOWS_CHECK_BOX_MARGIN,         // check box margin
            new InsetsUIResource(3, 0, 3, 0), // menu item margin
            new InsetsUIResource(2, 3, 2, 4), // menu margin
            new InsetsUIResource(2, 3, 3, 3)  // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createWindowsXPHiResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(2, 2, 3, 2), // text insets
            new InsetsUIResource(2, 2, 3, 2), // wrapped text insets
            new InsetsUIResource(2, 2, 3, 2), // combo box editor insets
            1,                                // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(2, 3),            // button margin
            getButtonMargin(2, 3),            // commit button margin
            WINDOWS_CHECK_BOX_MARGIN,         // check box margin
            new InsetsUIResource(2, 0, 2, 0), // menu item margin
            new InsetsUIResource(2, 5, 2, 6), // menu margin
            new InsetsUIResource(3, 3, 4, 3)  // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createWindowsVistaLowResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 2, 2, 2), // text insets
            new InsetsUIResource(1, 2, 2, 2), // wrapped text insets
            new InsetsUIResource(1, 2, 2, 2), // combo box editor insets
            1,                                // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(1, 2),            // button margin
            getButtonMargin(1, 2),            // commit button margin
            WINDOWS_CHECK_BOX_MARGIN,         // check box margin
            new InsetsUIResource(3, 0, 3, 0), // menu item margin
            new InsetsUIResource(2, 3, 2, 4), // menu margin
            new InsetsUIResource(2, 3, 3, 3)  // popup menu separator margin
            );
}
项目:IBMDataMovementTool    文件:MicroLayouts.java   
public static MicroLayout createWindowsVistaHiResMicroLayout() {
    return new MicroLayout(
            new InsetsUIResource(1, 2, 2, 2), // text insets
            new InsetsUIResource(1, 2, 2, 2), // wrapped text insets
            new InsetsUIResource(1, 2, 2, 2), // combo box editor insets
            1,                                // combo border size
            1,                                // combo popup border size
            new Insets(3, 2, 4, 2),           // button border insets
            getButtonMargin(1, 2),            // button margin
            getButtonMargin(1, 2),            // commit button margin
            WINDOWS_CHECK_BOX_MARGIN,         // check box margin
            new InsetsUIResource(2, 0, 2, 0), // menu item margin
            new InsetsUIResource(2, 5, 2, 6), // menu margin
            new InsetsUIResource(3, 3, 4, 3)  // popup menu separator margin
            );
}
项目:freeVM    文件:JTextComponent_byAuxiliaryComponentTest.java   
public void testJTextComponent() {
    jtComp = new JTextComp();
    assertNotNull(jtComp);
    assertTrue(jtComp.getUI() instanceof TextCompUI);
    assertTrue(jtComp.getCaret() instanceof BasicTextUI.BasicCaret);
    assertEquals("Dot=(0, Forward) Mark=(0, Forward)", jtComp.getCaret().toString());
    assertTrue(jtComp.getHighlighter() instanceof BasicTextUI.BasicHighlighter);
    assertEquals(ComponentOrientation.UNKNOWN, jtComp.getComponentOrientation());
    assertTrue(jtComp.isEditable());
    assertFalse(jtComp.getDragEnabled());
    assertEquals('\0', jtComp.getFocusAccelerator());
    assertEquals("TextCompUI", jtComp.getKeymap().getName());
    assertEquals(0, jtComp.getKeymap().getBoundActions().length);
    assertEquals(0, jtComp.getKeymap().getBoundKeyStrokes().length);
    assertEquals(new InsetsUIResource(0, 0, 0, 0), jtComp.getMargin());
}
项目:freeVM    文件:BasicRadioButtonUITest.java   
public void testUninstallDefaults() {
    JRadioButton button = new JRadioButton();
    UIManager.put("RadioButton.foreground", new ColorUIResource(Color.cyan));
    UIManager.put("RadioButton.background", new ColorUIResource(Color.blue));
    assertNotNull("font is installed", button.getFont());
    Font font = new FontUIResource(button.getFont().deriveFont(100f));
    UIManager.put("RadioButton.font", font);
    Border border = new BorderUIResource(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    UIManager.put("RadioButton.border", border);
    Insets margin = new InsetsUIResource(10, 20, 30, 40);
    UIManager.put("RadioButton.margin", margin);
    button.setUI(ui);
    ui.installDefaults(button);
    ui.uninstallDefaults(button);
    assertEquals("background", Color.blue, button.getBackground());
    assertEquals("foreground", Color.cyan, button.getForeground());
    assertEquals("font", font, button.getFont());
    assertNull("border", button.getBorder());
    assertEquals("margin", margin, button.getMargin());
}