Package javax.swing.plaf.BorderUIResource

Examples of javax.swing.plaf.BorderUIResource.LineBorderUIResource


    harness.check(defaults.get("PopupMenu.selectedWindowInputMapBindings") instanceof Object[]);
    harness.check(defaults.get("PopupMenu.selectedWindowInputMapBindings.RightToLeft") instanceof Object[]);
   
    harness.checkPoint("ProgressBar");
    harness.check(defaults.get("ProgressBar.background"), new ColorUIResource(0, 0, 4));
    LineBorderUIResource b = (LineBorderUIResource) defaults.get("ProgressBar.border");
    harness.check(b.getThickness(), 1);
    harness.check(b.getLineColor(), new Color(0, 0, 5));
    harness.check(defaults.getInt("ProgressBar.cellLength"), 1);
    harness.check(defaults.getInt("ProgressBar.cellSpacing"), 0);
    harness.check(defaults.getInt("ProgressBar.cycleTime"), 3000);
    harness.check(defaults.get("ProgressBar.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("ProgressBar.foreground"), new ColorUIResource(0, 0, 24));
    harness.check(defaults.getInt("ProgressBar.repaintInterval"), 50);
    harness.check(defaults.get("ProgressBar.selectionBackground"), new ColorUIResource(0, 0, 21));
    harness.check(defaults.get("ProgressBar.selectionForeground"), new ColorUIResource(0, 0, 4));
   
    harness.checkPoint("RadioButton");
    harness.check(defaults.get("RadioButton.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("RadioButton.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("RadioButton.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("RadioButton.disabledText"), new ColorUIResource(0, 0, 35));
    harness.check(defaults.get("RadioButton.focus"), new ColorUIResource(0, 0, 12));
    harness.check(defaults.get("RadioButton.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("RadioButton.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("RadioButton.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("RadioButton.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("RadioButton.icon") instanceof Icon);
    harness.check(defaults.get("RadioButton.light"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("RadioButton.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("RadioButton.select"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("RadioButton.shadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.getInt("RadioButton.textIconGap"), 4);
    harness.check(defaults.getInt("RadioButton.textShiftOffset"), 0);
   
    harness.checkPoint("RadioButtonMenuItem");
    harness.check(defaults.get("RadioButtonMenuItem.acceleratorFont"), new Font("Dialog", Font.PLAIN, 10));
    harness.check(defaults.get("RadioButtonMenuItem.acceleratorForeground"), new ColorUIResource(0, 0, 1));
    harness.check(defaults.get("RadioButtonMenuItem.acceleratorSelectionForeground"), new ColorUIResource(0, 0, 2));
    harness.check(defaults.get("RadioButtonMenuItem.arrowIcon") instanceof Icon);
//    harness.check(defaults.get("RadioButtonMenuItem.border") instanceof MetalBorders.MenuItemBorder);
    harness.check(defaults.get("RadioButtonMenuItem.background"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("RadioButtonMenuItem.borderPainted"), Boolean.TRUE);
    harness.check(defaults.get("RadioButtonMenuItem.checkIcon") instanceof Icon);
    harness.check(defaults.get("RadioButtonMenuItem.commandSound"), "sounds/MenuItemCommand.wav");
    harness.check(defaults.get("RadioButtonMenuItem.disabledForeground"), new ColorUIResource(0, 0, 16));
    harness.check(defaults.get("RadioButtonMenuItem.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("RadioButtonMenuItem.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("RadioButtonMenuItem.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("RadioButtonMenuItem.selectionBackground"), new ColorUIResource(0, 0, 18));
    harness.check(defaults.get("RadioButtonMenuItem.selectionForeground"), new ColorUIResource(0, 0, 19));
   
    harness.checkPoint("RootPane");
    harness.check(defaults.get("RootPane.colorChooserDialogBorder") instanceof Border);
    harness.check(defaults.get("RootPane.defaultButtonWindowKeyBindings") instanceof Object[]);
    harness.check(defaults.get("RootPane.errorDialogBorder") instanceof Border);
    harness.check(defaults.get("RootPane.fileChooserDialogBorder") instanceof Border);
    harness.check(defaults.get("RootPane.frameBorder") instanceof Border);
    harness.check(defaults.get("RootPane.informationDialogBorder") instanceof Border);
    harness.check(defaults.get("RootPane.plainDialogBorder") instanceof Border);
    harness.check(defaults.get("RootPane.questionDialogBorder") instanceof Border);
    harness.check(defaults.get("RootPane.warningDialogBorder") instanceof Border);
   
    harness.checkPoint("ScrollBar");
    harness.check(defaults.get("ScrollBar.allowsAbsolutePositioning"), Boolean.TRUE);
    harness.check(defaults.get("ScrollBar.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ScrollBar.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("ScrollBar.focusInputMap"), null);
    harness.check(defaults.get("ScrollBar.focusInputMap.RightToLeft"), null);
    harness.check(defaults.get("ScrollBar.foreground"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ScrollBar.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("ScrollBar.maximumThumbSize"), new DimensionUIResource(4096, 4096));
    harness.check(defaults.get("ScrollBar.minimumThumbSize"), new DimensionUIResource(8, 8));
    harness.check(defaults.get("ScrollBar.shadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("ScrollBar.thumb"), new ColorUIResource(0, 0, 24));
    harness.check(defaults.get("ScrollBar.thumbDarkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("ScrollBar.thumbHighlight"), new ColorUIResource(0, 0, 20));
    harness.check(defaults.get("ScrollBar.thumbShadow"), new ColorUIResource(0, 0, 21));
    harness.check(defaults.get("ScrollBar.track"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ScrollBar.trackHighlight"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.getInt("ScrollBar.width"), 17);
   
    harness.checkPoint("ScrollPane");
    harness.check(defaults.get("ScrollPane.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ScrollPane.ancestorInputMap.RightToLeft") instanceof InputMapUIResource);
    harness.check(defaults.get("ScrollPane.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ScrollPane.border") instanceof MetalBorders.ScrollPaneBorder);
    harness.check(defaults.get("ScrollPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ScrollPane.foreground"), new ColorUIResource(0, 0, 10));
   
    harness.checkPoint("Separator");
    harness.check(defaults.get("Separator.background"), new ColorUIResource(0, 0, 25));
    harness.check(defaults.get("Separator.foreground"), new ColorUIResource(0, 0, 26));
    harness.check(defaults.get("Separator.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("Separator.shadow"), new ColorUIResource(0, 0, 9));
   
    harness.checkPoint("Slider");
    harness.check(defaults.get("Slider.altTrackColor"), null);
    harness.check(defaults.get("Slider.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("Slider.focus"), new ColorUIResource(0, 0, 12));
    InputMap focusInputMap = (InputMap) defaults.get("Slider.focusInputMap");
    KeyStroke[] keys = focusInputMap.keys();
//    for (int i = 0; i < keys.length; i++) {
//        System.out.println(keys[i] + " --> " + focusInputMap.get(keys[i]));
//    }
    List keyList = Arrays.asList(keys);
    harness.check(keyList.contains(KeyStroke.getKeyStroke("LEFT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("RIGHT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("UP")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("DOWN")))
    harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_LEFT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_RIGHT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_UP")))
    harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_DOWN")))
    harness.check(keyList.contains(KeyStroke.getKeyStroke("HOME")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("END")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("PAGE_UP")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("PAGE_DOWN")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("ctrl PAGE_UP")))
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("LEFT")), "negativeUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("RIGHT")), "positiveUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("UP")), "positiveUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("DOWN")), "negativeUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_LEFT")), "negativeUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_RIGHT")), "positiveUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_UP")), "positiveUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("KP_DOWN")), "negativeUnitIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("HOME")), "minScroll");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("END")), "maxScroll");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("PAGE_UP")), "positiveBlockIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "negativeBlockIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "negativeBlockIncrement");
    harness.check(focusInputMap.get(KeyStroke.getKeyStroke("ctrl PAGE_UP")), "positiveBlockIncrement");
   
    InputMap rightToLeftMap = (InputMap) defaults.get("Slider.focusInputMap.RightToLeft");
    keys = rightToLeftMap != null ? rightToLeftMap.keys() : new KeyStroke[] {};
    keyList = Arrays.asList(keys);
//    for (int i = 0; i < keys.length; i++) {
//        System.out.println(keys[i] + " --> " + focusInputMap.get(keys[i]));
//    }
    harness.check(keyList.contains(KeyStroke.getKeyStroke("RIGHT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_RIGHT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("LEFT")));
    harness.check(keyList.contains(KeyStroke.getKeyStroke("KP_LEFT")));
    if (rightToLeftMap == null)
    {
      rightToLeftMap = new InputMap()// to prevent NullPointerException   
    }
    harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("RIGHT")), "negativeUnitIncrement");
    harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("KP_RIGHT")), "negativeUnitIncrement");
    harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("LEFT")), "positiveUnitIncrement");
    harness.check(rightToLeftMap.get(KeyStroke.getKeyStroke("KP_LEFT")), "positiveUnitIncrement");
   
    harness.check(defaults.get("Slider.focusInsets"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(defaults.get("Slider.foreground"), new ColorUIResource(0, 0, 24));
    harness.check(defaults.get("Slider.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("Slider.horizontalThumbIcon") != null);
    harness.check(defaults.getInt("Slider.majorTickLength"), 6);
    harness.check(defaults.get("Slider.shadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.getInt("Slider.trackWidth"), 7);
    harness.check(defaults.get("Slider.verticalThumbIcon") != null);
   
    harness.checkPoint("Spinner");
    harness.check(defaults.get("Spinner.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Spinner.arrowButtonBorder") instanceof Border);
    harness.check(defaults.get("Spinner.arrowButtonInsets"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(defaults.get("Spinner.arrowButtonSize"), new Dimension(16, 5));
    harness.check(defaults.get("Spinner.border") instanceof Border);
    harness.check(defaults.get("Spinner.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("Spinner.editorBorderPainted"), Boolean.FALSE);
    harness.check(defaults.get("Spinner.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("Spinner.foreground"), new ColorUIResource(0, 0, 4));
   
    harness.checkPoint("SplitPane");
    harness.check(defaults.get("SplitPane.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("SplitPane.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("SplitPane.border") instanceof Border);
    harness.check(defaults.get("SplitPane.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("SplitPane.dividerFocusColor"), new ColorUIResource(0, 0, 20));
    harness.check(defaults.getInt("SplitPane.dividerSize"), 10);
    harness.check(defaults.get("SplitPane.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("SplitPane.shadow"), new ColorUIResource(0, 0, 9));

    harness.checkPoint("SplitPaneDivider");
    harness.check(defaults.get("SplitPaneDivider.draggingColor"), new ColorUIResource(64, 64, 64));
    harness.check(defaults.get("SplitPaneDivider.border") instanceof Border);
   
    harness.checkPoint("TabbedPane");
    harness.check(defaults.get("TabbedPane.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("TabbedPane.background"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("TabbedPane.borderHighlightColor"), null);
    harness.check(defaults.get("TabbedPane.contentAreaColor"), null);
    harness.check(defaults.get("TabbedPane.contentBorderInsets"), new InsetsUIResource(2, 2, 3, 3));
    harness.check(defaults.get("TabbedPane.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("TabbedPane.focus"), new ColorUIResource(0, 0, 21));
    harness.check(defaults.get("TabbedPane.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("TabbedPane.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("TabbedPane.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("TabbedPane.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("TabbedPane.light"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("TabbedPane.selected"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("TabbedPane.selectedTabPadInsets"), new InsetsUIResource(2, 2, 2, 1));
    harness.check(defaults.get("TabbedPane.selectHighlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("TabbedPane.shadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("TabbedPane.tabAreaBackground"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("TabbedPane.tabAreaInsets"), new InsetsUIResource(4, 2, 0, 6));
    harness.check(defaults.get("TabbedPane.tabInsets"), new InsetsUIResource(0, 9, 1, 9));
    harness.check(defaults.getInt("TabbedPane.tabRunOverlay"), 2);
    harness.check(defaults.getInt("TabbedPane.textIconGap"), 4);
    harness.check(defaults.get("TabbedPane.unselectedBackground"), null);
   
    harness.checkPoint("Table");
    harness.check(defaults.get("Table.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Table.ancestorInputMap.RightToLeft") instanceof InputMapUIResource);
    harness.check(defaults.get("Table.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("Table.focusCellBackground"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("Table.focusCellForeground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("Table.focusCellHighlightBorder") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("Table.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Table.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("Table.gridColor"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("Table.scrollPaneBorder") instanceof MetalBorders.ScrollPaneBorder);
    harness.check(defaults.get("Table.focusCellBackground"), new ColorUIResource(0, 0, 30));
   
    harness.checkPoint("TableHeader");
//    harness.check(defaults.get("TableHeader.cellBorder") instanceof MetalBorders.TableHeaderBorder);
    harness.check(defaults.get("TableHeader.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("TableHeader.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("TableHeader.foreground"), new ColorUIResource(0, 0, 10));
   
    harness.checkPoint("TextArea");
    harness.check(defaults.get("TextArea.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("TextArea.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.getInt("TextArea.caretBlinkRate"), 500);
    harness.check(defaults.get("TextArea.caretForeground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("TextArea.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("TextArea.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("TextArea.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("TextArea.inactiveForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("TextArea.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(defaults.get("TextArea.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("TextArea.selectionForeground"), new ColorUIResource(0, 0, 13));
   
    harness.checkPoint("TextField");
    harness.check(defaults.get("TextField.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("TextField.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.getInt("TextField.caretBlinkRate"), 500);
    harness.check(defaults.get("TextField.caretForeground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("TextField.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("TextField.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("TextField.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("TextField.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("TextField.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("TextField.inactiveBackground"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("TextField.inactiveForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("TextField.light"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("TextField.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(defaults.get("TextField.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("TextField.selectionForeground"), new ColorUIResource(0, 0, 13));
    harness.check(defaults.get("TextField.shadow"), new ColorUIResource(0, 0, 9));
   
    harness.checkPoint("TextPane");
    harness.check(defaults.get("TextPane.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("TextPane.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.getInt("TextPane.caretBlinkRate"), 500);
    harness.check(defaults.get("TextPane.caretForeground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("TextPane.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("TextPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("TextPane.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("TextPane.inactiveForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("TextPane.margin"), new InsetsUIResource(3, 3, 3, 3));
    harness.check(defaults.get("TextPane.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("TextPane.selectionForeground"), new ColorUIResource(0, 0, 13));
   
    harness.checkPoint("TitledBorder");
    harness.check(defaults.get("TitledBorder.border") instanceof LineBorderUIResource);
    harness.check(defaults.get("TitledBorder.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("TitledBorder.titleColor"), new ColorUIResource(0, 0, 27));
   
    harness.checkPoint("ToggleButton");
    harness.check(defaults.get("ToggleButton.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ToggleButton.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("ToggleButton.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("ToggleButton.disabledText"), new ColorUIResource(0, 0, 35));
    harness.check(defaults.get("ToggleButton.focus"), new ColorUIResource(0, 0, 12));
    harness.check(defaults.get("ToggleButton.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ToggleButton.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("ToggleButton.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("ToggleButton.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("ToggleButton.light"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("ToggleButton.margin"), new InsetsUIResource(2, 14, 2, 14));
    harness.check(defaults.get("ToggleButton.select"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("ToggleButton.shadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.getInt("ToggleButton.textIconGap"), 4);
    harness.check(defaults.getInt("ToggleButton.textShiftOffset"), 0);
   
    harness.checkPoint("ToolBar");
    harness.check(defaults.get("ToolBar.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ToolBar.background"), new ColorUIResource(0, 0, 15));
//    harness.check(defaults.get("ToolBar.border") instanceof MetalBorders.ToolBarBorder);
    harness.check(defaults.get("ToolBar.borderColor"), null);
    harness.check(defaults.get("ToolBar.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("ToolBar.dockingBackground"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("ToolBar.dockingForeground"), new ColorUIResource(0, 0, 21));
    harness.check(defaults.get("ToolBar.floatingBackground"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("ToolBar.floatingForeground"), new ColorUIResource(0, 0, 20));
    harness.check(defaults.get("ToolBar.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("ToolBar.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("ToolBar.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("ToolBar.light"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("ToolBar.separatorSize"), new DimensionUIResource(10, 10));
    harness.check(defaults.get("ToolBar.shadow"), new ColorUIResource(0, 0, 9));
   
    harness.checkPoint("ToolTip");
    harness.check(defaults.get("ToolTip.background"), new ColorUIResource(0, 0, 20));
    harness.check(defaults.get("ToolTip.backgroundInactive"), new ColorUIResource(0, 0, 4));
    LineBorderUIResource b2 = (LineBorderUIResource) defaults.get("ToolTip.border");
    harness.check(b2.getThickness(), 1);
    harness.check(b2.getLineColor(), new Color(0, 0, 21));
    b2 = (LineBorderUIResource) defaults.get("ToolTip.borderInactive");
    harness.check(b2 != null ? b2.getThickness() : 0, 1);
    harness.check(b2 != null ? b2.getLineColor() : null, new Color(0, 0, 5));
    harness.check(defaults.get("ToolTip.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ToolTip.foreground"), new ColorUIResource(0, 0, 23));
    harness.check(defaults.get("ToolTip.foregroundInactive"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("ToolTip.hideAccelerator"), Boolean.FALSE);
   
View Full Code Here


    //harness.check(defaults.get("InternalFrame.maximizeIcon"), null); // -> javax.swing.plaf.metal.OceanTheme$IFIcon@5f7a8a02
    //harness.check(defaults.get("InternalFrame.minimizeIcon"), null); // -> javax.swing.plaf.metal.OceanTheme$IFIcon@74b2002f
    //harness.check(defaults.get("InternalFrame.paletteCloseIcon"), null); // -> javax.swing.plaf.metal.OceanTheme$IFIcon@432a0f6c
    harness.check(defaults.get("Label.disabledForeground"),
        new ColorUIResource(153, 153, 153));
    LineBorderUIResource border = (LineBorderUIResource) defaults.get(
        "List.focusCellHighlightBorder");
    harness.check(border.getThickness(), 1);
    harness.check(border.getLineColor(), new ColorUIResource(99, 130, 191));
    harness.check(defaults.get("MenuBar.borderColor"),
        new ColorUIResource(204, 204, 204));
    harness.check(defaults.get("MenuBar.gradient"), Arrays.asList(new Object[]
        {new Float(1.0), new Float(0.0), new ColorUIResource(Color.WHITE),
         new ColorUIResource(218, 218, 218),
View Full Code Here

      "List.background", getWindowBackground(),
      "List.foreground", getUserTextColor(),
      "List.selectionBackground", getTextHighlightColor(),
      "List.selectionForeground", getHighlightedTextColor(),
      "List.focusCellHighlightBorder",
        new LineBorderUIResource(MetalLookAndFeel.getFocusColor()),

      "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10),
      "Menu.acceleratorForeground", getAcceleratorForeground(),
      "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),
      "Menu.arrowIcon", MetalIconFactory.getMenuArrowIcon(),
      "Menu.background", getMenuBackground(),
      "Menu.border", new MetalBorders.MenuItemBorder(),
      "Menu.borderPainted", Boolean.TRUE,
      "MenuItem.commandSound", "sounds/MenuItemCommand.wav",
      "Menu.disabledForeground", getMenuDisabledForeground(),
      "Menu.font", getMenuTextFont(),
      "Menu.foreground", getMenuForeground(),
      "Menu.selectionBackground", getMenuSelectedBackground(),
      "Menu.selectionForeground", getMenuSelectedForeground(),
      "Menu.submenuPopupOffsetX", new Integer(-4),
      "Menu.submenuPopupOffsetY", new Integer(-3),

      "MenuBar.background", getMenuBackground(),
      "MenuBar.border", new MetalBorders.MenuBarBorder(),
      "MenuBar.font", getMenuTextFont(),
      "MenuBar.foreground", getMenuForeground(),
      "MenuBar.highlight", getControlHighlight(),
      "MenuBar.shadow", getControlShadow(),

      "MenuItem.acceleratorDelimiter", "-",
      "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10),
      "MenuItem.acceleratorForeground", getAcceleratorForeground(),
      "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),
      "MenuItem.arrowIcon", MetalIconFactory.getMenuItemArrowIcon(),
      "MenuItem.background", getMenuBackground(),
      "MenuItem.border", new MetalBorders.MenuItemBorder(),
      "MenuItem.borderPainted", Boolean.TRUE,
      "MenuItem.disabledForeground", getMenuDisabledForeground(),
      "MenuItem.font", getMenuTextFont(),
      "MenuItem.foreground", getMenuForeground(),
      "MenuItem.selectionBackground", getMenuSelectedBackground(),
      "MenuItem.selectionForeground", getMenuSelectedForeground(),

      "OptionPane.background", getControl(),
      "OptionPane.errorSound", "sounds/OptionPaneError.wav",
      "OptionPane.informationSound", "sounds/OptionPaneInformation.wav",
      "OptionPane.questionSound", "sounds/OptionPaneQuestion.wav",
      "OptionPane.warningSound", "sounds/OptionPaneWarning.wav",
      "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51),
      "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153),
      "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0),
      "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102),
      "OptionPane.foreground", getControlTextColor(),
      "OptionPane.messageForeground", getControlTextColor(),
      "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51),
      "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153),
      "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0),
      "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102),
      "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51),
      "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153),
      "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0),
      "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102),

      "Panel.background", getControl(),
      "Panel.foreground", getUserTextColor(),

      "PasswordField.background", getWindowBackground(),
      "PasswordField.border",
      new BorderUIResource(MetalBorders.getTextFieldBorder()),
      "PasswordField.caretForeground", getUserTextColor(),
      "PasswordField.foreground", getUserTextColor(),
      "PasswordField.font", new FontUIResource("Dialog", Font.PLAIN, 12),
      "PasswordField.inactiveBackground", getControl(),
      "PasswordField.inactiveForeground", getInactiveSystemTextColor(),
      "PasswordField.selectionBackground", getTextHighlightColor(),
      "PasswordField.selectionForeground", getHighlightedTextColor(),

      "PopupMenu.background", getMenuBackground(),
      "PopupMenu.border", new MetalBorders.PopupMenuBorder(),
      "PopupMenu.font", getMenuTextFont(),
      "PopupMenu.foreground", getMenuForeground(),
      "PopupMenu.popupSound", "sounds/PopupMenuPopup.wav",

      "ProgressBar.background", getControl(),
      "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1),
      "ProgressBar.font", getControlTextFont(),
      "ProgressBar.foreground", getPrimaryControlShadow(),
      "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(),
      "ProgressBar.selectionForeground", getControl(),

      "RadioButton.background", getControl(),
      "RadioButton.darkShadow", getControlDarkShadow(),
      "RadioButton.disabledText", getInactiveControlTextColor(),
      "RadioButton.icon",
      new UIDefaults.LazyValue()
      {
        public Object createValue(UIDefaults def)
          {
            return MetalIconFactory.getRadioButtonIcon();
          }
      },
      "RadioButton.focus", MetalLookAndFeel.getFocusColor(),
      "RadioButton.font", MetalLookAndFeel.getControlTextFont(),
      "RadioButton.foreground", getControlTextColor(),
      "RadioButton.highlight", getControlHighlight(),
      "RadioButton.light", getControlHighlight(),
      "RadioButton.select", getControlShadow(),
      "RadioButton.shadow", getControlShadow(),

      "RadioButtonMenuItem.acceleratorFont", new Font("Dialog", Font.PLAIN, 10),
      "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(),
      "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),
      "RadioButtonMenuItem.background", getMenuBackground(),
      "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(),
      "RadioButtonMenuItem.borderPainted", Boolean.TRUE,
      "RadioButtonMenuItem.checkIcon",
        MetalIconFactory.getRadioButtonMenuItemIcon(),
      "RadioButtonMenuItem.commandSound", "sounds/MenuItemCommand.wav",
      "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(),
      "RadioButtonMenuItem.font", getMenuTextFont(),
      "RadioButtonMenuItem.foreground", getMenuForeground(),
      "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
      "RadioButtonMenuItem.selectionBackground",
        MetalLookAndFeel.getMenuSelectedBackground(),
      "RadioButtonMenuItem.selectionForeground",
        MetalLookAndFeel.getMenuSelectedForeground(),

      "ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
      "ScrollBar.background", getControl(),
      "ScrollBar.darkShadow", getControlDarkShadow(),
      "ScrollBar.foreground", getControl(),
      "ScrollBar.highlight", getControlHighlight(),
      "ScrollBar.shadow", getControlShadow(),
      "ScrollBar.thumb", getPrimaryControlShadow(),
      "ScrollBar.thumbDarkShadow", getControlDarkShadow(),
      "ScrollBar.thumbHighlight", getPrimaryControl(),
      "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(),
      "ScrollBar.track", getControl(),
      "ScrollBar.trackHighlight", getControlDarkShadow(),
      "ScrollBar.width", new Integer(17),

      "ScrollPane.background", getControl(),
      "ScrollPane.border", new MetalBorders.ScrollPaneBorder(),
      "ScrollPane.foreground", getControlTextColor(),

      "Separator.background", getSeparatorBackground(),
      "Separator.foreground", getSeparatorForeground(),
      "Separator.highlight", getControlHighlight(),
      "Separator.shadow", getControlShadow(),

      "Slider.background", getControl(),
      "Slider.focus", getFocusColor(),
      "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0),
      "Slider.foreground", getPrimaryControlShadow(),
      "Slider.highlight", getControlHighlight(),
      "Slider.horizontalThumbIcon",
      MetalIconFactory.getHorizontalSliderThumbIcon(),
      "Slider.majorTickLength", new Integer(6),
      "Slider.shadow", getControlShadow(),
      "Slider.trackWidth", new Integer(7),
      "Slider.verticalThumbIcon",
      MetalIconFactory.getVerticalSliderThumbIcon(),

      "Spinner.arrowButtonInsets", new InsetsUIResource(0, 0, 0, 0),
      "Spinner.background", getControl(),
      "Spinner.border", MetalBorders.getTextFieldBorder(),
      "Spinner.font", getControlTextFont(),
      "Spinner.foreground", getControl(),

      "SplitPane.background", getControl(),
      "SplitPane.darkShadow", getControlDarkShadow(),
      "SplitPane.dividerFocusColor", getPrimaryControl(),
      "SplitPane.dividerSize", new Integer(10),
      "SplitPane.highlight", getControlHighlight(),
      "SplitPane.shadow", getControlShadow(),

      "SplitPaneDivider.draggingColor", Color.DARK_GRAY,

      "TabbedPane.background", getControlShadow(),
      "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3),
      "TabbedPane.contentOpaque", Boolean.TRUE,
      "TabbedPane.darkShadow", getControlDarkShadow(),
      "TabbedPane.focus", getPrimaryControlDarkShadow(),
      "TabbedPane.font", getControlTextFont(),
      "TabbedPane.foreground", getControlTextColor(),
      "TabbedPane.highlight", getControlHighlight(),
      "TabbedPane.light", getControl(),
      "TabbedPane.selected", getControl(), // overridden in OceanTheme
      "TabbedPane.selectHighlight", getControlHighlight(),
      "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1),
      "TabbedPane.shadow", getControlShadow(),
      "TabbedPane.tabAreaBackground", getControl(), // overridden in OceanTheme
      "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), // dito
      "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9),

      // new properties in OceanTheme:
      // TabbedPane.contentAreaColor
      // TabbedPane.unselectedBackground

      "Table.background", getWindowBackground(),
      "Table.focusCellBackground", getWindowBackground(),
      "Table.focusCellForeground", getControlTextColor(),
      "Table.foreground", getControlTextColor(),
      "Table.focusCellHighlightBorder",
      new BorderUIResource.LineBorderUIResource(getFocusColor()),
      "Table.focusCellBackground", getWindowBackground(),
      "Table.gridColor", getControlDarkShadow(),
      "Table.selectionBackground", new ColorUIResource(204, 204, 255),
      "Table.selectionForeground", new ColorUIResource(0, 0, 0),

      "TableHeader.background", getControl(),
      "TableHeader.cellBorder", new MetalBorders.TableHeaderBorder(),
      "TableHeader.foreground", getControlTextColor(),

      "TextArea.background", getWindowBackground(),
      "TextArea.caretForeground", getUserTextColor(),
      "TextArea.font", new FontUIResource("Dialog", Font.PLAIN, 12),
      "TextArea.foreground", getUserTextColor(),
      "TextArea.inactiveForeground", getInactiveSystemTextColor(),
      "TextArea.selectionBackground", getTextHighlightColor(),
      "TextArea.selectionForeground", getHighlightedTextColor(),

      "TextField.background", getWindowBackground(),
      "TextField.border",
      new BorderUIResource(MetalBorders.getTextFieldBorder()),
      "TextField.caretForeground", getUserTextColor(),
      "TextField.darkShadow", getControlDarkShadow(),
      "TextField.font", new FontUIResource("Dialog", Font.PLAIN, 12),
      "TextField.foreground", getUserTextColor(),
      "TextField.highlight", getControlHighlight(),
      "TextField.inactiveBackground", getControl(),
      "TextField.inactiveForeground", getInactiveSystemTextColor(),
      "TextField.light", getControlHighlight(),
      "TextField.selectionBackground", getTextHighlightColor(),
      "TextField.selectionForeground", getHighlightedTextColor(),
      "TextField.shadow", getControlShadow(),

      "TextPane.background", getWindowBackground(),
      "TextPane.caretForeground", getUserTextColor(),
      "TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
      "TextPane.foreground", getUserTextColor(),
      "TextPane.inactiveForeground", getInactiveSystemTextColor(),
      "TextPane.selectionBackground", getTextHighlightColor(),
      "TextPane.selectionForeground", getHighlightedTextColor(),

      "TitledBorder.border", new LineBorderUIResource(getPrimaryControl(), 1),
      "TitledBorder.font", getControlTextFont(),
      "TitledBorder.titleColor", getSystemTextColor(),

      "ToggleButton.background", getControl(),
      "ToggleButton.border", MetalBorders.getToggleButtonBorder(),
View Full Code Here

    public static void main(String[] args) {
        new javax_swing_plaf_BorderUIResource_LineBorderUIResource().test(true);
    }

    protected LineBorderUIResource getObject() {
        return new LineBorderUIResource(Color.RED, 2);
    }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.BorderUIResource.LineBorderUIResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.