protected void paintBackground(Graphics g) {
   int draggedColumn = -1;
   if ((header != null) && (header.getTable() != null) && header.getDraggedColumn() != null) {
     draggedColumn =
         header.getColumnModel().getColumnIndex(header.getDraggedColumn().getIdentifier());
   }
   int w = getWidth();
   int h = getHeight();
   if ((table != null) && table.isEnabled() && (col == rolloverCol || col == draggedColumn)) {
     JTattooUtilities.fillHorGradient(
         g, AbstractLookAndFeel.getTheme().getRolloverColors(), 0, 0, w, h);
     if (drawRolloverBar()) {
       g.setColor(AbstractLookAndFeel.getFocusColor());
       g.drawLine(0, 0, w - 1, 0);
       g.drawLine(0, 1, w - 1, 1);
       g.drawLine(0, 2, w - 1, 2);
     }
   } else if (drawAllwaysActive() || JTattooUtilities.isFrameActive(header)) {
     if (header.getBackground() instanceof ColorUIResource) {
       JTattooUtilities.fillHorGradient(
           g, AbstractLookAndFeel.getTheme().getColHeaderColors(), 0, 0, w, h);
     } else {
       g.setColor(header.getBackground());
       g.fillRect(0, 0, w, h);
     }
   } else {
     if (header.getBackground() instanceof ColorUIResource) {
       JTattooUtilities.fillHorGradient(
           g, AbstractLookAndFeel.getTheme().getInActiveColors(), 0, 0, w, h);
     } else {
       g.setColor(header.getBackground());
       g.fillRect(0, 0, w, h);
     }
   }
 }
 protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds) {
   int w = c.getWidth();
   int h = c.getHeight();
   if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
     JTattooUtilities.fillVerGradient(
         g, AbstractLookAndFeel.getTheme().getTrackColors(), 0, 0, w, h);
   } else {
     JTattooUtilities.fillHorGradient(
         g, AbstractLookAndFeel.getTheme().getTrackColors(), 0, 0, w, h);
   }
 }
Example #3
0
 protected void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY) {
   int mnemIndex = -1;
   if (JTattooUtilities.getJavaVersion() >= 1.4) {
     mnemIndex = l.getDisplayedMnemonicIndex();
   } else {
     mnemIndex =
         JTattooUtilities.findDisplayedMnemonicIndex(l.getText(), l.getDisplayedMnemonic());
   }
   g.setColor(l.getForeground());
   JTattooUtilities.drawStringUnderlineCharAt(l, g, s, mnemIndex, textX, textY);
 }
Example #4
0
 protected void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY) {
   int mnemIndex = -1;
   if (JTattooUtilities.getJavaVersion() >= 1.4) {
     mnemIndex = l.getDisplayedMnemonicIndex();
   } else {
     mnemIndex =
         JTattooUtilities.findDisplayedMnemonicIndex(l.getText(), l.getDisplayedMnemonic());
   }
   g.setColor(Color.white);
   JTattooUtilities.drawStringUnderlineCharAt(l, g, s, mnemIndex, textX + 1, textY + 1);
   g.setColor(AbstractLookAndFeel.getDisabledForegroundColor());
   JTattooUtilities.drawStringUnderlineCharAt(l, g, s, mnemIndex, textX, textY);
 }
