looks-2.2.0

Foreground()
  {
    return getWhite();
  }
  
  public ColorUIResource getMenuSelectedBackground()
  {
    return getSecondary2();
  }
  
  public ColorUIResource getFocusColor()
  {
    return PlasticLookAndFeel.getHighContrastFocusColorsEnabled() ? Colors.YELLOW_FOCUS : super.getFocusColor();
  }
  
  public void addCustomEntriesToTable(UIDefaults table)
  {
    super.addCustomEntriesToTable(table);
    Object[] uiDefaults = { "ScrollBar.maxBumpsWidth", new Integer(30) };
    
    table.putDefaults(uiDefaults);
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.theme.SkyBluer
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.plastic.theme;

import javax.swing.plaf.ColorUIResource;

public class SkyGreen
  extends AbstractSkyTheme
{
  public String getName()
  {
    return "Sky Green";
  }
  
  protected ColorUIResource getPrimary2()
  {
    return Colors.GREEN_LOW_MEDIUM;
  }
  
  protected ColorUIResource getPrimary3()
  {
    return Colors.GREEN_LOW_LIGHTEST;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.theme.SkyGreen
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.plastic.theme;

import com.jgoodies.looks.plastic.PlasticLookAndFeel;
import javax.swing.plaf.ColorUIResource;

public class SkyKrupp
  extends AbstractSkyTheme
{
  public String getName()
  {
    return "Sky Krupp";
  }
  
  private final ColorUIResource primary1 = new ColorUIResource(54, 54, 90);
  private final ColorUIResource primary2 = new ColorUIResource(156, 156, 178);
  private final ColorUIResource primary3 = new ColorUIResource(197, 197, 221);
  
  protected ColorUIResource getPrimary1()
  {
    return primary1;
  }
  
  protected ColorUIResource getPrimary2()
  {
    return primary2;
  }
  
  protected ColorUIResource getPrimary3()
  {
    return primary3;
  }
  
  public ColorUIResource getMenuItemSelectedBackground()
  {
    return getPrimary1();
  }
  
  public ColorUIResource getMenuItemSelectedForeground()
  {
    return getWhite();
  }
  
  public ColorUIResource getMenuSelectedBackground()
  {
    return getSecondary2();
  }
  
  public ColorUIResource getFocusColor()
  {
    return PlasticLookAndFeel.getHighContrastFocusColorsEnabled() ? Colors.ORANGE_FOCUS : Colors.GRAY_DARK;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.theme.SkyKrupp
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.plastic.theme;

import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;

public class SkyPink
  extends AbstractSkyTheme
{
  public String getName()
  {
    return "Sky Pink";
  }
  
  protected ColorUIResource getPrimary1()
  {
    return Colors.PINK_LOW_DARK;
  }
  
  protected ColorUIResource getPrimary2()
  {
    return Colors.PINK_LOW_MEDIUM;
  }
  
  protected ColorUIResource getPrimary3()
  {
    return Colors.PINK_LOW_LIGHTER;
  }
  
  public ColorUIResource getHighlightedTextColor()
  {
    return getControlTextColor();
  }
  
  public void addCustomEntriesToTable(UIDefaults table)
  {
    super.addCustomEntriesToTable(table);
    Object[] uiDefaults = { "ScrollBar.maxBumpsWidth", new Integer(30) };
    
    table.putDefaults(uiDefaults);
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.theme.SkyPink
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.plastic.theme;

import javax.swing.plaf.ColorUIResource;

public class SkyRed
  extends AbstractSkyTheme
{
  public String getName()
  {
    return "Sky Red";
  }
  
  protected ColorUIResource getPrimary1()
  {
    return Colors.RED_LOW_DARK;
  }
  
  protected ColorUIResource getPrimary2()
  {
    return Colors.RED_LOW_MEDIUM;
  }
  
  protected ColorUIResource getPrimary3()
  {
    return Colors.RED_LOW_LIGHTER;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.theme.SkyRed
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.plastic.theme;

import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;

public class SkyYellow
  extends AbstractSkyTheme
{
  public String getName()
  {
    return "Sky Yellow";
  }
  
  protected ColorUIResource getPrimary1()
  {
    return Colors.GRAY_DARK;
  }
  
  protected ColorUIResource getPrimary2()
  {
    return Colors.YELLOW_LOW_MEDIUM;
  }
  
  protected ColorUIResource getPrimary3()
  {
    return Colors.YELLOW_LOW_LIGHTEST;
  }
  
  public ColorUIResource getFocusColor()
  {
    return Colors.ORANGE_FOCUS;
  }
  
  public ColorUIResource getPrimaryControlShadow()
  {
    return getPrimary3();
  }
  
  public ColorUIResource getMenuItemSelectedBackground()
  {
    return Colors.YELLOW_LOW_MEDIUMDARK;
  }
  
  public void addCustomEntriesToTable(UIDefaults table)
  {
    super.addCustomEntriesToTable(table);
    Object[] uiDefaults = { "ScrollBar.maxBumpsWidth", new Integer(30) };
    
    table.putDefaults(uiDefaults);
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.theme.SkyYellow
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.UIManager;
import javax.swing.plaf.basic.BasicArrowButton;

final class WindowsArrowButton
  extends BasicArrowButton
{
  public WindowsArrowButton(int direction)
  {
    super(direction);
  }
  
  public Dimension getPreferredSize()
  {
    int width = Math.max(5, UIManager.getInt("ScrollBar.width"));
    return new Dimension(width, width);
  }
  
  public void paintTriangle(Graphics g, int x, int y, int size, int triangleDirection, boolean isEnabled)
  {
    Color oldColor = g.getColor();
    
    int j = 0;
    size = Math.max(size, 2);
    int mid = (size - 1) / 2;
    
    g.translate(x, y);
    if (isEnabled) {
      g.setColor(Color.black);
    } else {
      g.setColor(UIManager.getColor("controlShadow"));
    }
    int i;
    int i;
    switch (triangleDirection)
    {
    case 1: 
      for (i = 0; i < size; i++) {
        g.drawLine(mid - i, i, mid + i, i);
      }
      if (!isEnabled)
      {
        g.setColor(UIManager.getColor("controlLtHighlight"));
        g.drawLine(mid - i + 2, i, mid + i, i);
      }
      break;
    case 5: 
      if (!isEnabled)
      {
        g.translate(1, 1);
        g.setColor(UIManager.getColor("controlLtHighlight"));
        for (i = size - 1; i >= 0; i--)
        {
          g.drawLine(mid - i, j, mid + i, j);
          j++;
        }
        g.translate(-1, -1);
        g.setColor(UIManager.getColor("controlShadow"));
      }
      j = 0;
      for (i = size - 1; i >= 0;)
      {
        g.drawLine(mid - i, j, mid + i, j);
        j++;i--; continue;
        for (i = 0; i < size; i++) {
          g.drawLine(i, mid - i, i, mid + i);
        }
        if (!isEnabled)
        {
          g.setColor(UIManager.getColor("controlLtHighlight"));
          g.drawLine(i, mid - i + 2, i, mid + i); break;
          if (!isEnabled)
          {
            g.translate(1, 1);
            g.setColor(UIManager.getColor("controlLtHighlight"));
            for (i = size - 1; i >= 0; i--)
            {
              g.drawLine(j, mid - i, j, mid + i);
              j++;
            }
            g.translate(-1, -1);
            g.setColor(UIManager.getColor("controlShadow"));
          }
          j = 0;
          for (int i = size - 1; i >= 0; i--)
          {
            g.drawLine(j, mid - i, j, mid + i);
            j++;
          }
        }
      }
    }
    g.translate(-x, -y);
    g.setColor(oldColor);
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsArrowButton
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

class WindowsBorders$1 {}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

abstract class WindowsBorders$AbstractButtonBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$AbstractButtonBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(2, 2, 2, 2);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    AbstractButton button = (AbstractButton)c;
    ButtonModel model = button.getModel();
    if (model.isPressed()) {
      WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
    } else {
      WindowsUtils.drawFlush3DBorder(g, x, y, w, h);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$AbstractButtonBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.AbstractButtonBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.JButton;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$ButtonBorder
  extends AbstractBorder
  implements UIResource
{
  private static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);
  private final Color shadow;
  private final Color darkShadow;
  private final Color highlight;
  private final Color lightHighlight;
  private final Color defaultColor;
  
  public WindowsBorders$ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight, Color defaultColor)
  {
    this.shadow = shadow;
    this.darkShadow = darkShadow;
    this.highlight = highlight;
    this.lightHighlight = lightHighlight;
    this.defaultColor = defaultColor;
  }
  
  public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
  {
    boolean isPressed = false;
    boolean isDefault = false;
    if ((c instanceof AbstractButton))
    {
      AbstractButton b = (AbstractButton)c;
      ButtonModel model = b.getModel();
      
      isPressed = (model.isPressed()) && (model.isArmed());
      if ((c instanceof JButton)) {
        isDefault = ((JButton)c).isDefaultButton();
      }
    }
    WindowsBorders.access$900(g, x, y, width, height, isPressed, isDefault, shadow, darkShadow, highlight, lightHighlight, defaultColor);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return getBorderInsets(c, EMPTY_INSETS);
  }
  
  public Insets getBorderInsets(Component c, Insets insets)
  {
    top = 2;
    left = (bottom = right = 3);
    return insets;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.ButtonBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$EtchedBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$EtchedBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(2, 2, 2, 2);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
    WindowsUtils.drawFlush3DBorder(g, x + 1, y + 1, w - 2, h - 2);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$EtchedBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.EtchedBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$MenuBarHeaderBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$MenuBarHeaderBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(2, 2, 1, 2);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    WindowsUtils.drawPressed3DBorder(g, x, y, w, h + 1);
    WindowsUtils.drawFlush3DBorder(g, x + 1, y + 1, w - 2, h - 1);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$MenuBarHeaderBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.MenuBarHeaderBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$MenuBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$MenuBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(1, 1, 1, 1);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    AbstractButton b = (AbstractButton)c;
    ButtonModel model = b.getModel();
    if (model.isSelected()) {
      WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
    } else if (model.isRollover()) {
      WindowsUtils.drawFlush3DBorder(g, x, y, w, h);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$MenuBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.MenuBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$NoMarginPopupMenuBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$NoMarginPopupMenuBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(1, 1, 1, 1);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    g.translate(x, y);
    g.setColor(UIManager.getColor("controlShadow"));
    g.drawRect(0, 0, w - 1, h - 1);
    
    g.translate(-x, -y);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$NoMarginPopupMenuBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.NoMarginPopupMenuBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$PopupMenuBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$PopupMenuBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(3, 3, 3, 3);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    g.translate(x, y);
    g.setColor(UIManager.getColor("controlShadow"));
    g.drawRect(0, 0, w - 1, h - 1);
    g.setColor(UIManager.getColor("MenuItem.background"));
    g.drawRect(1, 1, w - 3, h - 3);
    g.drawRect(2, 2, w - 5, h - 5);
    g.translate(-x, -y);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$PopupMenuBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.PopupMenuBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.JToggleButton;

final class WindowsBorders$RolloverButtonBorder
  extends WindowsBorders.AbstractButtonBorder
{
  private WindowsBorders$RolloverButtonBorder()
  {
    super(null);
  }
  
  WindowsBorders$RolloverButtonBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    AbstractButton b = (AbstractButton)c;
    ButtonModel model = b.getModel();
    if (!model.isEnabled()) {
      return;
    }
    if (!(c instanceof JToggleButton))
    {
      if (model.isRollover()) {
        super.paintBorder(c, g, x, y, w, h);
      }
      return;
    }
    if (model.isSelected()) {
      WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
    } else if (model.isRollover()) {
      super.paintBorder(c, g, x, y, w, h);
    }
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.RolloverButtonBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$RolloverMarginBorder
  extends EmptyBorder
{
  WindowsBorders$RolloverMarginBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private WindowsBorders$RolloverMarginBorder()
  {
    super(1, 1, 1, 1);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return getBorderInsets(c, new Insets(0, 0, 0, 0));
  }
  
  public Insets getBorderInsets(Component c, Insets insets)
  {
    Insets margin = null;
    if ((c instanceof AbstractButton)) {
      margin = ((AbstractButton)c).getMargin();
    }
    if ((margin == null) || ((margin instanceof UIResource)))
    {
      left = left;
      top = top;
      right = right;
      bottom = bottom;
    }
    else
    {
      left = left;
      top = top;
      right = right;
      bottom = bottom;
    }
    return insets;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.RolloverMarginBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$SeparatorBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$SeparatorBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(0, 3, 2, 1);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    g.translate(x, y);
    g.setColor(UIManager.getColor("Separator.foreground"));
    g.drawLine(0, h - 2, w - 1, h - 2);
    
    g.setColor(UIManager.getColor("Separator.background"));
    g.drawLine(0, h - 1, w - 1, h - 1);
    g.translate(-x, -y);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$SeparatorBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.SeparatorBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$ThinLoweredBorder
  extends AbstractBorder
  implements UIResource
{
  private static final Insets INSETS = new Insets(1, 1, 1, 1);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.ThinLoweredBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$ThinRaisedBorder
  extends AbstractBorder
  implements UIResource
{
  private static final Insets INSETS = new Insets(1, 1, 1, 1);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    WindowsUtils.drawFlush3DBorder(g, x, y, w, h);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.ThinRaisedBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.UIResource;

final class WindowsBorders$ToolBarHeaderBorder
  extends AbstractBorder
  implements UIResource
{
  WindowsBorders$ToolBarHeaderBorder(WindowsBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(1, 2, 2, 2);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    WindowsUtils.drawPressed3DBorder(g, x, y - 1, w, h + 1);
    WindowsUtils.drawFlush3DBorder(g, x + 1, y, w - 2, h - 1);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private WindowsBorders$ToolBarHeaderBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders.ToolBarHeaderBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.JButton;
import javax.swing.JToggleButton;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.border.AbstractBorder;
import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.BorderUIResource.CompoundBorderUIResource;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicBorders.MarginBorder;
import javax.swing.plaf.basic.BasicGraphicsUtils;

final class WindowsBorders
{
  private static Border menuBorder;
  private static Border xpMenuBorder;
  private static Border menuItemBorder;
  private static Border popupMenuBorder;
  private static Border noMarginPopupMenuBorder;
  private static Border separatorBorder;
  private static Border etchedBorder;
  private static Border menuBarHeaderBorder;
  private static Border toolBarHeaderBorder;
  private static Border rolloverButtonBorder;
  
  public static Border getButtonBorder()
  {
    UIDefaults table = UIManager.getLookAndFeelDefaults();
    Border outerBorder = new ButtonBorder(table.getColor("Button.shadow"), table.getColor("Button.darkShadow"), table.getColor("Button.light"), table.getColor("Button.highlight"), table.getColor("controlText"));
    
    Border buttonBorder = new BorderUIResource.CompoundBorderUIResource(outerBorder, new BasicBorders.MarginBorder());
    
    return buttonBorder;
  }
  
  static Border getMenuBorder()
  {
    if (menuBorder == null) {
      menuBorder = new BorderUIResource.CompoundBorderUIResource(new MenuBorder(null), new BasicBorders.MarginBorder());
    }
    return menuBorder;
  }
  
  static Border getXPMenuBorder()
  {
    if (xpMenuBorder == null) {
      xpMenuBorder = new BasicBorders.MarginBorder();
    }
    return xpMenuBorder;
  }
  
  static Border getMenuItemBorder()
  {
    if (menuItemBorder == null) {
      menuItemBorder = new BorderUIResource(new BasicBorders.MarginBorder());
    }
    return menuItemBorder;
  }
  
  static Border getSeparatorBorder()
  {
    if (separatorBorder == null) {
      separatorBorder = new BorderUIResource.CompoundBorderUIResource(new SeparatorBorder(null), new BasicBorders.MarginBorder());
    }
    return separatorBorder;
  }
  
  static Border getEtchedBorder()
  {
    if (etchedBorder == null) {
      etchedBorder = new BorderUIResource.CompoundBorderUIResource(new EtchedBorder(null), new BasicBorders.MarginBorder());
    }
    return etchedBorder;
  }
  
  static Border getMenuBarHeaderBorder()
  {
    if (menuBarHeaderBorder == null) {
      menuBarHeaderBorder = new BorderUIResource.CompoundBorderUIResource(new MenuBarHeaderBorder(null), new BasicBorders.MarginBorder());
    }
    return menuBarHeaderBorder;
  }
  
  static Border getPopupMenuBorder()
  {
    if (popupMenuBorder == null) {
      popupMenuBorder = new PopupMenuBorder(null);
    }
    return popupMenuBorder;
  }
  
  static Border getNoMarginPopupMenuBorder()
  {
    if (noMarginPopupMenuBorder == null) {
      noMarginPopupMenuBorder = new NoMarginPopupMenuBorder(null);
    }
    return noMarginPopupMenuBorder;
  }
  
  static Border getToolBarHeaderBorder()
  {
    if (toolBarHeaderBorder == null) {
      toolBarHeaderBorder = new BorderUIResource.CompoundBorderUIResource(new ToolBarHeaderBorder(null), new BasicBorders.MarginBorder());
    }
    return toolBarHeaderBorder;
  }
  
  static Border getRolloverButtonBorder()
  {
    if (rolloverButtonBorder == null) {
      rolloverButtonBorder = new CompoundBorder(new RolloverButtonBorder(null), new RolloverMarginBorder(null));
    }
    return rolloverButtonBorder;
  }
  
  private static final class ButtonBorder
    extends AbstractBorder
    implements UIResource
  {
    private static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);
    private final Color shadow;
    private final Color darkShadow;
    private final Color highlight;
    private final Color lightHighlight;
    private final Color defaultColor;
    
    public ButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight, Color defaultColor)
    {
      this.shadow = shadow;
      this.darkShadow = darkShadow;
      this.highlight = highlight;
      this.lightHighlight = lightHighlight;
      this.defaultColor = defaultColor;
    }
    
    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
    {
      boolean isPressed = false;
      boolean isDefault = false;
      if ((c instanceof AbstractButton))
      {
        AbstractButton b = (AbstractButton)c;
        ButtonModel model = b.getModel();
        
        isPressed = (model.isPressed()) && (model.isArmed());
        if ((c instanceof JButton)) {
          isDefault = ((JButton)c).isDefaultButton();
        }
      }
      WindowsBorders.drawBezel(g, x, y, width, height, isPressed, isDefault, shadow, darkShadow, highlight, lightHighlight, defaultColor);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return getBorderInsets(c, EMPTY_INSETS);
    }
    
    public Insets getBorderInsets(Component c, Insets insets)
    {
      top = 2;
      left = (bottom = right = 3);
      return insets;
    }
  }
  
  private static abstract class AbstractButtonBorder
    extends AbstractBorder
    implements UIResource
  {
    AbstractButtonBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(2, 2, 2, 2);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      AbstractButton button = (AbstractButton)c;
      ButtonModel model = button.getModel();
      if (model.isPressed()) {
        WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
      } else {
        WindowsUtils.drawFlush3DBorder(g, x, y, w, h);
      }
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private AbstractButtonBorder() {}
  }
  
  private static final class RolloverButtonBorder
    extends WindowsBorders.AbstractButtonBorder
  {
    private RolloverButtonBorder()
    {
      super();
    }
    
    RolloverButtonBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      AbstractButton b = (AbstractButton)c;
      ButtonModel model = b.getModel();
      if (!model.isEnabled()) {
        return;
      }
      if (!(c instanceof JToggleButton))
      {
        if (model.isRollover()) {
          super.paintBorder(c, g, x, y, w, h);
        }
        return;
      }
      if (model.isSelected()) {
        WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
      } else if (model.isRollover()) {
        super.paintBorder(c, g, x, y, w, h);
      }
    }
  }
  
  private static final class RolloverMarginBorder
    extends EmptyBorder
  {
    RolloverMarginBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private RolloverMarginBorder()
    {
      super(1, 1, 1);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return getBorderInsets(c, new Insets(0, 0, 0, 0));
    }
    
    public Insets getBorderInsets(Component c, Insets insets)
    {
      Insets margin = null;
      if ((c instanceof AbstractButton)) {
        margin = ((AbstractButton)c).getMargin();
      }
      if ((margin == null) || ((margin instanceof UIResource)))
      {
        left = left;
        top = top;
        right = right;
        bottom = bottom;
      }
      else
      {
        left = left;
        top = top;
        right = right;
        bottom = bottom;
      }
      return insets;
    }
  }
  
  private static final class SeparatorBorder
    extends AbstractBorder
    implements UIResource
  {
    SeparatorBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(0, 3, 2, 1);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      g.translate(x, y);
      g.setColor(UIManager.getColor("Separator.foreground"));
      g.drawLine(0, h - 2, w - 1, h - 2);
      
      g.setColor(UIManager.getColor("Separator.background"));
      g.drawLine(0, h - 1, w - 1, h - 1);
      g.translate(-x, -y);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private SeparatorBorder() {}
  }
  
  static final class ThinRaisedBorder
    extends AbstractBorder
    implements UIResource
  {
    private static final Insets INSETS = new Insets(1, 1, 1, 1);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      WindowsUtils.drawFlush3DBorder(g, x, y, w, h);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
  }
  
  static final class ThinLoweredBorder
    extends AbstractBorder
    implements UIResource
  {
    private static final Insets INSETS = new Insets(1, 1, 1, 1);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
  }
  
  private static final class EtchedBorder
    extends AbstractBorder
    implements UIResource
  {
    EtchedBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(2, 2, 2, 2);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
      WindowsUtils.drawFlush3DBorder(g, x + 1, y + 1, w - 2, h - 2);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private EtchedBorder() {}
  }
  
  private static final class MenuBarHeaderBorder
    extends AbstractBorder
    implements UIResource
  {
    MenuBarHeaderBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(2, 2, 1, 2);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      WindowsUtils.drawPressed3DBorder(g, x, y, w, h + 1);
      WindowsUtils.drawFlush3DBorder(g, x + 1, y + 1, w - 2, h - 1);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private MenuBarHeaderBorder() {}
  }
  
  private static final class PopupMenuBorder
    extends AbstractBorder
    implements UIResource
  {
    PopupMenuBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(3, 3, 3, 3);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      g.translate(x, y);
      g.setColor(UIManager.getColor("controlShadow"));
      g.drawRect(0, 0, w - 1, h - 1);
      g.setColor(UIManager.getColor("MenuItem.background"));
      g.drawRect(1, 1, w - 3, h - 3);
      g.drawRect(2, 2, w - 5, h - 5);
      g.translate(-x, -y);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private PopupMenuBorder() {}
  }
  
  private static final class NoMarginPopupMenuBorder
    extends AbstractBorder
    implements UIResource
  {
    NoMarginPopupMenuBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(1, 1, 1, 1);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      g.translate(x, y);
      g.setColor(UIManager.getColor("controlShadow"));
      g.drawRect(0, 0, w - 1, h - 1);
      
      g.translate(-x, -y);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private NoMarginPopupMenuBorder() {}
  }
  
  private static final class ToolBarHeaderBorder
    extends AbstractBorder
    implements UIResource
  {
    ToolBarHeaderBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(1, 2, 2, 2);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      WindowsUtils.drawPressed3DBorder(g, x, y - 1, w, h + 1);
      WindowsUtils.drawFlush3DBorder(g, x + 1, y, w - 2, h - 1);
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private ToolBarHeaderBorder() {}
  }
  
  private static final class MenuBorder
    extends AbstractBorder
    implements UIResource
  {
    MenuBorder(WindowsBorders.1 x0)
    {
      this();
    }
    
    private static final Insets INSETS = new Insets(1, 1, 1, 1);
    
    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
    {
      AbstractButton b = (AbstractButton)c;
      ButtonModel model = b.getModel();
      if (model.isSelected()) {
        WindowsUtils.drawPressed3DBorder(g, x, y, w, h);
      } else if (model.isRollover()) {
        WindowsUtils.drawFlush3DBorder(g, x, y, w, h);
      }
    }
    
    public Insets getBorderInsets(Component c)
    {
      return INSETS;
    }
    
    private MenuBorder() {}
  }
  
  private static void drawBezel(Graphics g, int x, int y, int w, int h, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight, Color defaultColor)
  {
    Color oldColor = g.getColor();
    g.translate(x, y);
    if ((isPressed) && (isDefault))
    {
      g.setColor(darkShadow);
      g.drawRect(0, 0, w - 1, h - 1);
      g.setColor(shadow);
      g.drawRect(1, 1, w - 3, h - 3);
    }
    else if (isPressed)
    {
      BasicGraphicsUtils.drawLoweredBezel(g, x, y, w, h, shadow, darkShadow, highlight, lightHighlight);
    }
    else if (isDefault)
    {
      g.setColor(defaultColor);
      g.drawRect(0, 0, w - 1, h - 1);
      
      g.setColor(lightHighlight);
      g.drawLine(1, 1, 1, h - 3);
      g.drawLine(2, 1, w - 3, 1);
      
      g.setColor(highlight);
      g.drawLine(2, 2, 2, h - 4);
      g.drawLine(3, 2, w - 4, 2);
      
      g.setColor(shadow);
      g.drawLine(2, h - 3, w - 3, h - 3);
      g.drawLine(w - 3, 2, w - 3, h - 4);
      
      g.setColor(darkShadow);
      g.drawLine(1, h - 2, w - 2, h - 2);
      g.drawLine(w - 2, h - 2, w - 2, 1);
    }
    else
    {
      g.setColor(lightHighlight);
      g.drawLine(0, 0, 0, h - 1);
      g.drawLine(1, 0, w - 2, 0);
      
      g.setColor(highlight);
      g.drawLine(1, 1, 1, h - 3);
      g.drawLine(2, 1, w - 3, 1);
      
      g.setColor(shadow);
      g.drawLine(1, h - 2, w - 2, h - 2);
      g.drawLine(w - 2, 1, w - 2, h - 3);
      
      g.setColor(darkShadow);
      g.drawLine(0, h - 1, w - 1, h - 1);
      g.drawLine(w - 1, h - 1, w - 1, 0);
    }
    g.translate(-x, -y);
    g.setColor(oldColor);
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsBorders
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.awt.Dimension;
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicGraphicsUtils;

public final class WindowsButtonUI
  extends com.sun.java.swing.plaf.windows.WindowsButtonUI
{
  public static ComponentUI createUI(JComponent b)
  {
    return new WindowsButtonUI();
  }
  
  public Dimension getPreferredSize(JComponent c)
  {
    AbstractButton b = (AbstractButton)c;
    Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b, b.getIconTextGap());
    if ((d != null) && (b.isFocusPainted()) && 
      (width % 2 == 0)) {
      width += 1;
    }
    return d;
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsButtonUI
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import javax.swing.plaf.UIResource;

final class WindowsComboBoxEditor$UIResource
  extends WindowsComboBoxEditor
  implements UIResource
{
  WindowsComboBoxEditor$UIResource(boolean isTableCellEditor)
  {
    super(isTableCellEditor);
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsComboBoxEditor.UIResource
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import com.jgoodies.looks.common.ComboBoxEditorTextField;
import javax.swing.JTextField;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicComboBoxEditor;

class WindowsComboBoxEditor
  extends BasicComboBoxEditor
{
  WindowsComboBoxEditor(boolean isTableCellEditor)
  {
    editor = new ComboBoxEditorTextField(isTableCellEditor);
  }
  
  public void setItem(Object item)
  {
    super.setItem(item);
    editor.selectAll();
  }
  
  static final class UIResource
    extends WindowsComboBoxEditor
    implements UIResource
  {
    UIResource(boolean isTableCellEditor)
    {
      super();
    }
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsComboBoxEditor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

class WindowsComboBoxUI$1 {}

/* Location:
 * Qualified Name:     com.jgoodies.looks.windows.WindowsComboBoxUI.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.windows;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JComboBox;
import javax.swing.plaf.UIResource;

final class WindowsComboBoxUI$TableCellEditorPropertyChangeHandler
  implements PropertyChangeListener
{
  private final WindowsComboBoxUI this$0;
  
  WindowsComboBoxUI$TableCellEditorPropertyChangeHandler(WindowsComboBoxUI x0, WindowsComboBoxUI.1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd