Package javax.swing

Examples of javax.swing.UIDefaults


  {
    if (subSystem.getExtendedConfig().getBoolProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.base.SwingDialogTranslation")) //$NON-NLS-1$
    {
      final ResourceBundle resources = ResourceBundle.getBundle(SwingCommonModule.BUNDLE_NAME);
      final UIDefaults defaults = UIManager.getDefaults();
      final Enumeration en = resources.getKeys();
      while (en.hasMoreElements())
      {
        try
        {
          final String keyName = (String) en.nextElement();
          defaults.put(keyName, resources.getObject(keyName));
        }
        catch (Exception e)
        {
          // Ignored; if it happens, we would not care that much ..
        }
View Full Code Here


            Object value, boolean isSelected, boolean expanded, boolean leaf,
            int row, boolean hasFocus) {
        AutomatedTreeNode node = (AutomatedTreeNode) value;
        String stringVal = node.getUserObject().toString();

        UIDefaults ui = UIManager.getDefaults();

        if (node.getUserObject() instanceof BuddyStatus) {
            // sets up the buddy information
            BuddyStatus buddy = (BuddyStatus) node.getUserObject();

            value = buddy.getUser();
            if (buddy.getName() != null) {
                value = buddy.getName();
            }
            stringVal = value.toString();

            String user = buddy.getUser();
            String server = buddy.getUser();
            int index = user.indexOf("@");
            if (index > -1) {
                server = user.substring(index + 1);
                user = user.substring(0, index);
            }

            // check for connection error
            if (!BuddyList.getInstance().checkConnection()) {
                Exception ex = new Exception("Disconnected from server");
                ConnectorThread.getInstance().getConnectionListener()
                        .connectionClosedOnError(ex);
            }

            // gets all the resources
            int resourceCount = 0;
            StringBuffer resources = new StringBuffer();

            Iterator i = buddy.keySet().iterator();

            while (i.hasNext()) {
                String key = (String) i.next();

                if (!key.equals("N/A")) {
                    boolean add = false;

                    if (key.equals(buddy.getHighestResource())) {
                        add = true;
                    } else {
                        resources.append("  ");
                    }

                    resources.append(key).append(" (").append(buddy.get(key))
                            .append(")");
                    if (add) {
                        resources.append(" <b>*</b>");
                    }
                    if (i.hasNext()) {
                        resources.append("<br>");
                    }
                    resourceCount++;
                }
            }

            // draw the tooltip
            StringBuffer tooltip = new StringBuffer();
            tooltip
                    .append(
                            "<html><table><tr><td valign='middle' width='2%'><img src='")
                    .append(light.toString())
                    .append("'></td><td valign='top'>")
                    .append(
                            "<table border='0'><tr><td colspan='2'><b><font size='+1'>")
                    .append(user.replaceAll("\\%", "@"))
                    .append(
                            "</font></b><table border='0' cellpadding='2' cellspacing='2'><tr><td nowrap><b>")
                    .append(this.resources.getString("server")).append(
                            ":</b></td><td nowrap>").append(server).append(
                            "</td></tr>");

            RosterEntry entry = buddy.getRosterEntry();
            if (entry != null) {
                RosterPacket.ItemType subType = entry.getType();
                if (subType != null) {
                    tooltip.append("<tr><td nowrap><b>").append(
                            this.resources.getString("subscription")).append(
                            ":</b></td><td nowrap>").append(subType.toString())
                            .append("</td></tr>");
                }
            }

            if (resourceCount > 0) {
                tooltip.append("<tr><td valign=\"top\" nowrap><b>").append(
                        this.resources.getString("pluralResources")).append(
                        ":</b></td><td nowrap>").append(resources).append(
                        "</td></tr>");
            }

            if (buddy.getPubKey() != null) {
                tooltip.append("<tr><td valign=\"top\" nowrap><b>").append(
                        this.resources.getString("gnupgKey")).append(
                        ":</b></td><td nowrap>").append(buddy.getPubKey())
                        .append("</td></tr>");
            }

            String statusMessage = buddy.getStatusMessage(buddy
                    .getHighestResource());
            if (statusMessage != null && !statusMessage.equals("")) {
                statusMessage = statusMessage.replaceAll("\n", "<br>");
                tooltip.append("<tr><td nowrap><b>").append(
                        this.resources.getString("status")).append(
                        ":</b></td><td nowrap>").append(statusMessage).append(
                        "</td></tr>");
            }

            String using = buddy.getVersionInfo();
            if (using != null) {
                tooltip.append("<tr><td nowrap><b>").append(
                        this.resources.getString("using")).append(
                        ":</b></td><td nowrap>").append(using).append(
                        "</td></tr>");
            }

            tooltip
                    .append("</table></td></tr></table></td></tr></table></html>");
            setToolTipText(tooltip.toString());
            setFont((Font) ui.get("Label.font"));

            super.getTreeCellRendererComponent(tree, stringVal, isSelected,
                    expanded, leaf, row, hasFocus);

            // setting up status icon
            Presence.Mode mode = null;
            if (buddy.size() == 0) {
                setForeground(Color.GRAY);
            } else {
                mode = buddy.getPresence(buddy.getHighestResource());
            }

            ImageIcon statusIcon = null;

            // name based guess
            if (buddy.getUser().indexOf("@") == -1) {
                Pattern p = Pattern
                        .compile("^(aim|msn|yahoo|icq|gadu-gadu)[-_.].*");
                Matcher m = p.matcher(buddy.getUser());
                if (m.matches() && m.groupCount() >= 1) {
                    String type = m.group(1);
                    if (type != null) {
                        statusIcon = Standard
                                .getIcon("imagethemes/statusicons/"
                                        + type
                                        + "/"
                                        + SelfStatuses.getInstance().getStatus(
                                                mode).getShortcut() + ".png");
                    }
                }
            }

            // discovery information based guess
            Properties cache = JBotherLoader.getDiscoveryCache();
            String discoInfo = cache.getProperty(buddy.getUser().replaceAll(
                    "/.*", ""));
            if (discoInfo != null) {
                String items[] = discoInfo.split(" ");
                if (items.length == 2) {
                    String type = items[1];
                    if (type.equals("aim") || type.equals("icq")
                            || type.equals("msn") || type.equals("yahoo")
                            || type.equals("gadu-gadu")) {
                        statusIcon = Standard
                                .getIcon("imagethemes/statusicons/"
                                        + type
                                        + "/"
                                        + SelfStatuses.getInstance().getStatus(
                                                mode).getShortcut() + ".png");
                    }
                }
            }

            if (statusIcon == null) {
                statusIcon = StatusIconCache.getStatusIcon(mode);
            }

            if (statusIcon != null) {
                setIcon(statusIcon);
            }
            // /setting up status icon

        }

        else {
            Font newFont = (Font) ui.get("Label.font");
            setFont(new Font(newFont.getName(), Font.BOLD, newFont.getSize()));

            super.getTreeCellRendererComponent(tree, stringVal, isSelected,
                    expanded, leaf, row, hasFocus);

View Full Code Here

     *            the label name
     * @param the
     *            value
     */
    private void addItem(String name, String value) {
        UIDefaults ui = UIManager.getDefaults();

        Font newFont = (Font) ui.get("Label.font");

        JLabel nameLabel = new JLabel(name + ":  ", SwingConstants.RIGHT);
        nameLabel.setFont(new Font(newFont.getName(), Font.BOLD, newFont
                .getSize()));

View Full Code Here

    }

    private JTabbedPane getTabbedPane()
    {
        Map components = new TreeMap();
        UIDefaults defaults = UIManager.getLookAndFeelDefaults();

        //  Build of Map of attributes for each component

        for ( Enumeration e = defaults.keys(); e.hasMoreElements(); )
        {
            Object key = e.nextElement();
            Object value = defaults.get( key );

            Map componentMap = getComponentMap( components, key.toString() );

            if ( componentMap != null )
                componentMap.put( key, value );
View Full Code Here

    UIManager.LookAndFeelInfo looks[] = UIManager.getInstalledLookAndFeels();

    for (UIManager.LookAndFeelInfo info : looks) {
      UIManager.setLookAndFeel(info.getClassName());

      UIDefaults defaults = UIManager.getDefaults();
      Enumeration newKeys = defaults.keys();

      while (newKeys.hasMoreElements()) {
        Object obj = newKeys.nextElement();
        System.out.printf("%50s : %s\n", obj, UIManager.get(obj));
      }
View Full Code Here

  }

  @Override
  public UIDefaults getDefaults() {

    return new UIDefaults(new Object[] { "ButtonUI", //$NON-NLS-1$
        "javax.swing.plaf.multi.SyserrButtonUI", }) {//$NON-NLS-1$
      @Override
      protected void getUIError(String s) {
        // Remove unneded mesage
      }
View Full Code Here

  {
    if (subSystem.getExtendedConfig().getBoolProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.base.SwingDialogTranslation")) //$NON-NLS-1$
    {
      final ResourceBundle resources = ResourceBundle.getBundle(SwingCommonModule.BUNDLE_NAME);
      final UIDefaults defaults = UIManager.getDefaults();
      final Enumeration en = resources.getKeys();
      while (en.hasMoreElements())
      {
        try
        {
          final String keyName = (String) en.nextElement();
          defaults.put(keyName, resources.getObject(keyName));
        }
        catch (Exception e)
        {
          // Ignored; if it happens, we would not care that much ..
        }
View Full Code Here

   * @param harness  the test harness (<code>null</code> not allowed).
   */
  public void test(TestHarness harness)
  {
    MyBasicLookAndFeel laf = new MyBasicLookAndFeel();
    UIDefaults defaults = new UIDefaults();
    laf.initSystemColorDefaults(defaults);
    harness.check(defaults.get("activeCaption"), new ColorUIResource(0, 0, 128));
    harness.check(defaults.get("activeCaptionBorder"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("activeCaptionText"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("control"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("controlDkShadow"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("controlHighlight"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("controlLtHighlight"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("controlShadow"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("controlText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("desktop"), new ColorUIResource(0, 92, 92));
    harness.check(defaults.get("inactiveCaption"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("inactiveCaptionBorder"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("inactiveCaptionText"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("info"), new ColorUIResource(255, 255, 225));
    harness.check(defaults.get("infoText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("menu"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("menuText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("scrollbar"), new ColorUIResource(224, 224, 224));
    harness.check(defaults.get("text"), new ColorUIResource(192, 192, 192));
    harness.check(defaults.get("textHighlight"), new ColorUIResource(0, 0, 128));
    harness.check(defaults.get("textHighlightText"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("textInactiveText"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("textText"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("window"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("windowBorder"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("windowText"), new ColorUIResource(0, 0, 0));
  }
View Full Code Here

  {
    // TODO: there are a lot of 'instanceof' checks in here.  Those are weak
    // tests, try to strengthen them.

    MyBasicLookAndFeel laf = new MyBasicLookAndFeel();
    UIDefaults defaults = new UIDefaults();
    laf.initComponentDefaults(defaults);
       
    harness.checkPoint("AuditoryCues");
    harness.check(defaults.get("AuditoryCues.allAuditoryCues") != null);
    harness.check(defaults.get("AuditoryCues.cueList") != null);
    harness.check(defaults.get("AuditoryCues.noAuditoryCues") != null);
   
    harness.checkPoint("Button");
    CompoundBorderUIResource b1 = (CompoundBorderUIResource) defaults.get("Button.border");
    harness.check(b1.getInsideBorder() instanceof MarginBorder);
    harness.check(b1.getOutsideBorder() instanceof ButtonBorder);
    harness.check(defaults.get("Button.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Button.margin"), new InsetsUIResource(2, 14, 2, 14));
    harness.check(defaults.get("Button.textIconGap"), new Integer(4));
    harness.check(defaults.get("Button.textShiftOffset"), new Integer(0));
    harness.check(defaults.get("Button.focusInputMap") instanceof InputMapUIResource);
    Object b = UIManager.get("Button.focusInputMap");
    InputMapUIResource bim = (InputMapUIResource) b;
    KeyStroke[] kb = bim.keys();
    harness.check(kb.length == 2);
    harness.check(bim.get(KeyStroke.getKeyStroke("SPACE")), "pressed");
    harness.check(bim.get(KeyStroke.getKeyStroke("released SPACE")), "released");
   
    harness.checkPoint("CheckBox");
    CompoundBorderUIResource b2 = (CompoundBorderUIResource) defaults.get("CheckBox.border");
    harness.check(b2.getInsideBorder() instanceof MarginBorder);
    harness.check(b2.getOutsideBorder() instanceof ButtonBorder);
    harness.check(defaults.get("CheckBox.focusInputMap") instanceof InputMapUIResource);
    Object c = UIManager.get("CheckBox.focusInputMap");
    InputMapUIResource cim = (InputMapUIResource) c;
    KeyStroke[] kc = cim.keys();
    harness.check(kc.length == 2);
    harness.check(cim.get(KeyStroke.getKeyStroke("SPACE")), "pressed");
    harness.check(cim.get(KeyStroke.getKeyStroke("released SPACE")), "released");
    harness.check(defaults.get("CheckBox.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("CheckBox.icon") instanceof Icon);
    harness.check(defaults.get("CheckBox.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("CheckBox.textIconGap"), new Integer(4));
    harness.check(defaults.get("CheckBox.textShiftOffset"), new Integer(0));
   
    harness.checkPoint("CheckBoxMenuItem");
    harness.check(defaults.get("CheckBoxMenuItem.acceleratorFont"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("CheckBoxMenuItem.arrowIcon") instanceof Icon);
    harness.check(defaults.get("CheckBoxMenuItem.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("CheckBoxMenuItem.borderPainted"), Boolean.FALSE);
    harness.check(defaults.get("CheckBoxMenuItem.checkIcon") instanceof Icon);
    harness.check(defaults.get("CheckBoxMenuItem.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("CheckBoxMenuItem.margin"), new InsetsUIResource(2, 2, 2, 2));
   
    harness.checkPoint("ColorChooser");
    harness.check(defaults.get("ColorChooser.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ColorChooser.rgbBlueMnemonic"), "66");
    harness.check(defaults.get("ColorChooser.rgbGreenMnemonic"), "78");
    harness.check(defaults.get("ColorChooser.rgbRedMnemonic"), "68");
    harness.check(defaults.get("ColorChooser.swatchesRecentSwatchSize"), new Dimension(10, 10));
    harness.check(defaults.get("ColorChooser.swatchesSwatchSize"), new Dimension(10, 10));
   
    harness.checkPoint("ComboBox");
    harness.check(defaults.get("ComboBox.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ComboBox.font"), new FontUIResource("SansSerif", Font.PLAIN, 12));
   
    harness.checkPoint("Desktop");
    harness.check(defaults.get("Desktop.ancestorInputMap") instanceof InputMapUIResource);
   
    harness.checkPoint("DesktopIcon");
    harness.check(defaults.get("DesktopIcon.border") instanceof BorderUIResource.CompoundBorderUIResource);
       
    harness.checkPoint("EditorPane");
    harness.check(defaults.get("EditorPane.background"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("EditorPane.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("EditorPane.caretBlinkRate"), new Integer(500));
    harness.check(defaults.get("EditorPane.font"), new FontUIResource("Serif", Font.PLAIN, 12));
    harness.check(defaults.get("EditorPane.margin"), new InsetsUIResource(3, 3, 3, 3));
    Object e = UIManager.get("EditorPane.focusInputMap");
    InputMapUIResource eim = (InputMapUIResource) e;
    KeyStroke[] ke = eim.keys();
    harness.check(ke.length == 55);
    harness.check(eim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selection-up");
    harness.check(eim.get(KeyStroke.getKeyStroke("DOWN")), "caret-down");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl T")), "previous-link-action");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
    harness.check(eim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "selection-page-up");
    harness.check(eim.get(KeyStroke.getKeyStroke("KP_UP")), "caret-up");
    harness.check(eim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl HOME")), "caret-begin");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl END")), "caret-end");
    harness.check(eim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
    harness.check(eim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "activate-link-action");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
    harness.check(eim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
    harness.check(eim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "selection-page-left");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift DOWN")), "selection-down");
    harness.check(eim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "page-down");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "selection-page-right");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
    harness.check(eim.get(KeyStroke.getKeyStroke("KP_DOWN")), "caret-down");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selection-end");
    harness.check(eim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("ctrl T")), "next-link-action");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selection-down");
    harness.check(eim.get(KeyStroke.getKeyStroke("TAB")), "insert-tab");
    harness.check(eim.get(KeyStroke.getKeyStroke("UP")), "caret-up");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selection-begin");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "selection-page-down");
    harness.check(eim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
    harness.check(eim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
    harness.check(eim.get(KeyStroke.getKeyStroke("PAGE_UP")), "page-up");
    harness.check(eim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
   
    harness.checkPoint("FileChooser");
    harness.check(defaults.get("FileChooser.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("FileChooser.cancelButtonMnemonic"), "67");
    harness.check(defaults.get("FileChooser.directoryOpenButtonMnemonic"), "79");
    harness.check(defaults.get("FileChooser.helpButtonMnemonic"), "72");
    harness.check(defaults.get("FileChooser.openButtonMnemonic"), "79");
    harness.check(defaults.get("FileChooser.saveButtonMnemonic"), "83");
    harness.check(defaults.get("FileChooser.updateButtonMnemonic"), "85");

    harness.checkPoint("FileView");

    harness.checkPoint("FormattedTextField");
    harness.check(defaults.get("FormattedTextField.border") instanceof BasicBorders.FieldBorder);
    harness.check(defaults.get("FormattedTextField.caretBlinkRate"), new Integer(500));
    harness.check(defaults.get("FormattedTextField.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("FormattedTextField.font"), new FontUIResource("SansSerif", Font.PLAIN, 12));
    harness.check(defaults.get("FormattedTextField.margin"), new InsetsUIResource(0, 0, 0, 0));
    Object f = UIManager.get("FormattedTextField.focusInputMap");
    InputMapUIResource fim = (InputMapUIResource) f;
    KeyStroke[] kf = fim.keys();
    harness.check(kf.length == 38);
    harness.check(fim.get(KeyStroke.getKeyStroke("KP_UP")), "increment");
    harness.check(fim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl  O")), "toggle-componentOrientation");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
    harness.check(fim.get(KeyStroke.getKeyStroke("KP_DOWN")), "decrement");
    harness.check(fim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
    harness.check(fim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
    harness.check(fim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
    harness.check(fim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
    harness.check(fim.get(KeyStroke.getKeyStroke("UP")), "increment");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
    harness.check(fim.get(KeyStroke.getKeyStroke("ESCAPE")), "reset-field-edit");
    harness.check(fim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("DOWN")), "decrement");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
    harness.check(fim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
    harness.check(fim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
    harness.check(fim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
    harness.check(fim.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept");
    harness.check(fim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
   
    harness.checkPoint("InternalFrame");
    harness.check(defaults.get("InternalFrame.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("InternalFrame.closeIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.iconifyIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.maximizeIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.minimizeIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.titleFont"), new FontUIResource("Dialog", Font.BOLD, 12));
    harness.check(defaults.get("InternalFrame.windowBindings") instanceof Object[]);

    harness.checkPoint("Label");
    harness.check(defaults.get("Label.disabledForeground"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("Label.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.checkPoint("List");
    harness.check(defaults.get("List.cellRenderer") instanceof ListCellRenderer);
    harness.check(defaults.get("List.focusCellHighlightBorder") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("List.focusInputMap") instanceof InputMapUIResource);
    Object l = UIManager.get("List.focusInputMap");
    InputMapUIResource lim = (InputMapUIResource) l;
    KeyStroke[] kl = lim.keys();
    harness.check(kl.length == 61);
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl DOWN")), "selectNextRowChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift UP")), "selectPreviousRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "selectNextColumnChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selectPreviousColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selectPreviousRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("DOWN")), "selectNextRow");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl UP")), "selectPreviousRowChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "selectPreviousColumnChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("CUT")), "cut");
    harness.check(lim.get(KeyStroke.getKeyStroke("END")), "selectLastRow");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "scrollUpExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("KP_UP")), "selectPreviousRow");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl UP")), "selectPreviousRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl HOME")), "selectFirstRowChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift LEFT")), "selectPreviousColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl END")), "selectLastRowChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "scrollDownChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selectNextColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("LEFT")), "selectPreviousColumn");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl PAGE_UP")), "scrollUpChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("KP_LEFT")), "selectPreviousColumn");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selectNextColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("SPACE")), "addToSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "toggleAndAnchor");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift SPACE")), "extendTo");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl SPACE")), "moveSelectionTo");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl DOWN")), "selectNextRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "clearSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift HOME")), "selectFirstRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("RIGHT")), "selectNextColumn");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "scrollUpExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift DOWN")), "selectNextRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "scrollDown");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_UP")), "selectPreviousRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selectPreviousColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl X")), "cut");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "scrollDownExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl SLASH")), "selectAll");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl C")), "copy");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "selectNextColumnChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift END")), "selectLastRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_DOWN")), "selectNextRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "selectPreviousColumnChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("HOME")), "selectFirstRow");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl V")), "paste");
    harness.check(lim.get(KeyStroke.getKeyStroke("KP_DOWN")), "selectNextRow");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_DOWN")), "selectNextRowChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selectNextColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl A")), "selectAll");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selectLastRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("COPY")), "copy");
    harness.check(lim.get(KeyStroke.getKeyStroke("ctrl KP_UP")), "selectPreviousRowChangeLead");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selectPreviousColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selectNextRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("UP")), "selectPreviousRow");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selectFirstRowExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "scrollDownExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "selectNextColumn");
    harness.check(lim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selectNextColumnExtendSelection");
    harness.check(lim.get(KeyStroke.getKeyStroke("PAGE_UP")), "scrollUp");
    harness.check(lim.get(KeyStroke.getKeyStroke("PASTE")), "paste");
   
    harness.check(defaults.get("List.focusInputMap.RightToLeft") instanceof InputMapUIResource);
    harness.check(defaults.get("List.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
   
    harness.checkPoint("Menu");
    harness.check(defaults.get("Menu.acceleratorFont"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Menu.arrowIcon") instanceof Icon);
    harness.check(defaults.get("Menu.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("Menu.borderPainted"), Boolean.FALSE);
    harness.check(defaults.get("Menu.checkIcon") instanceof Icon);
    harness.check(defaults.get("Menu.crossMenuMnemonic"), Boolean.TRUE);
    harness.check(defaults.get("Menu.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Menu.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("Menu.menuPopupOffsetX"), new Integer(0));
    harness.check(defaults.get("Menu.menuPopupOffsetY"), new Integer(0));
    int[] shortcuts = (int[]) defaults.get("Menu.shortcutKeys");
    if (shortcuts == null)
      shortcuts = new int[] { 999 }// to prevent NullPointerException
    harness.check(shortcuts.length, 1);
    harness.check(shortcuts[0], 8);
    harness.check(defaults.get("Menu.submenuPopupOffsetX"), new Integer(0));
    harness.check(defaults.get("Menu.submenuPopupOffsetY"), new Integer(0));
   
    harness.checkPoint("MenuBar");
    harness.check(defaults.get("MenuBar.border") instanceof BasicBorders.MenuBarBorder);
    harness.check(defaults.get("MenuBar.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("MenuBar.windowBindings") instanceof Object[]);
   
    harness.checkPoint("MenuItem");
    harness.check(defaults.get("MenuItem.acceleratorDelimiter"), "+");
    harness.check(defaults.get("MenuItem.acceleratorFont"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("MenuItem.arrowIcon") instanceof Icon);
    harness.check(defaults.get("MenuItem.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("MenuItem.borderPainted"), Boolean.FALSE);
    harness.check(defaults.get("MenuItem.checkIcon") instanceof Icon);
    harness.check(defaults.get("MenuItem.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("MenuItem.margin"), new InsetsUIResource(2, 2, 2, 2));
   
    harness.checkPoint("OptionPane");
    harness.check(defaults.get("OptionPane.border") instanceof BorderUIResource.EmptyBorderUIResource);
    harness.check(defaults.get("OptionPane.buttonAreaBorder") instanceof BorderUIResource.EmptyBorderUIResource);
    harness.check(defaults.get("OptionPane.buttonClickThreshhold"), new Integer(500));
    harness.check(defaults.get("OptionPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("OptionPane.messageAreaBorder") instanceof BorderUIResource.EmptyBorderUIResource);
    harness.check(defaults.get("OptionPane.minimumSize"), new DimensionUIResource(262, 90));
    harness.check(defaults.get("OptionPane.windowBindings") instanceof Object[]);

    harness.checkPoint("Panel");
    harness.check(defaults.get("Panel.font"), new FontUIResource("Dialog", Font.PLAIN, 12));

    harness.checkPoint("PasswordField");
    harness.check(defaults.get("PasswordField.border") instanceof BasicBorders.FieldBorder);
    harness.check(defaults.get("PasswordField.caretBlinkRate"), new Integer(500));
    harness.check(defaults.get("PasswordField.font"), new FontUIResource("MonoSpaced", Font.PLAIN, 12));
    harness.check(defaults.get("PasswordField.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(UIManager.get("PasswordField.focusInputMap") instanceof InputMapUIResource);
    Object o = UIManager.get("PasswordField.focusInputMap");
    InputMapUIResource im = (InputMapUIResource) o;
    KeyStroke[] k = im.keys();
    harness.check(k.length == 33);
    harness.check(im.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
  harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation");
  harness.check(im.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
  harness.check(im.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
  harness.check(im.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
  harness.check(im.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
  harness.check(im.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
  harness.check(im.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
  harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-end-line");
  harness.check(im.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
  harness.check(im.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
  harness.check(im.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
  harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-begin-line");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-begin-line");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-end-line");
  harness.check(im.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
  harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-end-line");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
  harness.check(im.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
  harness.check(im.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-begin-line");
  harness.check(im.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
  harness.check(im.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-begin-line");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
  harness.check(im.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
  harness.check(im.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-end-line");
  harness.check(im.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
  harness.check(im.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept");
  harness.check(im.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
   
    harness.checkPoint("PopupMenu");
    harness.check(defaults.get("PopupMenu.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("PopupMenu.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    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.border") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("ProgressBar.cellLength"), new Integer(1));
    harness.check(defaults.get("ProgressBar.cellSpacing"), new Integer(0));
    harness.check(defaults.get("ProgressBar.cycleTime"), new Integer(3000));
    harness.check(defaults.get("ProgressBar.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ProgressBar.repaintInterval"), new Integer(50));
   
    harness.checkPoint("RadioButton");
    harness.check(defaults.get("RadioButton.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("RadioButton.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("RadioButton.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("RadioButton.icon") instanceof Icon);
    harness.check(defaults.get("RadioButton.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("RadioButton.textIconGap"), new Integer(4));
    harness.check(defaults.get("RadioButton.textShiftOffset"), new Integer(0));
   
    harness.checkPoint("RadioButtonMenuItem");
    harness.check(defaults.get("RadioButtonMenuItem.acceleratorFont"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("RadioButtonMenuItem.arrowIcon") instanceof Icon);
    harness.check(defaults.get("RadioButtonMenuItem.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("RadioButtonMenuItem.borderPainted"), Boolean.FALSE);
    harness.check(defaults.get("RadioButtonMenuItem.checkIcon") instanceof Icon);
    harness.check(defaults.get("RadioButtonMenuItem.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("RadioButtonMenuItem.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("RootPane.defaultButtonWindowKeyBindings") instanceof Object[]);
   
    harness.checkPoint("ScrollBar");
    harness.check(defaults.get("ScrollBar.background"), new ColorUIResource(224, 224, 224));
    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.width"), new Integer(16));
   
    harness.check(defaults.get("ScrollPane.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ScrollPane.ancestorInputMap.RightToLeft") instanceof InputMapUIResource);
    harness.check(defaults.get("ScrollPane.border") instanceof BasicBorders.FieldBorder);
    harness.check(defaults.get("ScrollPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
   
    harness.checkPoint("Slider");
    InputMap map = (InputMap) defaults.get("Slider.focusInputMap");
    KeyStroke[] keys = map.keys();
    InputMap focusInputMap = (InputMap) defaults.get("Slider.focusInputMap");
    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(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");
   
    InputMap rightToLeftMap = (InputMap) defaults.get("Slider.focusInputMap.RightToLeft");
    keys = rightToLeftMap != null ? rightToLeftMap.keys() : new KeyStroke[] {};
    keyList = Arrays.asList(keys);
    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(2, 2, 2, 2));
   
    harness.checkPoint("Spinner");
    harness.check(defaults.get("Spinner.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Spinner.arrowButtonSize"), new DimensionUIResource(16, 5));
    harness.check(defaults.get("Spinner.border") instanceof BasicBorders.FieldBorder);
    harness.check(defaults.get("Spinner.editorBorderPainted"), Boolean.FALSE);
    harness.check(defaults.get("Spinner.font"), new FontUIResource("MonoSpaced", Font.PLAIN, 12));
   
    harness.checkPoint("SplitPane");
    harness.check(defaults.get("SplitPane.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("SplitPane.border") instanceof BasicBorders.SplitPaneBorder);
    harness.check(defaults.get("SplitPane.dividerSize"), new Integer(7));
   
    harness.checkPoint("SplitPaneDivider");
    harness.check(defaults.get("SplitPaneDivider.border") instanceof Border);
   
    harness.checkPoint("TabbedPane");
    harness.check(defaults.get("TabbedPane.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("TabbedPane.contentBorderInsets"), new InsetsUIResource(2, 2, 3, 3));
    harness.check(defaults.get("TabbedPane.focusInputMap") instanceof InputMapUIResource);
    Object tab = UIManager.get("TabbedPane.focusInputMap");
    InputMapUIResource tabim = (InputMapUIResource) tab;
    harness.check(tabim.keys().length == 10);
    harness.check(tabim.get(KeyStroke.getKeyStroke("ctrl DOWN")),"requestFocusForVisibleComponent");
    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_UP")),"navigateUp");
    harness.check(tabim.get(KeyStroke.getKeyStroke("LEFT")),"navigateLeft");
    harness.check(tabim.get(KeyStroke.getKeyStroke("ctrl KP_DOWN")),"requestFocusForVisibleComponent");
    harness.check(tabim.get(KeyStroke.getKeyStroke("UP")),"navigateUp");
    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_DOWN")),"navigateDown");
    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_LEFT")),"navigateLeft");
    harness.check(tabim.get(KeyStroke.getKeyStroke("RIGHT")),"navigateRight");
    harness.check(tabim.get(KeyStroke.getKeyStroke("KP_RIGHT")),"navigateRight");
    harness.check(tabim.get(KeyStroke.getKeyStroke("DOWN")),"navigateDown");
    harness.check(defaults.get("TabbedPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("TabbedPane.selectedTabPadInsets"), new InsetsUIResource(2, 2, 2, 1));
    harness.check(defaults.get("TabbedPane.tabAreaInsets"), new InsetsUIResource(3, 2, 0, 2));
    harness.check(defaults.get("TabbedPane.tabInsets"), new InsetsUIResource(0, 4, 1, 4));
    harness.check(defaults.get("TabbedPane.tabRunOverlay"), new Integer(2));
    harness.check(defaults.get("TabbedPane.textIconGap"), new Integer(4));
   
    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.focusCellHighlightBorder") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("Table.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Table.gridColor"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("Table.scrollPaneBorder") instanceof BorderUIResource.BevelBorderUIResource);
   
    harness.checkPoint("TableHeader");
    harness.check(defaults.get("TableHeader.cellBorder"), null);
    harness.check(defaults.get("TableHeader.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
   
    harness.checkPoint("TextArea");
    harness.check(defaults.get("TextArea.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("TextArea.caretBlinkRate"), new Integer(500));
    harness.check(defaults.get("TextArea.font"), new FontUIResource("MonoSpaced", Font.PLAIN, 12));
    harness.check(defaults.get("TextArea.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(UIManager.get("TextArea.focusInputMap") instanceof InputMapUIResource);
    Object ta = UIManager.get("TextArea.focusInputMap");
    InputMapUIResource taim = (InputMapUIResource) ta;
    harness.check(taim.keys().length == 55);
    harness.check(taim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selection-up");
    harness.check(taim.get(KeyStroke.getKeyStroke("DOWN")), "caret-down");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl T")), "previous-link-action");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
    harness.check(taim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "selection-page-up");
    harness.check(taim.get(KeyStroke.getKeyStroke("KP_UP")), "caret-up");
    harness.check(taim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl HOME")), "caret-begin");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl END")), "caret-end");
    harness.check(taim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
    harness.check(taim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "activate-link-action");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
    harness.check(taim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
    harness.check(taim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "selection-page-left");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift DOWN")), "selection-down");
    harness.check(taim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "page-down");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "selection-page-right");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
    harness.check(taim.get(KeyStroke.getKeyStroke("KP_DOWN")), "caret-down");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selection-end");
    harness.check(taim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("ctrl T")), "next-link-action");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selection-down");
    harness.check(taim.get(KeyStroke.getKeyStroke("TAB")), "insert-tab");
    harness.check(taim.get(KeyStroke.getKeyStroke("UP")), "caret-up");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selection-begin");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "selection-page-down");
    harness.check(taim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
    harness.check(taim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
    harness.check(taim.get(KeyStroke.getKeyStroke("PAGE_UP")), "page-up");
    harness.check(taim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");  
   
    harness.checkPoint("TextField");
    harness.check(defaults.get("TextField.border") instanceof BasicBorders.FieldBorder);
    harness.check(defaults.get("TextField.caretBlinkRate"), new Integer(500));
    harness.check(defaults.get("TextField.font"), new FontUIResource("SansSerif", Font.PLAIN, 12));
    harness.check(defaults.get("TextField.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(UIManager.get("TextField.focusInputMap") instanceof InputMapUIResource);
    Object tf = UIManager.get("TextField.focusInputMap");
    InputMapUIResource tfim = (InputMapUIResource) tf;
    harness.check(tfim.keys().length == 33);
    harness.check(tfim.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept");
    harness.check(tfim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
    harness.check(tfim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
    harness.check(tfim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
    harness.check(tfim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
    harness.check(tfim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
 
    harness.checkPoint("TextPane");
    harness.check(defaults.get("TextPane.background"), new ColorUIResource(255, 255, 255));
    harness.check(defaults.get("TextPane.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.get("TextPane.caretBlinkRate"), new Integer(500));
    harness.check(defaults.get("TextPane.font"), new FontUIResource("Serif", Font.PLAIN, 12));
    harness.check(defaults.get("TextPane.margin"), new InsetsUIResource(3, 3, 3, 3));
    harness.check(UIManager.get("TextPane.focusInputMap") instanceof InputMapUIResource);
    Object tp = UIManager.get("TextPane.focusInputMap");
    InputMapUIResource tpim = (InputMapUIResource) tp;
    harness.check(tpim.keys().length == 55);
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift UP")), "selection-up");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "caret-next-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl LEFT")), "selection-previous-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selection-up");
    harness.check(tpim.get(KeyStroke.getKeyStroke("DOWN")), "caret-down");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl T")), "previous-link-action");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "caret-previous-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("CUT")), "cut-to-clipboard");
    harness.check(tpim.get(KeyStroke.getKeyStroke("END")), "caret-end-line");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "selection-page-up");
    harness.check(tpim.get(KeyStroke.getKeyStroke("KP_UP")), "caret-up");
    harness.check(tpim.get(KeyStroke.getKeyStroke("DELETE")), "delete-next");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl HOME")), "caret-begin");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift LEFT")), "selection-backward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl END")), "caret-end");
    harness.check(tpim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl RIGHT")), "selection-next-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("KP_LEFT")), "caret-backward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_RIGHT")), "selection-forward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "activate-link-action");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl H")), "delete-previous");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "unselect");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ENTER")), "insert-break");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift HOME")), "selection-begin-line");
    harness.check(tpim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "selection-page-left");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift DOWN")), "selection-down");
    harness.check(tpim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "page-down");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_LEFT")), "selection-backward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl O")), "toggle-componentOrientation");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "selection-page-right");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl C")), "copy-to-clipboard");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "caret-next-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift END")), "selection-end-line");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "caret-previous-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("HOME")), "caret-begin-line");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl V")), "paste-from-clipboard");
    harness.check(tpim.get(KeyStroke.getKeyStroke("KP_DOWN")), "caret-down");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl A")), "select-all");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift RIGHT")), "selection-forward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selection-end");
    harness.check(tpim.get(KeyStroke.getKeyStroke("COPY")), "copy-to-clipboard");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl KP_LEFT")), "selection-previous-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("ctrl T")), "next-link-action");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selection-down");
    harness.check(tpim.get(KeyStroke.getKeyStroke("TAB")), "insert-tab");
    harness.check(tpim.get(KeyStroke.getKeyStroke("UP")), "caret-up");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selection-begin");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "selection-page-down");
    harness.check(tpim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "caret-forward");
    harness.check(tpim.get(KeyStroke.getKeyStroke("shift ctrl KP_RIGHT")), "selection-next-word");
    harness.check(tpim.get(KeyStroke.getKeyStroke("PAGE_UP")), "page-up");
    harness.check(tpim.get(KeyStroke.getKeyStroke("PASTE")), "paste-from-clipboard");
   
    harness.checkPoint("TitledBorder");
    harness.check(defaults.get("TitledBorder.border") instanceof BorderUIResource.EtchedBorderUIResource);
    harness.check(defaults.get("TitledBorder.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
   
    harness.checkPoint("ToggleButton");
    harness.check(defaults.get("ToggleButton.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("ToggleButton.focusInputMap") instanceof InputMapUIResource);
    Object to = UIManager.get("ToggleButton.focusInputMap");
    InputMapUIResource toim = (InputMapUIResource) to;
    harness.check(toim.keys().length == 2);
    harness.check(toim.get(KeyStroke.getKeyStroke("SPACE"))"pressed");
    harness.check(toim.get(KeyStroke.getKeyStroke("released SPACE")), "released");
    harness.check(defaults.get("ToggleButton.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ToggleButton.margin"), new InsetsUIResource(2, 14, 2, 14));
    harness.check(defaults.get("ToggleButton.textIconGap"), new Integer(4));
    harness.check(defaults.get("ToggleButton.textShiftOffset"), new Integer(0));
   
    harness.checkPoint("ToolBar");
    harness.check(defaults.get("ToolBar.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ToolBar.border") instanceof BorderUIResource.EtchedBorderUIResource);
    harness.check(defaults.get("ToolBar.dockingForeground"), new ColorUIResource(255, 0, 0));
    harness.check(defaults.get("ToolBar.floatingForeground"), new ColorUIResource(64, 64, 64));
    harness.check(defaults.get("ToolBar.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ToolBar.separatorSize"), new DimensionUIResource(10, 10));
   
    harness.checkPoint("ToolTip");
    harness.check(defaults.get("ToolTip.border") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("ToolTip.font"), new FontUIResource("SansSerif", Font.PLAIN, 12));
   
    harness.checkPoint("Tree");
    harness.check(defaults.get("Tree.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Tree.changeSelectionWithFocus"), Boolean.TRUE);
    harness.check(defaults.get("Tree.drawsFocusBorderAroundIcon"), Boolean.FALSE);
    harness.check(defaults.get("Tree.editorBorder") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("Tree.focusInputMap") instanceof InputMapUIResource);
    Object tr = UIManager.get("Tree.focusInputMap");
    InputMapUIResource trim = (InputMapUIResource) tr;
    harness.check(trim.keys().length == 56);
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl DOWN")), "selectNextChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift UP")), "selectPreviousExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl RIGHT")), "scrollRight");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift KP_UP")), "selectPreviousExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("DOWN")), "selectNext");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl UP")), "selectPreviousChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl LEFT")), "scrollLeft");
  harness.check(trim.get(KeyStroke.getKeyStroke("CUT")), "cut");
  harness.check(trim.get(KeyStroke.getKeyStroke("END")), "selectLast");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift PAGE_UP")), "scrollUpExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("KP_UP")), "selectPrevious");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl UP")), "selectPreviousExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl HOME")), "selectFirstChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl END")), "selectLastChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl PAGE_DOWN")), "scrollDownChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("LEFT")), "selectParent");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl PAGE_UP")), "scrollUpChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("KP_LEFT")), "selectParent");
  harness.check(trim.get(KeyStroke.getKeyStroke("SPACE")), "addToSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl SPACE")), "toggleAndAnchor");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift SPACE")), "extendTo");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl SPACE")), "moveSelectionTo");
  harness.check(trim.get(KeyStroke.getKeyStroke("ADD")), "expand");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl BACK_SLASH")), "clearSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl DOWN")), "selectNextExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift HOME")), "selectFirstExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("RIGHT")), "selectChild");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_UP")), "scrollUpExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift DOWN")), "selectNextExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("PAGE_DOWN")), "scrollDownChangeSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl KP_UP")), "selectPreviousExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("SUBTRACT")), "collapse");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl X")), "cut");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN")), "scrollDownExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl SLASH")), "selectAll");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl C")), "copy");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_RIGHT")), "scrollRight");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift END")), "selectLastExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl KP_DOWN")), "selectNextExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_LEFT")), "scrollLeft");
  harness.check(trim.get(KeyStroke.getKeyStroke("HOME")), "selectFirst");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl V")), "paste");
  harness.check(trim.get(KeyStroke.getKeyStroke("KP_DOWN")), "selectNext");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl A")), "selectAll");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_DOWN")), "selectNextChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl END")), "selectLastExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("COPY")), "copy");
  harness.check(trim.get(KeyStroke.getKeyStroke("ctrl KP_UP")), "selectPreviousChangeLead");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift KP_DOWN")), "selectNextExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("UP")), "selectPrevious");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift ctrl HOME")), "selectFirstExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("shift PAGE_DOWN")), "scrollDownExtendSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("KP_RIGHT")), "selectChild");
  harness.check(trim.get(KeyStroke.getKeyStroke("F2")), "startEditing");
  harness.check(trim.get(KeyStroke.getKeyStroke("PAGE_UP")), "scrollUpChangeSelection");
  harness.check(trim.get(KeyStroke.getKeyStroke("PASTE")), "paste");   
    harness.check(defaults.get("Tree.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Tree.hash"), new ColorUIResource(128, 128, 128));
    harness.check(defaults.get("Tree.leftChildIndent"), new Integer(7));
    harness.check(defaults.get("Tree.rightChildIndent"), new Integer(13));
    harness.check(defaults.get("Tree.rowHeight"), new Integer(16));
    harness.check(defaults.get("Tree.scrollsOnExpand"), Boolean.TRUE);
    harness.check(defaults.get("Tree.selectionBorderColor"), new ColorUIResource(0, 0, 0));
    harness.check(defaults.get("Tree.focusInputMap.RightToLeft") instanceof InputMapUIResource);

    harness.checkPoint("Viewport");
    harness.check(defaults.get("Viewport.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
  }
View Full Code Here

    // The following does not work, at least not with JDK1.5. Maybe
    // don't use the 'defaults' parameter anymore...
    // UIDefaults defaults = new UIDefaults();
    // laf.initComponentDefaults(defaults);
    UIDefaults defaults = laf.getDefaults();

    // TODO: in the following code, there are many 'instanceof' checks - these
    // are typically very weak tests.  Maybe they can be strengthened...
    // The color tests do not test for the real color values. This is
    // not possible. It merely tests which of the MetalTheme colors
    // is use here. See the TestTheme class above.
    harness.checkPoint("AuditoryCues");
    harness.check(defaults.get("AuditoryCues.allAuditoryCues") != null);
    harness.check(defaults.get("AuditoryCues.cueList") != null);
    harness.check(defaults.get("AuditoryCues.defaultCueList") != null);
    harness.check(defaults.get("AuditoryCues.noAuditoryCues") != null);
   
    harness.checkPoint("Button");
    harness.check(defaults.get("Button.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("Button.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("Button.darkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("Button.disabledText"), new ColorUIResource(0, 0, 35));
    harness.check(defaults.get("Button.disabledToolBarBorderBackground"), null);
    harness.check(defaults.get("Button.focus"), new ColorUIResource(0, 0, 12));
    harness.check(defaults.get("Button.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Button.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("Button.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("Button.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("Button.light"), new ColorUIResource(0, 0, 7));
    Insets buttonMargin = defaults.getInsets("Button.margin");
    harness.check(buttonMargin instanceof UIResource);
    harness.check(buttonMargin, new InsetsUIResource(2, 14, 2, 14));
    harness.check(defaults.get("Button.select"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("Button.shadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("Button.textIconGap"), new Integer(4));
    harness.check(defaults.get("Button.textShiftOffset"), new Integer(0));
    harness.check(defaults.get("Button.toolBarBorderBackground"), null);

    harness.checkPoint("CheckBox");
    harness.check(defaults.get("CheckBox.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("CheckBox.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("CheckBox.disabledText"), new ColorUIResource(0, 0, 35));
    harness.check(defaults.get("CheckBox.focus"), new ColorUIResource(0, 0, 12));
    harness.check(defaults.get("CheckBox.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("CheckBox.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("CheckBox.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("CheckBox.icon") instanceof Icon);
    harness.check(defaults.get("CheckBox.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("Checkbox.select"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("CheckBox.textIconGap"), new Integer(4));
    harness.check(defaults.get("CheckBox.textShiftOffset"), new Integer(0));

    harness.checkPoint("CheckBoxMenuItem");
    harness.check(defaults.get("CheckBoxMenuItem.acceleratorFont"), new Font("Dialog", Font.PLAIN, 10));
    harness.check(defaults.get("CheckBoxMenuItem.acceleratorForeground"), new ColorUIResource(0, 0, 1));
    harness.check(defaults.get("CheckBoxMenuItem.acceleratorSelectionForeground"), new ColorUIResource(0, 0, 2));
    harness.check(defaults.get("CheckBoxMenuItem.arrowIcon") instanceof Icon);
    harness.check(defaults.get("CheckBoxMenuItem.background"), new ColorUIResource(0, 0, 15));
//    harness.check(defaults.get("CheckBoxMenuItem.border") instanceof MetalBorders.MenuItemBorder);
    harness.check(defaults.get("CheckBoxMenuItem.borderPainted"), Boolean.TRUE);
    harness.check(defaults.get("CheckBoxMenuItem.checkIcon") instanceof Icon);
    harness.check(defaults.get("CheckBoxMenuItem.commandSound"), "sounds/MenuItemCommand.wav");
    harness.check(defaults.get("CheckBoxMenuItem.disabledForeground"), new ColorUIResource(0, 0, 16));
    harness.check(defaults.get("CheckBoxMenuItem.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("CheckBoxMenuItem.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("CheckBoxMenuItem.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("CheckBoxMenuItem.selectionBackground"), new ColorUIResource(0, 0, 18));
    harness.check(defaults.get("CheckBoxMenuItem.selectionForeground"), new ColorUIResource(0, 0, 19));
    harness.check(defaults.get("CheckBoxMenuItem.select"), null);

    harness.checkPoint("ColorChooser");
    harness.check(defaults.get("ColorChooser.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ColorChooser.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("ColorChooser.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.getInt("ColorChooser.rgbBlueMnemonic"), 0);
    harness.check(defaults.getInt("ColorChooser.rgbGreenMnemonic"), 0);
    harness.check(defaults.getInt("ColorChooser.rgbRedMnemonic"), 0);
    harness.check(defaults.get("ColorChooser.swatchesDefaultRecentColor"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ColorChooser.swatchesRecentSwatchSize"), new Dimension(10, 10));
    harness.check(defaults.get("ColorChooser.swatchesSwatchSize"), new Dimension(10, 10));

    harness.checkPoint("ComboBox");
    harness.check(defaults.get("ComboBox.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("ComboBox.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ComboBox.buttonBackground"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ComboBox.buttonDarkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("ComboBox.buttonHighlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("ComboBox.buttonShadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("ComboBox.disabledBackground"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("ComboBox.disabledForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("ComboBox.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("ComboBox.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("ComboBox.selectionBackground"), new ColorUIResource(0, 0, 24));
    harness.check(defaults.get("ComboBox.selectionForeground"), new ColorUIResource(0, 0, 10));
   
    harness.checkPoint("Desktop");
    harness.check(defaults.get("Desktop.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Desktop.background"), new ColorUIResource(0, 0, 11));
   
    harness.checkPoint("DesktopIcon");
    harness.check(defaults.get("DesktopIcon.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("DesktopIcon.border") instanceof BorderUIResource.CompoundBorderUIResource);
    harness.check(defaults.get("DesktopIcon.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("DesktopIcon.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.getInt("DesktopIcon.width"), 160);
   
    harness.checkPoint("EditorPane");
    harness.check(defaults.get("EditorPane.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("EditorPane.border") instanceof BasicBorders.MarginBorder);
    harness.check(defaults.getInt("EditorPane.caretBlinkRate"), 500);
    harness.check(defaults.get("EditorPane.caretForeground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("EditorPane.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("EditorPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("EditorPane.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("EditorPane.inactiveForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("EditorPane.margin"), new InsetsUIResource(3, 3, 3, 3));
    harness.check(defaults.get("EditorPane.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("EditorPane.selectionForeground"), new ColorUIResource(0, 0, 13));
   
    harness.checkPoint("FileChooser");
    harness.check(defaults.get("FileChooser.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.getInt("FileChooser.cancelButtonMnemonic"), 0);
    harness.check(defaults.get("FileChooser.detailsViewIcon") instanceof Icon);
    harness.check(defaults.getInt("FileChooser.directoryOpenButtonMnemonic"), 0);
    harness.check(defaults.getInt("FileChooser.fileNameLabelMnemonic"), 78);
    harness.check(defaults.getInt("FileChooser.filesOfTypeLabelMnemonic"), 84);
    harness.check(defaults.getInt("FileChooser.helpButtonMnemonic"), 0);
    harness.check(defaults.get("FileChooser.homeFolderIcon") instanceof Icon);
    harness.check(defaults.get("FileChooser.listViewIcon") instanceof Icon);
    harness.check(defaults.getInt("FileChooser.lookInLabelMnemonic"), 73);
    harness.check(defaults.get("FileChooser.newFolderIcon") instanceof Icon);
    harness.check(defaults.getInt("FileChooser.openButtonMnemonic"), 0);
    harness.check(defaults.getInt("FileChooser.saveButtonMnemonic"), 0);
    harness.check(defaults.getInt("FileChooser.updateButtonMnemonic"), 0);
    harness.check(defaults.get("FileChooser.upFolderIcon") instanceof Icon);
   
    harness.checkPoint("FileView");
    harness.check(defaults.get("FileView.computerIcon"), MetalIconFactory.getTreeComputerIcon());
    harness.check(defaults.get("FileView.directoryIcon") instanceof MetalIconFactory.TreeFolderIcon);
    harness.check(defaults.get("FileView.fileIcon") instanceof MetalIconFactory.TreeLeafIcon);
    harness.check(defaults.get("FileView.floppyDriveIcon"), MetalIconFactory.getTreeFloppyDriveIcon());
    harness.check(defaults.get("FileView.hardDriveIcon"), MetalIconFactory.getTreeHardDriveIcon());
   
    harness.checkPoint("FormattedTextField");
    harness.check(defaults.get("FormattedTextField.background"), new ColorUIResource(0, 0, 30))
    harness.check(defaults.get("FormattedTextField.border") instanceof BorderUIResource.CompoundBorderUIResource)
    harness.check(defaults.getInt("FormattedTextField.caretBlinkRate"), 500);
    harness.check(defaults.get("FormattedTextField.caretForeground"), new ColorUIResource(0, 0, 29))
    harness.check(defaults.get("FormattedTextField.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("FormattedTextField.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("FormattedTextField.foreground"), new ColorUIResource(0, 0, 29))
    harness.check(defaults.get("FormattedTextField.inactiveBackground"), new ColorUIResource(0, 0, 4))
    harness.check(defaults.get("FormattedTextField.inactiveForeground"), new ColorUIResource(0, 0, 14))
    harness.check(defaults.get("FormattedTextField.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(defaults.get("FormattedTextField.selectionBackground"), new ColorUIResource(0, 0, 28))
    harness.check(defaults.get("FormattedTextField.selectionForeground"), new ColorUIResource(0, 0, 13))
   
    harness.checkPoint("InternalFrame");
//    harness.check(defaults.get("InternalFrame.border") instanceof MetalBorders.InternalFrameBorder);
    harness.check(defaults.get("InternalFrame.activeTitleBackground"), new ColorUIResource(0, 0, 31));
    harness.check(defaults.get("InternalFrame.activeTitleForeground"), new ColorUIResource(0, 0, 32));
    harness.check(defaults.get("InternalFrame.borderColor"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("InternalFrame.borderDarkShadow"), new ColorUIResource(0, 0, 5));
    harness.check(defaults.get("InternalFrame.borderHighlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("InternalFrame.borderLight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("InternalFrame.borderShadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("InternalFrame.closeIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.closeSound"), "sounds/FrameClose.wav");
    harness.check(defaults.get("InternalFrame.icon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.iconifyIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.inactiveTitleBackground"), new ColorUIResource(0, 0, 33));
    harness.check(defaults.get("InternalFrame.inactiveTitleForeground"), new ColorUIResource(0, 0, 34));
    harness.check(defaults.get("InternalFrame.maximizeIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.maximizeSound"), "sounds/FrameMaximize.wav");
    harness.check(defaults.get("InternalFrame.minimizeIcon") instanceof Icon);
    harness.check(defaults.get("InternalFrame.minimizeSound"), "sounds/FrameMinimize.wav");
//    harness.check(defaults.get("InternalFrame.optionDialogBorder") instanceof MetalBorders.OptionDialogBorder);
//    harness.check(defaults.get("InternalFrame.paletteBorder") instanceof MetalBorders.PaletteBorder);
    harness.check(defaults.get("InternalFrame.paletteCloseIcon") instanceof Icon);
    harness.check(defaults.getInt("InternalFrame.paletteTitleHeight"), 11);
    harness.check(defaults.get("InternalFrame.restoreDownSound"), "sounds/FrameRestoreDown.wav");
    harness.check(defaults.get("InternalFrame.restoreUpSound"), "sounds/FrameRestoreUp.wav");
    harness.check(defaults.get("InternalFrame.titleFont"), new FontUIResource("Dialog", Font.BOLD, 12));
   
    harness.checkPoint("Label");
    harness.check(defaults.get("Label.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("Label.disabledForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("Label.disabledShadow"), new ColorUIResource(0, 0, 9));
    harness.check(defaults.get("Label.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("Label.foreground"), new ColorUIResource(0, 0, 27));
   
    harness.checkPoint("List");
    harness.check(defaults.get("List.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("List.cellRenderer") instanceof ListCellRenderer);
    LineBorder lb = (LineBorder) defaults.getBorder("List.focusCellHighlightBorder");
    harness.check(lb instanceof BorderUIResource.LineBorderUIResource);
    harness.check(lb.getThickness(), 1);
    harness.check(lb.getLineColor(), MetalLookAndFeel.getFocusColor());
    harness.check(defaults.get("List.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("List.focusInputMap.RightToLeft") instanceof InputMapUIResource);
    harness.check(defaults.get("List.font"), new FontUIResource("Dialog", Font.PLAIN, 13));
    harness.check(defaults.get("List.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("List.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("List.selectionForeground"), new ColorUIResource(0, 0, 13));
   
    harness.checkPoint("Menu");
    harness.check(defaults.get("Menu.acceleratorFont"), new FontUIResource("Dialog", Font.PLAIN, 10));
    harness.check(defaults.get("Menu.acceleratorForeground"), new ColorUIResource(0, 0, 1));
    harness.check(defaults.get("Menu.acceleratorSelectionForeground"), new ColorUIResource(0, 0, 2));
    harness.check(defaults.get("Menu.arrowIcon") instanceof Icon);
//    harness.check(defaults.get("Menu.border") instanceof MetalBorders.MenuItemBorder);
    harness.check(defaults.get("Menu.background"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("Menu.borderPainted"), Boolean.TRUE);
    harness.check(defaults.get("Menu.checkIcon"), null);
    harness.check(defaults.get("Menu.crossMenuMnemonic"), Boolean.TRUE);
    harness.check(defaults.get("Menu.disabledForeground"), new ColorUIResource(0, 0, 16));
    harness.check(defaults.get("Menu.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("Menu.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("Menu.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.getInt("Menu.menuPopupOffsetX"), 0);
    harness.check(defaults.getInt("Menu.menuPopupOffsetY"), 0);
    harness.check(defaults.get("Menu.selectionBackground"), new ColorUIResource(0, 0, 18));
    harness.check(defaults.get("Menu.selectionForeground"), new ColorUIResource(0, 0, 19));
    int[] value = (int[]) defaults.get("Menu.shortcutKeys");
    harness.check(value != null ? value.length : 0, 1);
    harness.check(value != null ? value[0] : 0, 8);
    harness.check(defaults.getInt("Menu.submenuPopupOffsetX"), -4);
    harness.check(defaults.getInt("Menu.submenuPopupOffsetY"), -3);
   
    harness.checkPoint("MenuBar");
//    harness.check(defaults.get("MenuBar.border") instanceof MetalBorders.MenuBarBorder);
    harness.check(defaults.get("MenuBar.background"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("MenuBar.borderColor"), null);
    harness.check(defaults.get("MenuBar.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("MenuBar.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("MenuBar.highlight"), new ColorUIResource(0, 0, 7));
    harness.check(defaults.get("MenuBar.shadow"), new ColorUIResource(0, 0, 9));
    Object[] bindings = (Object[]) defaults.get("MenuBar.windowBindings");
    harness.check(bindings.length, 2);
    harness.check(bindings[0], "F10");
    harness.check(bindings[1], "takeFocus");
   
    harness.checkPoint("MenuItem");
    harness.check(defaults.get("MenuItem.acceleratorDelimiter"), "-");
    harness.check(defaults.get("MenuItem.acceleratorFont"), new FontUIResource("Dialog", Font.PLAIN, 10));
    harness.check(defaults.get("MenuItem.acceleratorForeground"), new ColorUIResource(0, 0, 1));
    harness.check(defaults.get("MenuItem.acceleratorSelectionForeground"), new ColorUIResource(0, 0, 2));
    harness.check(defaults.get("MenuItem.arrowIcon") instanceof Icon);
//    harness.check(defaults.get("MenuItem.border") instanceof MetalBorders.MenuItemBorder);
    harness.check(defaults.get("MenuItem.background"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("MenuItem.borderPainted"), Boolean.TRUE);
    harness.check(defaults.get("MenuItem.checkIcon"), null);
    harness.check(defaults.get("MenuItem.commandSound"), "sounds/MenuItemCommand.wav");
    harness.check(defaults.get("MenuItem.disabledForeground"), new ColorUIResource(0, 0, 16));
    harness.check(defaults.get("MenuItem.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("MenuItem.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("MenuItem.margin"), new InsetsUIResource(2, 2, 2, 2));
    harness.check(defaults.get("MenuItem.selectionBackground"), new ColorUIResource(0, 0, 18));
    harness.check(defaults.get("MenuItem.selectionForeground"), new ColorUIResource(0, 0, 19));
   
    harness.checkPoint("OptionPane");
    harness.check(defaults.get("OptionPane.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("OptionPane.border") instanceof BorderUIResource.EmptyBorderUIResource);
    harness.check(defaults.get("OptionPane.buttonAreaBorder") instanceof BorderUIResource.EmptyBorderUIResource);
    harness.check(defaults.getInt("OptionPane.buttonClickThreshhold"), 500);
    harness.check(defaults.get("OptionPane.errorDialog.border.background"), new ColorUIResource(153, 51, 51));
    harness.check(defaults.get("OptionPane.errorDialog.titlePane.background"), new ColorUIResource(255, 153, 153));
    harness.check(defaults.get("OptionPane.errorDialog.titlePane.foreground"), new ColorUIResource(51, 0, 0));
    harness.check(defaults.get("OptionPane.errorDialog.titlePane.shadow"), new ColorUIResource(204, 102, 102));
    harness.check(defaults.get("OptionPane.errorIcon") instanceof IconUIResource);
    harness.check(defaults.get("OptionPane.errorSound"), "sounds/OptionPaneError.wav");
    harness.check(defaults.get("OptionPane.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("OptionPane.foreground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("OptionPane.informationIcon") instanceof IconUIResource);
    harness.check(defaults.get("OptionPane.informationSound"), "sounds/OptionPaneInformation.wav");
    harness.check(defaults.get("OptionPane.messageAreaBorder") instanceof BorderUIResource.EmptyBorderUIResource);
    harness.check(defaults.get("OptionPane.messageForeground"), new ColorUIResource(0, 0, 10));
    harness.check(defaults.get("OptionPane.minimumSize"), new DimensionUIResource(262, 90));
    harness.check(defaults.get("OptionPane.questionDialog.border.background"), new ColorUIResource(51, 102, 51));
    harness.check(defaults.get("OptionPane.questionDialog.titlePane.background"), new ColorUIResource(153, 204, 153));
    harness.check(defaults.get("OptionPane.questionDialog.titlePane.foreground"), new ColorUIResource(0, 51, 0));
    harness.check(defaults.get("OptionPane.questionDialog.titlePane.shadow"), new ColorUIResource(102, 153, 102));
    harness.check(defaults.get("OptionPane.questionIcon") instanceof IconUIResource);
    harness.check(defaults.get("OptionPane.questionSound"), "sounds/OptionPaneQuestion.wav");
    harness.check(defaults.get("OptionPane.warningDialog.border.background"), new ColorUIResource(153, 102, 51));
    harness.check(defaults.get("OptionPane.warningDialog.titlePane.background"), new ColorUIResource(255, 204, 153));
    harness.check(defaults.get("OptionPane.warningDialog.titlePane.foreground"), new ColorUIResource(102, 51, 0));
    harness.check(defaults.get("OptionPane.warningDialog.titlePane.shadow"), new ColorUIResource(204, 153, 102));
    harness.check(defaults.get("OptionPane.warningIcon") instanceof IconUIResource);
    harness.check(defaults.get("OptionPane.warningSound"), "sounds/OptionPaneWarning.wav");
    bindings = (Object[]) defaults.get("OptionPane.windowBindings");
    harness.check(bindings.length, 2);
    harness.check(bindings[0], "ESCAPE");
    harness.check(bindings[1], "close");
   
    harness.checkPoint("Panel");
    harness.check(defaults.get("Panel.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("Panel.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Panel.foreground"), new ColorUIResource(0, 0, 29));
   
    harness.checkPoint("PasswordField");
    harness.check(defaults.get("PasswordField.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("PasswordField.border"), MetalBorders.getTextBorder());
    harness.check(defaults.getInt("PasswordField.caretBlinkRate"), 500);
    harness.check(defaults.get("PasswordField.caretForeground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("PasswordField.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("PasswordField.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("PasswordField.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("PasswordField.inactiveBackground"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("PasswordField.inactiveForeground"), new ColorUIResource(0, 0, 14));
    harness.check(defaults.get("PasswordField.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(defaults.get("PasswordField.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("PasswordField.selectionForeground"), new ColorUIResource(0, 0, 13));
   
    harness.checkPoint("PopupMenu");
    harness.check(defaults.get("PopupMenu.background"), new ColorUIResource(0, 0, 15));
    harness.check(defaults.get("PopupMenu.border") instanceof MetalBorders.PopupMenuBorder);
    harness.check(defaults.get("PopupMenu.font"), new FontUIResource("Dialog", Font.PLAIN, 15));
    harness.check(defaults.get("PopupMenu.foreground"), new ColorUIResource(0, 0, 17));
    harness.check(defaults.get("PopupMenu.popupSound"), "sounds/PopupMenuPopup.wav");
    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);
   
    harness.checkPoint("Tree");
    harness.check(defaults.get("Tree.background"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("Tree.ancestorInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Tree.changeSelectionWithFocus"), Boolean.TRUE);
    harness.check(defaults.get("Tree.closedIcon") instanceof MetalIconFactory.TreeFolderIcon);
    harness.check(defaults.get("Tree.collapsedIcon") instanceof MetalIconFactory.TreeControlIcon);
    harness.check(defaults.get("Tree.drawsFocusBorderAroundIcon"), Boolean.FALSE);
    harness.check(defaults.get("Tree.editorBorder") instanceof BorderUIResource.LineBorderUIResource);
    harness.check(defaults.get("Tree.expandedIcon") instanceof MetalIconFactory.TreeControlIcon);
    harness.check(defaults.get("Tree.focusInputMap") instanceof InputMapUIResource);
    harness.check(defaults.get("Tree.focusInputMap.RightToLeft") instanceof InputMapUIResource);
    harness.check(defaults.get("Tree.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Tree.foreground"), new ColorUIResource(0, 0, 29));
    harness.check(defaults.get("Tree.hash"), new ColorUIResource(0, 0, 20));
    harness.check(defaults.get("Tree.leafIcon") instanceof MetalIconFactory.TreeLeafIcon);
    harness.check(defaults.getInt("Tree.leftChildIndent"), 7);
    harness.check(defaults.get("Tree.line"), new ColorUIResource(0, 0, 20));
    harness.check(defaults.get("Tree.openIcon") instanceof MetalIconFactory.TreeFolderIcon);
    harness.check(defaults.getInt("Tree.rightChildIndent"), 13);
    harness.check(defaults.getInt("Tree.rowHeight"), 0);
    harness.check(defaults.get("Tree.scrollsOnExpand"), Boolean.TRUE);
    harness.check(defaults.get("Tree.selectionBackground"), new ColorUIResource(0, 0, 28));
    harness.check(defaults.get("Tree.selectionBorderColor"), new ColorUIResource(0, 0, 12));
    harness.check(defaults.get("Tree.selectionForeground"), new ColorUIResource(0, 0, 13));
    harness.check(defaults.get("Tree.textBackground"), new ColorUIResource(0, 0, 30));
    harness.check(defaults.get("Tree.textForeground"), new ColorUIResource(0, 0, 29));
   
    harness.checkPoint("Viewport");
    harness.check(defaults.get("Viewport.background"), new ColorUIResource(0, 0, 4));
    harness.check(defaults.get("Viewport.font"), new FontUIResource("Dialog", Font.PLAIN, 12));
    harness.check(defaults.get("Viewport.foreground"), new ColorUIResource(0, 0, 29));
  }
View Full Code Here

TOP

Related Classes of javax.swing.UIDefaults

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.