Example #5
0
 public void paintText(Graphics g, int x, int y, String title) {
   x += paintIcon(g, x, y);
   Graphics2D g2D = (Graphics2D) g;
   Color fc = AbstractLookAndFeel.getWindowTitleForegroundColor();
   if (fc.equals(Color.white)) {
     Color bc = AbstractLookAndFeel.getWindowTitleColorDark();
     g2D.setColor(bc);
     JTattooUtilities.drawString(rootPane, g, title, x - 1, y - 1);
     g2D.setColor(ColorHelper.darker(bc, 30));
     JTattooUtilities.drawString(rootPane, g, title, x + 1, y + 1);
   }
   g.setColor(fc);
   JTattooUtilities.drawString(rootPane, g, title, x, y);
 }
 public MyRenderComponent(
     JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {
   super();
   this.table = table;
   this.col = col;
   if (value != null) {
     setText(value.toString());
   } else {
     setText("");
   }
   setOpaque(false);
   setFont(UIManager.getFont("TableHeader.font"));
   setForeground(UIManager.getColor("TableHeader.foreground"));
   setHorizontalAlignment(JLabel.CENTER);
   setHorizontalTextPosition(SwingConstants.LEADING);
   setBorder(UIManager.getBorder("TableHeader.cellBorder"));
   if ((JTattooUtilities.getJavaVersion() >= 1.6)
       && (UIManager.getLookAndFeel() instanceof AbstractLookAndFeel)) {
     RowSorter rowSorter = table == null ? null : table.getRowSorter();
     List keyList = rowSorter == null ? null : rowSorter.getSortKeys();
     if ((keyList != null) && (keyList.size() > 0)) {
       RowSorter.SortKey sortKey = (RowSorter.SortKey) keyList.get(0);
       if (sortKey.getColumn() == table.convertColumnIndexToModel(col)) {
         AbstractIconFactory iconFactory =
             ((AbstractLookAndFeel) UIManager.getLookAndFeel()).getIconFactory();
         if (sortKey.getSortOrder().equals(SortOrder.ASCENDING)) {
           setIcon(iconFactory.getUpArrowIcon());
         } else if (sortKey.getSortOrder().equals(SortOrder.DESCENDING)) {
           setIcon(iconFactory.getDownArrowIcon());
         }
       }
     }
   }
   gv = ColorHelper.getGrayValue(AbstractLookAndFeel.getTheme().getRolloverColor());
 }
Example #7
0
 // Workaround to avoid a bug in the java 1.3 VM
 static {
   try {
     if (JTattooUtilities.getJavaVersion() < 1.4) {
       UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
     }
   } catch (Exception ex) {
   }
 }
 protected Color[] getThumbColors() {
   if (isRollover || isDragging) {
     return AbstractLookAndFeel.getTheme().getRolloverColors();
   } else if (!JTattooUtilities.isActive(scrollbar)) {
     return AbstractLookAndFeel.getTheme().getInActiveColors();
   } else {
     return AbstractLookAndFeel.getTheme().getThumbColors();
   }
 }
 protected void paintBackground(Graphics g, Rectangle cellRect, int col) {
   Component component = getHeaderRenderer(col);
   int x = cellRect.x;
   int y = cellRect.y;
   int w = cellRect.width;
   int h = cellRect.height;
   if (header.getBackground() instanceof ColorUIResource) {
     if ((col == rolloverCol) && (component != null) && component.isEnabled()) {
       JTattooUtilities.fillHorGradient(
           g, AbstractLookAndFeel.getTheme().getRolloverColors(), x, y, w, h);
     } else if (drawAllwaysActive() || JTattooUtilities.isFrameActive(header)) {
       JTattooUtilities.fillHorGradient(
           g, AbstractLookAndFeel.getTheme().getColHeaderColors(), x, y, w, h);
     } else {
       JTattooUtilities.fillHorGradient(
           g, AbstractLookAndFeel.getTheme().getInActiveColors(), x, y, w, h);
     }
   } else {
     g.setColor(header.getBackground());
     g.fillRect(x, y, w, h);
   }
 }
Example #10
0
  public void paintTicks(Graphics g) {
    boolean leftToRight = JTattooUtilities.isLeftToRight(slider);
    Rectangle tickBounds = tickRect;
    g.setColor(slider.getForeground());
    if (slider.getOrientation() == JSlider.HORIZONTAL) {
      g.translate(0, tickBounds.y);

      int value = slider.getMinimum();
      int xPos = 0;

      if (slider.getMinorTickSpacing() > 0) {
        while (value <= slider.getMaximum()) {
          xPos = xPositionForValue(value);
          paintMinorTickForHorizSlider(g, tickBounds, xPos);
          value += slider.getMinorTickSpacing();
        }
      }

      if (slider.getMajorTickSpacing() > 0) {
        value = slider.getMinimum();
        while (value <= slider.getMaximum()) {
          xPos = xPositionForValue(value);
          paintMajorTickForHorizSlider(g, tickBounds, xPos);
          value += slider.getMajorTickSpacing();
        }
      }

      g.translate(0, -tickBounds.y);
    } else {
      g.translate(tickBounds.x, 0);

      int value = slider.getMinimum();
      int yPos = 0;

      if (slider.getMinorTickSpacing() > 0) {
        int offset = 0;
        if (!leftToRight) {
          offset = tickBounds.width - tickBounds.width / 2;
          g.translate(offset, 0);
        }

        while (value <= slider.getMaximum()) {
          yPos = yPositionForValue(value);
          paintMinorTickForVertSlider(g, tickBounds, yPos);
          value += slider.getMinorTickSpacing();
        }
        if (!leftToRight) {
          g.translate(-offset, 0);
        }
      }

      if (slider.getMajorTickSpacing() > 0) {
        value = slider.getMinimum();
        if (!leftToRight) {
          g.translate(2, 0);
        }

        while (value <= slider.getMaximum()) {
          yPos = yPositionForValue(value);
          paintMajorTickForVertSlider(g, tickBounds, yPos);
          value += slider.getMajorTickSpacing();
        }

        if (!leftToRight) {
          g.translate(-2, 0);
        }
      }
      g.translate(-tickBounds.x, 0);
    }
  }
Example #11
0
  public void paintTrack(Graphics g) {
    boolean leftToRight = JTattooUtilities.isLeftToRight(slider);

    g.translate(trackRect.x, trackRect.y);
    int overhang = 4;
    int trackLeft = 0;
    int trackTop = 0;
    int trackRight = 0;
    int trackBottom = 0;

    if (slider.getOrientation() == JSlider.HORIZONTAL) {
      trackBottom = (trackRect.height - 1) - overhang;
      trackTop = trackBottom - (getTrackWidth() - 1);
      trackRight = trackRect.width - 1;
    } else {
      if (leftToRight) {
        trackLeft = (trackRect.width - overhang) - getTrackWidth();
        trackRight = (trackRect.width - overhang) - 1;
      } else {
        trackLeft = overhang;
        trackRight = overhang + getTrackWidth() - 1;
      }
      trackBottom = trackRect.height - 1;
    }

    g.setColor(AbstractLookAndFeel.getFrameColor());
    g.drawRect(trackLeft, trackTop, (trackRight - trackLeft) - 1, (trackBottom - trackTop) - 1);

    int middleOfThumb = 0;
    int fillTop = 0;
    int fillLeft = 0;
    int fillBottom = 0;
    int fillRight = 0;

    if (slider.getOrientation() == JSlider.HORIZONTAL) {
      middleOfThumb = thumbRect.x + (thumbRect.width / 2);
      middleOfThumb -= trackRect.x;
      fillTop = trackTop + 1;
      fillBottom = trackBottom - 2;

      if (!drawInverted()) {
        fillLeft = trackLeft + 1;
        fillRight = middleOfThumb;
      } else {
        fillLeft = middleOfThumb;
        fillRight = trackRight - 2;
      }
      Color colors[] = null;
      if (!JTattooUtilities.isActive(slider)) {
        colors = AbstractLookAndFeel.getTheme().getInActiveColors();
      } else {
        if (slider.isEnabled()) {
          colors = AbstractLookAndFeel.getTheme().getSliderColors();
        } else {
          colors = AbstractLookAndFeel.getTheme().getDisabledColors();
        }
      }
      JTattooUtilities.fillHorGradient(
          g, colors, fillLeft + 2, fillTop + 2, fillRight - fillLeft - 2, fillBottom - fillTop - 2);
      Color cHi = ColorHelper.darker(colors[colors.length - 1], 5);
      Color cLo = ColorHelper.darker(colors[colors.length - 1], 10);
      JTattooUtilities.draw3DBorder(
          g,
          cHi,
          cLo,
          fillLeft + 1,
          fillTop + 1,
          fillRight - fillLeft - 1,
          fillBottom - fillTop - 1);
    } else {
      middleOfThumb = thumbRect.y + (thumbRect.height / 2);
      middleOfThumb -= trackRect.y;
      fillLeft = trackLeft + 1;
      fillRight = trackRight - 2;

      if (!drawInverted()) {
        fillTop = middleOfThumb;
        fillBottom = trackBottom - 2;
      } else {
        fillTop = trackTop + 1;
        fillBottom = middleOfThumb;
      }
      Color colors[] = null;
      if (!JTattooUtilities.isActive(slider)) {
        colors = AbstractLookAndFeel.getTheme().getInActiveColors();
      } else {
        if (slider.isEnabled()) {
          colors = AbstractLookAndFeel.getTheme().getSliderColors();
        } else {
          colors = AbstractLookAndFeel.getTheme().getDisabledColors();
        }
      }
      JTattooUtilities.fillVerGradient(
          g, colors, fillLeft + 2, fillTop + 2, fillRight - fillLeft - 2, fillBottom - fillTop - 2);
      Color cHi = ColorHelper.darker(colors[colors.length - 1], 5);
      Color cLo = ColorHelper.darker(colors[colors.length - 1], 10);
      JTattooUtilities.draw3DBorder(
          g,
          cHi,
          cLo,
          fillLeft + 1,
          fillTop + 1,
          fillRight - fillLeft - 1,
          fillBottom - fillTop - 1);
    }
    g.translate(-trackRect.x, -trackRect.y);
  }
Example #12
0
  protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds) {
    if (!c.isEnabled()) {
      return;
    }

    g.translate(thumbBounds.x, thumbBounds.y);

    Color colors[] = getThumbColors();

    Color frameColorHi = ColorHelper.brighter(colors[1], 20);
    Color frameColorLo = ColorHelper.darker(colors[colors.length - 1], 10);

    Graphics2D g2D = (Graphics2D) g;
    Composite savedComposite = g2D.getComposite();
    if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
      JTattooUtilities.fillVerGradient(
          g, colors, 1, 1, thumbBounds.width - 1, thumbBounds.height - 1);
      JTattooUtilities.draw3DBorder(
          g,
          frameColorLo,
          ColorHelper.darker(frameColorLo, 15),
          0,
          0,
          thumbBounds.width,
          thumbBounds.height);

      g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.4f));
      g.setColor(frameColorHi);
      g.drawLine(1, 1, thumbBounds.width - 2, 1);
      g.drawLine(1, 1, 1, thumbBounds.height - 2);

      int dx = 5;
      int dy = thumbBounds.height / 2 - 3;
      int dw = thumbBounds.width - 11;

      Color c1 = Color.white;
      Color c2 = Color.darkGray;

      for (int i = 0; i < 4; i++) {
        g.setColor(c1);
        g.drawLine(dx, dy, dx + dw, dy);
        dy++;
        g.setColor(c2);
        g.drawLine(dx, dy, dx + dw, dy);
        dy++;
      }
      g2D.setComposite(savedComposite);
    } else { // HORIZONTAL
      JTattooUtilities.fillHorGradient(
          g, colors, 1, 1, thumbBounds.width - 1, thumbBounds.height - 1);
      JTattooUtilities.draw3DBorder(
          g,
          frameColorLo,
          ColorHelper.darker(frameColorLo, 10),
          0,
          0,
          thumbBounds.width,
          thumbBounds.height);

      g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.4f));
      g.setColor(frameColorHi);
      g.drawLine(1, 1, thumbBounds.width - 2, 1);
      g.drawLine(1, 1, 1, thumbBounds.height - 2);

      int dx = thumbBounds.width / 2 - 3;
      int dy = 5;
      int dh = thumbBounds.height - 11;

      Color c1 = Color.white;
      Color c2 = Color.darkGray;

      for (int i = 0; i < 4; i++) {
        g.setColor(c1);
        g.drawLine(dx, dy, dx, dy + dh);
        dx++;
        g.setColor(c2);
        g.drawLine(dx, dy, dx, dy + dh);
        dx++;
      }
    }
    g2D.setComposite(savedComposite);

    g.translate(-thumbBounds.x, -thumbBounds.y);
  }
Example #13
0
  protected void initComponentDefaults(UIDefaults table) {
    super.initComponentDefaults(table);

    BaseBorders.initDefaults();
    BaseIcons.initDefaults();

    Object textFieldBorder = getBorderFactory().getTextFieldBorder();
    Object comboBoxBorder = getBorderFactory().getComboBoxBorder();
    Object scrollPaneBorder = getBorderFactory().getScrollPaneBorder();
    Object tableScrollPaneBorder = getBorderFactory().getTableScrollPaneBorder();
    Object tabbedPaneBorder = getBorderFactory().getTabbedPaneBorder();
    Object buttonBorder = getBorderFactory().getButtonBorder();
    Object toggleButtonBorder = getBorderFactory().getToggleButtonBorder();
    Object titledBorderBorder =
        new UIDefaults.ProxyLazyValue(
            "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
            new Object[] {getFrameColor()});
    Object menuBarBorder = getBorderFactory().getMenuBarBorder();
    Object popupMenuBorder = getBorderFactory().getPopupMenuBorder();
    Object menuItemBorder = getBorderFactory().getMenuItemBorder();
    Object toolBarBorder = getBorderFactory().getToolBarBorder();
    Object progressBarBorder = getBorderFactory().getProgressBarBorder();
    Object toolTipBorder =
        new UIDefaults.ProxyLazyValue(
            "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
            new Object[] {getFrameColor()});
    Object focusCellHighlightBorder =
        new UIDefaults.ProxyLazyValue(
            "javax.swing.plaf.BorderUIResource$LineBorderUIResource",
            new Object[] {getFocusCellColor()});
    Object optionPaneBorder = BorderFactory.createEmptyBorder(0, 0, 0, 0);
    Object optionPaneMessageAreaBorder = BorderFactory.createEmptyBorder(8, 8, 8, 8);
    Object optionPaneButtonAreaBorder = BorderFactory.createEmptyBorder(0, 8, 8, 8);
    Object windowBorder = getBorderFactory().getInternalFrameBorder();

    Color c = getBackgroundColor();
    ColorUIResource progressBarBackground = new ColorUIResource(ColorHelper.brighter(c, 20));

    // DEFAULTS TABLE
    Object[] defaults = {
      "controlTextFont", getControlTextFont(),
      "systemTextFont ", getSystemTextFont(),
      "userTextFont", getUserTextFont(),
      "menuTextFont", getMenuTextFont(),
      "windowTitleFont", getWindowTitleFont(),
      "subTextFont", getSubTextFont(),
      "Label.font", getUserTextFont(),
      "Label.background", getBackgroundColor(),
      "Label.foreground", getForegroundColor(),
      "Label.disabledText", getDisabledForegroundColor(),
      "Label.disabledShadow", getWhite(),
      // Text (Note: many are inherited)
      "TextField.border", textFieldBorder,
      "TextField.foreground", getInputForegroundColor(),
      "TextField.background", getInputBackgroundColor(),
      "TextField.disabledForeground", getDisabledForegroundColor(),
      "TextField.disabledBackground", getDisabledBackgroundColor(),
      "TextField.inactiveForeground", getDisabledForegroundColor(),
      "TextField.inactiveBackground", getDisabledBackgroundColor(),
      "TextArea.foreground", getInputForegroundColor(),
      "TextArea.background", getInputBackgroundColor(),
      "TextArea.disabledForeground", getDisabledForegroundColor(),
      "TextArea.disabledBackground", getDisabledBackgroundColor(),
      "TextArea.inactiveForeground", getDisabledForegroundColor(),
      "TextArea.inactiveBackground", getDisabledBackgroundColor(),
      "EditorPane.foreground", getInputForegroundColor(),
      "EditorPane.background", getInputBackgroundColor(),
      "EditorPane.disabledForeground", getDisabledForegroundColor(),
      "EditorPane.disabledBackground", getDisabledBackgroundColor(),
      "EditorPane.inactiveForeground", getDisabledForegroundColor(),
      "EditorPane.inactiveBackground", getDisabledBackgroundColor(),
      "FormattedTextField.border", textFieldBorder,
      "FormattedTextField.foreground", getInputForegroundColor(),
      "FormattedTextField.background", getInputBackgroundColor(),
      "FormattedTextField.disabledForeground", getDisabledForegroundColor(),
      "FormattedTextField.disabledBackground", getDisabledBackgroundColor(),
      "FormattedTextField.inactiveForeground", getDisabledForegroundColor(),
      "FormattedTextField.inactiveBackground", getDisabledBackgroundColor(),
      "PasswordField.border", textFieldBorder,
      "PasswordField.foreground", getInputForegroundColor(),
      "PasswordField.background", getInputBackgroundColor(),
      "PasswordField.disabledForeground", getDisabledForegroundColor(),
      "PasswordField.disabledBackground", getDisabledBackgroundColor(),
      "PasswordField.inactiveForeground", getDisabledForegroundColor(),
      "PasswordField.inactiveBackground", getDisabledBackgroundColor(),
      // Buttons
      "Button.background", getButtonBackgroundColor(),
      "Button.foreground", getButtonForegroundColor(),
      "Button.disabledText", getDisabledForegroundColor(),
      "Button.disabledShadow", getWhite(),
      "Button.select", getSelectionBackgroundColor(),
      "Button.border", buttonBorder,
      "Button.frame", getFrameColor(),
      "Button.focus", getFocusColor(),
      "Button.rolloverColor", getTheme().getRolloverColor(),
      "CheckBox.font", getUserTextFont(),
      "CheckBox.background", getBackgroundColor(),
      "CheckBox.foreground", getForegroundColor(),
      "CheckBox.disabledText", getDisabledForegroundColor(),
      "CheckBox.disabledShadow", getWhite(),
      "Checkbox.select", getSelectionBackgroundColor(),
      "CheckBox.focus", getFocusColor(),
      "CheckBox.icon", getIconFactory().getCheckBoxIcon(),
      "RadioButton.font", getUserTextFont(),
      "RadioButton.background", getBackgroundColor(),
      "RadioButton.foreground", getForegroundColor(),
      "RadioButton.disabledText", getDisabledForegroundColor(),
      "RadioButton.disabledShadow", getWhite(),
      "RadioButton.select", getSelectionBackgroundColor(),
      "RadioButton.icon", getIconFactory().getRadioButtonIcon(),
      "RadioButton.focus", getFocusColor(),
      "ToggleButton.background", getButtonBackgroundColor(),
      "ToggleButton.foreground", getButtonForegroundColor(),
      "ToggleButton.select", getSelectionBackgroundColor(),
      "ToggleButton.text", getButtonForegroundColor(),
      "ToggleButton.disabledText", getDisabledForegroundColor(),
      "ToggleButton.disabledShadow", getWhite(),
      "ToggleButton.disabledSelectedText", getDisabledForegroundColor(),
      "ToggleButton.disabledBackground", getButtonBackgroundColor(),
      "ToggleButton.disabledSelectedBackground", getSelectionBackgroundColor(),
      "ToggleButton.focus", getFocusColor(),
      "ToggleButton.border", toggleButtonBorder,
      // ToolTip
      "ToolTip.border", toolTipBorder,
      "ToolTip.foreground", getTooltipForegroundColor(),
      "ToolTip.background", getTooltipBackgroundColor(),
      // Slider
      "Slider.border", null,
      "Slider.foreground", getFrameColor(),
      "Slider.background", getBackgroundColor(),
      "Slider.focus", getFocusColor(),
      "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0),
      "Slider.trackWidth", 7,
      "Slider.majorTickLength", 6,
      // Progress Bar
      "ProgressBar.border", progressBarBorder,
      "ProgressBar.background", progressBarBackground,
      "ProgressBar.selectionForeground", getSelectionForegroundColor(),
      "ProgressBar.selectionBackground", getForegroundColor(),
      // Combo Box
      "ComboBox.border", comboBoxBorder,
      "ComboBox.background", getInputBackgroundColor(),
      "ComboBox.foreground", getInputForegroundColor(),
      "ComboBox.selectionBackground", getSelectionBackgroundColor(),
      "ComboBox.selectionForeground", getSelectionForegroundColor(),
      "ComboBox.selectionBorderColor", getFocusColor(),
      "ComboBox.disabledBackground", getDisabledBackgroundColor(),
      "ComboBox.disabledForeground", getDisabledForegroundColor(),
      "ComboBox.listBackground", getInputBackgroundColor(),
      "ComboBox.listForeground", getInputForegroundColor(),
      "ComboBox.font", getUserTextFont(),
      // Panel
      "Panel.foreground", getForegroundColor(),
      "Panel.background", getBackgroundColor(),
      "Panel.darkBackground", getTheme().getBackgroundColorDark(),
      "Panel.lightBackground", getTheme().getBackgroundColorLight(),
      "Panel.alterBackground", getTheme().getAlterBackgroundColor(),
      "Panel.font", getUserTextFont(),
      // RootPane
      "RootPane.frameBorder", windowBorder,
      "RootPane.plainDialogBorder", windowBorder,
      "RootPane.informationDialogBorder", windowBorder,
      "RootPane.errorDialogBorder", windowBorder,
      "RootPane.colorChooserDialogBorder", windowBorder,
      "RootPane.fileChooserDialogBorder", windowBorder,
      "RootPane.questionDialogBorder", windowBorder,
      "RootPane.warningDialogBorder", windowBorder,
      // InternalFrame
      "InternalFrame.border", getBorderFactory().getInternalFrameBorder(),
      "InternalFrame.font", getWindowTitleFont(),
      "InternalFrame.paletteBorder", getBorderFactory().getPaletteBorder(),
      "InternalFrame.paletteTitleHeight", 11,
      "InternalFrame.paletteCloseIcon", getIconFactory().getPaletteCloseIcon(),
      "InternalFrame.icon", getIconFactory().getMenuIcon(),
      "InternalFrame.iconifyIcon", getIconFactory().getIconIcon(),
      "InternalFrame.maximizeIcon", getIconFactory().getMaxIcon(),
      "InternalFrame.minimizeIcon", getIconFactory().getMinIcon(),
      "InternalFrame.closeIcon", getIconFactory().getCloseIcon(),

      // Titled Border
      "TitledBorder.titleColor", getForegroundColor(),
      "TitledBorder.border", titledBorderBorder,
      // List
      "List.focusCellHighlightBorder", focusCellHighlightBorder,
      "List.font", getUserTextFont(),
      "List.foreground", getInputForegroundColor(),
      "List.background", getInputBackgroundColor(),
      "List.selectionForeground", getSelectionForegroundColor(),
      "List.selectionBackground", getSelectionBackgroundColor(),
      "List.disabledForeground", getDisabledForegroundColor(),
      "List.disabledBackground", getDisabledBackgroundColor(),
      // ScrollBar
      "ScrollBar.background", getControlBackgroundColor(),
      "ScrollBar.highlight", getControlHighlightColor(),
      "ScrollBar.shadow", getControlShadowColor(),
      "ScrollBar.darkShadow", getControlDarkShadowColor(),
      "ScrollBar.thumb", getControlBackgroundColor(),
      "ScrollBar.thumbShadow", getControlShadowColor(),
      "ScrollBar.thumbHighlight", getControlHighlightColor(),
      "ScrollBar.width", 17,
      "ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
      // ScrollPane
      "ScrollPane.border", scrollPaneBorder,
      "ScrollPane.foreground", getForegroundColor(),
      "ScrollPane.background", getBackgroundColor(),
      // Viewport
      "Viewport.foreground", getForegroundColor(),
      "Viewport.background", getBackgroundColor(),
      "Viewport.font", getUserTextFont(),

      // Tabbed Pane
      "TabbedPane.boder", tabbedPaneBorder,
      "TabbedPane.background", getBackgroundColor(),
      "TabbedPane.tabAreaBackground", getTabAreaBackgroundColor(),
      "TabbedPane.unselectedBackground", getControlColorDark(),
      "TabbedPane.foreground", getControlForegroundColor(),
      "TabbedPane.selected", getBackgroundColor(),
      "TabbedPane.selectedForeground", getTabSelectionForegroundColor(),
      "TabbedPane.tabAreaInsets", new InsetsUIResource(5, 5, 5, 5),
      "TabbedPane.contentBorderInsets", new InsetsUIResource(0, 0, 0, 0),
      "TabbedPane.tabInsets", new InsetsUIResource(1, 6, 1, 6),
      "TabbedPane.focus", getFocusColor(),
      // TabbedPane ScrollButton
      "TabbedPane.selected", getButtonBackgroundColor(),
      "TabbedPane.shadow", new ColorUIResource(180, 180, 180),
      "TabbedPane.darkShadow", new ColorUIResource(120, 120, 120),
      "TabbedPane.highlight", new ColorUIResource(Color.white),
      // Tab Colors in Netbeans
      "tab_unsel_fill", getControlBackgroundColor(),
      "tab_sel_fill", getControlBackgroundColor(),
      // Table
      "Table.focusCellHighlightBorder", focusCellHighlightBorder,
      "Table.scrollPaneBorder", tableScrollPaneBorder,
      "Table.foreground", getInputForegroundColor(),
      "Table.background", getInputBackgroundColor(),
      "Table.gridColor", getGridColor(),
      "TableHeader.foreground", getControlForegroundColor(),
      "TableHeader.background", getBackgroundColor(),
      "TableHeader.cellBorder", getBorderFactory().getTableHeaderBorder(),
      // MenuBar
      "MenuBar.border", menuBarBorder,
      "MenuBar.foreground", getMenuForegroundColor(),
      "MenuBar.background", getMenuBackgroundColor(),
      // Menu
      "Menu.border", menuItemBorder,
      "Menu.borderPainted", Boolean.TRUE,
      "Menu.foreground", getMenuForegroundColor(),
      "Menu.background", getMenuBackgroundColor(),
      "Menu.selectionForeground", getMenuSelectionForegroundColor(),
      "Menu.selectionBackground", getMenuSelectionBackgroundColor(),
      "Menu.disabledForeground", getDisabledForegroundColor(),
      "Menu.acceleratorForeground", getMenuForegroundColor(),
      "Menu.acceleratorSelectionForeground", getMenuSelectionForegroundColor(),
      "Menu.arrowIcon", getIconFactory().getMenuArrowIcon(),
      // Popup Menu
      "PopupMenu.background", getMenuBackgroundColor(),
      "PopupMenu.border", popupMenuBorder,
      // Menu Item
      "MenuItem.border", menuItemBorder,
      "MenuItem.borderPainted", Boolean.TRUE,
      "MenuItem.foreground", getMenuForegroundColor(),
      "MenuItem.background", getMenuBackgroundColor(),
      "MenuItem.selectionForeground", getMenuSelectionForegroundColor(),
      "MenuItem.selectionBackground", getMenuSelectionBackgroundColor(),
      "MenuItem.disabledForeground", getDisabledForegroundColor(),
      "MenuItem.disabledShadow", getWhite(),
      "MenuItem.acceleratorForeground", getMenuForegroundColor(),
      "MenuItem.acceleratorSelectionForeground", getMenuSelectionForegroundColor(),
      "CheckBoxMenuItem.border", menuItemBorder,
      "CheckBoxMenuItem.borderPainted", Boolean.TRUE,
      "CheckBoxMenuItem.foreground", getMenuForegroundColor(),
      "CheckBoxMenuItem.background", getMenuBackgroundColor(),
      "CheckBoxMenuItem.selectionForeground", getMenuSelectionForegroundColor(),
      "CheckBoxMenuItem.selectionBackground", getMenuSelectionBackgroundColor(),
      "CheckBoxMenuItem.disabledForeground", getDisabledForegroundColor(),
      "CheckBoxMenuItem.disabledShadow", getWhite(),
      "CheckBoxMenuItem.acceleratorForeground", getMenuForegroundColor(),
      "CheckBoxMenuItem.acceleratorSelectionForeground", getMenuSelectionForegroundColor(),
      "CheckBoxMenuItem.checkIcon", getIconFactory().getMenuCheckBoxIcon(),
      "RadioButtonMenuItem.border", menuItemBorder,
      "RadioButtonMenuItem.borderPainted", Boolean.TRUE,
      "RadioButtonMenuItem.foreground", getMenuForegroundColor(),
      "RadioButtonMenuItem.background", getMenuBackgroundColor(),
      "RadioButtonMenuItem.selectionForeground", getMenuSelectionForegroundColor(),
      "RadioButtonMenuItem.selectionBackground", getMenuSelectionBackgroundColor(),
      "RadioButtonMenuItem.disabledForeground", getDisabledForegroundColor(),
      "RadioButtonMenuItem.disabledShadow", getWhite(),
      "RadioButtonMenuItem.acceleratorForeground", getMenuForegroundColor(),
      "RadioButtonMenuItem.acceleratorSelectionForeground", getMenuSelectionForegroundColor(),
      "RadioButtonMenuItem.checkIcon", getIconFactory().getMenuRadioButtonIcon(),
      // OptionPane.
      "OptionPane.errorIcon", getIconFactory().getOptionPaneErrorIcon(),
      "OptionPane.informationIcon", getIconFactory().getOptionPaneInformationIcon(),
      "OptionPane.warningIcon", getIconFactory().getOptionPaneWarningIcon(),
      "OptionPane.questionIcon", getIconFactory().getOptionPaneQuestionIcon(),
      "OptionPane.border", optionPaneBorder,
      "OptionPane.messageAreaBorder", optionPaneMessageAreaBorder,
      "OptionPane.buttonAreaBorder", optionPaneButtonAreaBorder,
      // File View
      "FileView.directoryIcon", getIconFactory().getTreeFolderIcon(),
      "FileView.fileIcon", getIconFactory().getTreeLeafIcon(),
      "FileView.computerIcon", getIconFactory().getTreeComputerIcon(),
      "FileView.hardDriveIcon", getIconFactory().getTreeHardDriveIcon(),
      "FileView.floppyDriveIcon", getIconFactory().getTreeFloppyDriveIcon(),
      // File Chooser
      "FileChooser.detailsViewIcon", getIconFactory().getFileChooserDetailViewIcon(),
      "FileChooser.homeFolderIcon", getIconFactory().getFileChooserHomeFolderIcon(),
      "FileChooser.listViewIcon", getIconFactory().getFileChooserListViewIcon(),
      "FileChooser.newFolderIcon", getIconFactory().getFileChooserNewFolderIcon(),
      "FileChooser.upFolderIcon", getIconFactory().getFileChooserUpFolderIcon(),
      // Separator
      "Separator.background", getBackgroundColor(),
      "Separator.foreground", getControlForegroundColor(),
      // SplitPane
      "SplitPane.centerOneTouchButtons", Boolean.TRUE,
      "SplitPane.dividerSize", 7,
      "SplitPane.border", BorderFactory.createEmptyBorder(),
      // Tree
      "Tree.background", getInputBackgroundColor(),
      "Tree.foreground", getInputForegroundColor(),
      "Tree.textForeground", getInputForegroundColor(),
      "Tree.textBackground", getInputBackgroundColor(),
      "Tree.openIcon", new ImageIcon() /*getIconFactory().getTreeFolderIcon()*/,
      "Tree.closedIcon", new ImageIcon() /*getIconFactory().getTreeFolderIcon()*/,
      "Tree.leafIcon", new ImageIcon() /*getIconFactory().getTreeLeafIcon()*/,
      "Tree.expandedIcon", getIconFactory().getTreeExpandedIcon(),
      "Tree.collapsedIcon", getIconFactory().getTreeCollapsedIcon(),
      "Tree.selectionBorderColor", getFocusCellColor(),
      "Tree.line", getFrameColor(), // horiz lines
      "Tree.hash", getFrameColor(), // legs

      // ToolBar
      "JToolBar.isRollover", Boolean.TRUE,
      "ToolBar.border", toolBarBorder,
      "ToolBar.background", getToolbarBackgroundColor(),
      "ToolBar.foreground", getToolbarForegroundColor(),
      "ToolBar.dockingBackground", getToolbarBackgroundColor(),
      "ToolBar.dockingForeground", getToolbarDockingColor(),
      "ToolBar.floatingBackground", getToolbarBackgroundColor(),
      "ToolBar.floatingForeground", getToolbarForegroundColor(),
    };
    table.putDefaults(defaults);

    if (JTattooUtilities.getJavaVersion() >= 1.5) {
      table.put("Spinner.font", getControlTextFont());
      table.put("Spinner.background", getButtonBackgroundColor());
      table.put("Spinner.foreground", getButtonForegroundColor());
      table.put("Spinner.border", getBorderFactory().getSpinnerBorder());
      table.put("Spinner.arrowButtonInsets", null);
      table.put("Spinner.arrowButtonBorder", BorderFactory.createEmptyBorder());
      table.put("Spinner.editorBorderPainted", Boolean.FALSE);
    }
  }