looks-2.2.0

tons";
  public static final String TAB_ICONS_ENABLED_KEY = "jgoodies.tabIconsEnabled";
  public static final String POPUP_DROP_SHADOW_ENABLED_KEY = "jgoodies.popupDropShadowEnabled";
  public static final String HI_RES_GRAY_FILTER_ENABLED_KEY = "HiResGrayFilterEnabled";
  public static final String SELECT_ON_FOCUS_GAIN_KEY = "JGoodies.selectAllOnFocusGain";
  public static final String IS_ETCHED_KEY = "jgoodies.isEtched";
  public static final String HEADER_STYLE_KEY = "jgoodies.headerStyle";
  public static final String NO_ICONS_KEY = "jgoodies.noIcons";
  public static final String NO_MARGIN_KEY = "JPopupMenu.noMargin";
  public static final String TREE_LINE_STYLE_KEY = "JTree.lineStyle";
  public static final String TREE_LINE_STYLE_ANGLED_VALUE = "Angled";
  public static final String TREE_LINE_STYLE_NONE_VALUE = "None";
  public static final String NO_CONTENT_BORDER_KEY = "jgoodies.noContentBorder";
  public static final String EMBEDDED_TABS_KEY = "jgoodies.embeddedTabs";
  public static final String COMBO_POPUP_PROTOTYPE_DISPLAY_VALUE_KEY = "ComboBox.popupPrototypeDisplayValue";
  public static final String COMBO_RENDERER_IS_BORDER_REMOVABLE = "isBorderRemovable";
  public static final String HI_RES_DISABLED_ICON_CLIENT_KEY = "generateHiResDisabledIcon";
  public static final String SELECT_ON_FOCUS_GAIN_CLIENT_KEY = "JGoodies.selectAllOnFocusGain";
  public static final String INVERT_SELECTION_CLIENT_KEY = "JGoodies.invertSelection";
  public static final String SET_CARET_TO_START_ON_FOCUS_LOST_CLIENT_KEY = "JGoodies.setCaretToStartOnFocusLost";
  
  static
  {
    initializeDefaultReplacements();
  }
  
  private static final Boolean USE_SYSTEM_FONTS_SYSTEM_VALUE = LookUtils.getBooleanSystemProperty("swing.useSystemFontSettings", "Use system fonts");
  private static final Boolean USE_NARROW_BUTTONS_SYSTEM_VALUE = LookUtils.getBooleanSystemProperty("jgoodies.useNarrowButtons", "Use narrow buttons");
  private static final Boolean TAB_ICONS_ENABLED_SYSTEM_VALUE = LookUtils.getBooleanSystemProperty("jgoodies.tabIconsEnabled", "Icons in tabbed panes");
  private static final Boolean POPUP_DROP_SHADOW_ENABLED_SYSTEM_VALUE = LookUtils.getBooleanSystemProperty("jgoodies.popupDropShadowEnabled", "Popup drop shadows");
  private static final Dimension DEFAULT_ICON_SIZE = new Dimension(20, 20);
  public static final String NO_REPLACEMENT = "none";
  
  public static boolean getUseSystemFonts()
  {
    return !Boolean.FALSE.equals(UIManager.get("Application.useSystemFontSettings")) ? true : USE_SYSTEM_FONTS_SYSTEM_VALUE != null ? USE_SYSTEM_FONTS_SYSTEM_VALUE.booleanValue() : false;
  }
  
  public static void setUseSystemFonts(boolean useSystemFonts)
  {
    UIManager.put("Application.useSystemFontSettings", Boolean.valueOf(useSystemFonts));
  }
  
  public static Dimension getDefaultIconSize()
  {
    Dimension size = UIManager.getDimension("jgoodies.defaultIconSize");
    return size == null ? DEFAULT_ICON_SIZE : size;
  }
  
  public static void setDefaultIconSize(Dimension defaultIconSize)
  {
    UIManager.put("jgoodies.defaultIconSize", defaultIconSize);
  }
  
  public static boolean getUseNarrowButtons()
  {
    return !Boolean.FALSE.equals(UIManager.get("jgoodies.useNarrowButtons")) ? true : USE_NARROW_BUTTONS_SYSTEM_VALUE != null ? USE_NARROW_BUTTONS_SYSTEM_VALUE.booleanValue() : false;
  }
  
  public static void setUseNarrowButtons(boolean b)
  {
    UIManager.put("jgoodies.useNarrowButtons", Boolean.valueOf(b));
  }
  
  public static boolean isTabIconsEnabled()
  {
    return !Boolean.FALSE.equals(UIManager.get("jgoodies.tabIconsEnabled")) ? true : TAB_ICONS_ENABLED_SYSTEM_VALUE != null ? TAB_ICONS_ENABLED_SYSTEM_VALUE.booleanValue() : false;
  }
  
  public static void setTabIconsEnabled(boolean b)
  {
    UIManager.put("jgoodies.tabIconsEnabled", Boolean.valueOf(b));
  }
  
  public static boolean isPopupDropShadowActive()
  {
    return (!LookUtils.getToolkitUsesNativeDropShadows()) && (ShadowPopup.canSnapshot()) && (isPopupDropShadowEnabled());
  }
  
  public static boolean isPopupDropShadowEnabled()
  {
    if (POPUP_DROP_SHADOW_ENABLED_SYSTEM_VALUE != null) {
      return POPUP_DROP_SHADOW_ENABLED_SYSTEM_VALUE.booleanValue();
    }
    Object value = UIManager.get("jgoodies.popupDropShadowEnabled");
    return value == null ? isPopupDropShadowEnabledDefault() : Boolean.TRUE.equals(value);
  }
  
  public static void setPopupDropShadowEnabled(boolean b)
  {
    UIManager.put("jgoodies.popupDropShadowEnabled", Boolean.valueOf(b));
  }
  
  private static boolean isPopupDropShadowEnabledDefault()
  {
    return LookUtils.IS_OS_WINDOWS_MODERN;
  }
  
  public static boolean isHiResGrayFilterEnabled()
  {
    return !Boolean.FALSE.equals(UIManager.get("HiResGrayFilterEnabled"));
  }
  
  public static void setHiResGrayFilterEnabled(boolean b)
  {
    UIManager.put("HiResGrayFilterEnabled", Boolean.valueOf(b));
  }
  
  public static boolean isSelectOnFocusGainEnabled()
  {
    return !Boolean.FALSE.equals(UIManager.get("JGoodies.selectAllOnFocusGain"));
  }
  
  public static void setSelectOnFocusGainEnabled(boolean b)
  {
    UIManager.put("JGoodies.selectAllOnFocusGain", Boolean.valueOf(b));
  }
  
  public static boolean isSelectOnFocusGainActive(JTextComponent c)
  {
    Boolean enabled = getSelectOnFocusGainEnabled(c);
    if (enabled != null) {
      return enabled.booleanValue();
    }
    return isSelectOnFocusGainEnabled();
  }
  
  public static Boolean getSelectOnFocusGainEnabled(JTextComponent c)
  {
    return (Boolean)c.getClientProperty("JGoodies.selectAllOnFocusGain");
  }
  
  public static void setSelectOnFocusGainEnabled(JTextField field, Boolean b)
  {
    field.putClientProperty("JGoodies.selectAllOnFocusGain", b);
  }
  
  public static void putLookAndFeelReplacement(String original, String replacement)
  {
    LAF_REPLACEMENTS.put(original, replacement);
  }
  
  public static void removeLookAndFeelReplacement(String original)
  {
    LAF_REPLACEMENTS.remove(original);
  }
  
  private static void initializeDefaultReplacements()
  {
    putLookAndFeelReplacement("javax.swing.plaf.metal.MetalLookAndFeel", "com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
    
    putLookAndFeelReplacement("com.sun.java.swing.plaf.windows.WindowsLookAndFeel", "com.jgoodies.looks.windows.WindowsLookAndFeel");
    
    putLookAndFeelReplacement("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel", "none");
  }
  
  public static String getReplacementClassNameFor(String className)
  {
    String replacement = (String)LAF_REPLACEMENTS.get(className);
    if (replacement == null) {
      return className;
    }
    if (replacement.equals("none")) {
      return null;
    }
    return replacement;
  }
  
  public static String getCrossPlatformLookAndFeelClassName()
  {
    return "com.jgoodies.looks.plastic.PlasticXPLookAndFeel";
  }
  
  public static String getSystemLookAndFeelClassName()
  {
    if (LookUtils.IS_OS_WINDOWS) {
      return "com.jgoodies.looks.windows.WindowsLookAndFeel";
    }
    if (LookUtils.IS_OS_MAC) {
      return UIManager.getSystemLookAndFeelClassName();
    }
    return getCrossPlatformLookAndFeelClassName();
  }
}

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

import java.awt.event.MouseEvent;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.plaf.basic.BasicButtonListener;

final class ActiveBasicButtonListener
  extends BasicButtonListener
{
  private boolean mouseOver;
  
  ActiveBasicButtonListener(AbstractButton b)
  {
    super(b);
    mouseOver = false;
  }
  
  public void mouseEntered(MouseEvent e)
  {
    super.mouseEntered(e);
    AbstractButton button = (AbstractButton)e.getSource();
    button.getModel().setArmed(mouseOver = 1);
  }
  
  public void mouseExited(MouseEvent e)
  {
    super.mouseExited(e);
    AbstractButton button = (AbstractButton)e.getSource();
    button.getModel().setArmed(mouseOver = 0);
  }
  
  public void mouseReleased(MouseEvent e)
  {
    super.mouseReleased(e);
    AbstractButton button = (AbstractButton)e.getSource();
    button.getModel().setArmed(mouseOver);
  }
}

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

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.awt.image.IndexColorModel;

final class BumpBuffer
{
  static final int IMAGE_SIZE = 64;
  static Dimension imageSize = new Dimension(64, 64);
  transient Image image;
  Color topColor;
  Color shadowColor;
  Color backColor;
  private final GraphicsConfiguration gc;
  
  public BumpBuffer(GraphicsConfiguration gc, Color aTopColor, Color aShadowColor, Color aBackColor)
  {
    this.gc = gc;
    topColor = aTopColor;
    shadowColor = aShadowColor;
    backColor = aBackColor;
    createImage();
    fillBumpBuffer();
  }
  
  public boolean hasSameConfiguration(GraphicsConfiguration aGC, Color aTopColor, Color aShadowColor, Color aBackColor)
  {
    if (gc != null)
    {
      if (!gc.equals(aGC)) {
        return false;
      }
    }
    else if (aGC != null) {
      return false;
    }
    return (topColor.equals(aTopColor)) && (shadowColor.equals(aShadowColor)) && (backColor.equals(aBackColor));
  }
  
  public Image getImage()
  {
    return image;
  }
  
  public Dimension getImageSize()
  {
    return imageSize;
  }
  
  private void fillBumpBuffer()
  {
    Graphics g = image.getGraphics();
    
    g.setColor(backColor);
    g.fillRect(0, 0, 64, 64);
    
    g.setColor(topColor);
    for (int x = 0; x < 64; x += 4) {
      for (int y = 0; y < 64; y += 4)
      {
        g.drawLine(x, y, x, y);
        g.drawLine(x + 2, y + 2, x + 2, y + 2);
      }
    }
    g.setColor(shadowColor);
    for (int x = 0; x < 64; x += 4) {
      for (int y = 0; y < 64; y += 4)
      {
        g.drawLine(x + 1, y + 1, x + 1, y + 1);
        g.drawLine(x + 3, y + 3, x + 3, y + 3);
      }
    }
    g.dispose();
  }
  
  private void createImage()
  {
    if (gc != null)
    {
      image = gc.createCompatibleImage(64, 64);
    }
    else
    {
      int[] cmap = { backColor.getRGB(), topColor.getRGB(), shadowColor.getRGB() };
      IndexColorModel icm = new IndexColorModel(8, 3, cmap, 0, false, -1, 0);
      
      image = new BufferedImage(64, 64, 13, icm);
    }
  }
}

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

import javax.swing.UIDefaults;

public class Plastic3DLookAndFeel
  extends PlasticLookAndFeel
{
  public String getID()
  {
    return "JGoodies Plastic 3D";
  }
  
  public String getName()
  {
    return "JGoodies Plastic 3D";
  }
  
  public String getDescription()
  {
    return "The JGoodies Plastic 3D Look and Feel -  2001-2008 JGoodies Karsten Lentzsch";
  }
  
  protected boolean is3DEnabled()
  {
    return true;
  }
  
  protected void initComponentDefaults(UIDefaults table)
  {
    super.initComponentDefaults(table);
    
    Object menuBarBorder = PlasticBorders.getThinRaisedBorder();
    Object toolBarBorder = PlasticBorders.getThinRaisedBorder();
    
    Object[] defaults = { "MenuBar.border", menuBarBorder, "ToolBar.border", toolBarBorder };
    
    table.putDefaults(defaults);
  }
  
  protected static void installDefaultThemes() {}
}

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

import java.awt.Color;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.ButtonModel;
import javax.swing.UIManager;
import javax.swing.plaf.metal.MetalScrollButton;

class PlasticArrowButton
  extends MetalScrollButton
{
  private final Color shadowColor;
  private final Color highlightColor;
  protected boolean isFreeStanding;
  
  public PlasticArrowButton(int direction, int width, boolean freeStanding)
  {
    super(direction, width, freeStanding);
    shadowColor = UIManager.getColor("ScrollBar.darkShadow");
    highlightColor = UIManager.getColor("ScrollBar.highlight");
    isFreeStanding = freeStanding;
  }
  
  public void setFreeStanding(boolean freeStanding)
  {
    super.setFreeStanding(freeStanding);
    isFreeStanding = freeStanding;
  }
  
  public void paint(Graphics g)
  {
    boolean leftToRight = PlasticUtils.isLeftToRight(this);
    boolean isEnabled = getParent().isEnabled();
    boolean isPressed = getModel().isPressed();
    
    Color arrowColor = isEnabled ? PlasticLookAndFeel.getControlInfo() : PlasticLookAndFeel.getControlDisabled();
    
    int width = getWidth();
    int height = getHeight();
    int w = width;
    int h = height;
    int arrowHeight = calculateArrowHeight(height, width);
    int arrowOffset = calculateArrowOffset();
    boolean paintNorthBottom = isPaintingNorthBottom();
    
    g.setColor(isPressed ? PlasticLookAndFeel.getControlShadow() : getBackground());
    g.fillRect(0, 0, width, height);
    if (getDirection() == 1) {
      paintNorth(g, leftToRight, isEnabled, arrowColor, isPressed, width, height, w, h, arrowHeight, arrowOffset, paintNorthBottom);
    } else if (getDirection() == 5) {
      paintSouth(g, leftToRight, isEnabled, arrowColor, isPressed, width, height, w, h, arrowHeight, arrowOffset);
    } else if (getDirection() == 3) {
      paintEast(g, isEnabled, arrowColor, isPressed, width, height, w, h, arrowHeight);
    } else if (getDirection() == 7) {
      paintWest(g, isEnabled, arrowColor, isPressed, width, height, w, h, arrowHeight);
    }
    if (PlasticUtils.is3D("ScrollBar.")) {
      paint3D(g);
    }
  }
  
  protected int calculateArrowHeight(int height, int width)
  {
    return (height + 1) / 4;
  }
  
  protected int calculateArrowOffset()
  {
    return 0;
  }
  
  protected boolean isPaintingNorthBottom()
  {
    return false;
  }
  
  private void paintWest(Graphics g, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight)
  {
    if (!isFreeStanding)
    {
      height += 2;
      width++;
      g.translate(-1, 0);
    }
    g.setColor(arrowColor);
    
    int startX = (w + 1 - arrowHeight) / 2;
    int startY = h / 2;
    for (int line = 0; line < arrowHeight; line++) {
      g.drawLine(startX + line, startY - line, startX + line, startY + line + 1);
    }
    if (isEnabled)
    {
      g.setColor(highlightColor);
      if (!isPressed)
      {
        g.drawLine(1, 1, width - 1, 1);
        g.drawLine(1, 1, 1, height - 3);
      }
      g.drawLine(1, height - 1, width - 1, height - 1);
      
      g.setColor(shadowColor);
      g.drawLine(0, 0, width - 1, 0);
      g.drawLine(0, 0, 0, height - 2);
      g.drawLine(1, height - 2, width - 1, height - 2);
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, 0, 0, width + 1, height);
    }
    if (!isFreeStanding)
    {
      height -= 2;
      width--;
      g.translate(1, 0);
    }
  }
  
  private void paintEast(Graphics g, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight)
  {
    if (!isFreeStanding)
    {
      height += 2;
      width++;
    }
    g.setColor(arrowColor);
    
    int startX = (w + 1 - arrowHeight) / 2 + arrowHeight - 1;
    int startY = h / 2;
    for (int line = 0; line < arrowHeight; line++) {
      g.drawLine(startX - line, startY - line, startX - line, startY + line + 1);
    }
    if (isEnabled)
    {
      g.setColor(highlightColor);
      if (!isPressed)
      {
        g.drawLine(0, 1, width - 3, 1);
        g.drawLine(0, 1, 0, height - 3);
      }
      g.drawLine(width - 1, 1, width - 1, height - 1);
      g.drawLine(0, height - 1, width - 1, height - 1);
      
      g.setColor(shadowColor);
      g.drawLine(0, 0, width - 2, 0);
      g.drawLine(width - 2, 1, width - 2, height - 2);
      g.drawLine(0, height - 2, width - 2, height - 2);
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, -1, 0, width + 1, height);
    }
    if (!isFreeStanding)
    {
      height -= 2;
      width--;
    }
  }
  
  protected void paintSouth(Graphics g, boolean leftToRight, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight, int arrowOffset)
  {
    if (!isFreeStanding)
    {
      height++;
      if (!leftToRight)
      {
        width++;
        g.translate(-1, 0);
      }
      else
      {
        width += 2;
      }
    }
    g.setColor(arrowColor);
    
    int startY = (h + 0 - arrowHeight) / 2 + arrowHeight - 1;
    int startX = w / 2;
    for (int line = 0; line < arrowHeight; line++) {
      g.fillRect(startX - line - arrowOffset, startY - line, 2 * (line + 1), 1);
    }
    if (isEnabled)
    {
      g.setColor(highlightColor);
      if (!isPressed)
      {
        g.drawLine(1, 0, width - 3, 0);
        g.drawLine(1, 0, 1, height - 3);
      }
      g.drawLine(0, height - 1, width - 1, height - 1);
      g.drawLine(width - 1, 0, width - 1, height - 1);
      
      g.setColor(shadowColor);
      g.drawLine(0, 0, 0, height - 2);
      g.drawLine(width - 2, 0, width - 2, height - 2);
      g.drawLine(1, height - 2, width - 2, height - 2);
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, 0, -1, width, height + 1);
    }
    if (!isFreeStanding)
    {
      height--;
      if (!leftToRight)
      {
        width--;
        g.translate(1, 0);
      }
      else
      {
        width -= 2;
      }
    }
  }
  
  protected void paintNorth(Graphics g, boolean leftToRight, boolean isEnabled, Color arrowColor, boolean isPressed, int width, int height, int w, int h, int arrowHeight, int arrowOffset, boolean paintBottom)
  {
    if (!isFreeStanding)
    {
      height++;
      g.translate(0, -1);
      if (!leftToRight)
      {
        width++;
        g.translate(-1, 0);
      }
      else
      {
        width += 2;
      }
    }
    g.setColor(arrowColor);
    int startY = (h + 1 - arrowHeight) / 2;
    int startX = w / 2;
    for (int line = 0; line < arrowHeight; line++) {
      g.fillRect(startX - line - arrowOffset, startY + line, 2 * (line + 1), 1);
    }
    if (isEnabled)
    {
      g.setColor(highlightColor);
      if (!isPressed)
      {
        g.drawLine(1, 1, width - 3, 1);
        g.drawLine(1, 1, 1, height - 1);
      }
      g.drawLine(width - 1, 1, width - 1, height - 1);
      
      g.setColor(shadowColor);
      g.drawLine(0, 0, width - 2, 0);
      g.drawLine(0, 0, 0, height - 1);
      g.drawLine(width - 2, 1, width - 2, height - 1);
      if (paintBottom) {
        g.fillRect(0, height - 1, width - 1, 1);
      }
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, 0, 0, width, height + 1);
      if (paintBottom)
      {
        g.setColor(PlasticLookAndFeel.getControlShadow());
        g.fillRect(0, height - 1, width - 1, 1);
      }
    }
    if (!isFreeStanding)
    {
      height--;
      g.translate(0, 1);
      if (!leftToRight)
      {
        width--;
        g.translate(1, 0);
      }
      else
      {
        width -= 2;
      }
    }
  }
  
  private void paint3D(Graphics g)
  {
    ButtonModel buttonModel = getModel();
    if (((buttonModel.isArmed()) && (buttonModel.isPressed())) || (buttonModel.isSelected())) {
      return;
    }
    int width = getWidth();
    int height = getHeight();
    if (getDirection() == 3) {
      width -= 2;
    } else if (getDirection() == 5) {
      height -= 2;
    }
    Rectangle r = new Rectangle(1, 1, width, height);
    boolean isHorizontal = (getDirection() == 3) || (getDirection() == 7);
    PlasticUtils.addLight3DEffekt(g, r, isHorizontal);
  }
}

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

class PlasticBorders$1 {}

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

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;

class PlasticBorders$ButtonBorder
  extends AbstractBorder
  implements UIResource
{
  protected final Insets insets;
  
  protected PlasticBorders$ButtonBorder(Insets insets)
  {
    this.insets = insets;
  }
  
  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.isEnabled())
    {
      boolean isPressed = (model.isPressed()) && (model.isArmed());
      boolean isDefault = ((button instanceof JButton)) && (((JButton)button).isDefaultButton());
      if ((isPressed) && (isDefault)) {
        PlasticUtils.drawDefaultButtonPressedBorder(g, x, y, w, h);
      } else if (isPressed) {
        PlasticUtils.drawPressed3DBorder(g, x, y, w, h);
      } else if (isDefault) {
        PlasticUtils.drawDefaultButtonBorder(g, x, y, w, h, false);
      } else {
        PlasticUtils.drawButtonBorder(g, x, y, w, h, false);
      }
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, x, y, w - 1, h - 1);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return insets;
  }
  
  public Insets getBorderInsets(Component c, Insets newInsets)
  {
    top = insets.top;
    left = insets.left;
    bottom = insets.bottom;
    right = insets.right;
    return newInsets;
  }
}

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

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 PlasticBorders$ComboBoxArrowButtonBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$ComboBoxArrowButtonBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  protected 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 button = (AbstractButton)c;
    ButtonModel model = button.getModel();
    if (model.isEnabled())
    {
      boolean isPressed = (model.isPressed()) && (model.isArmed());
      if (isPressed) {
        PlasticUtils.drawPressed3DBorder(g, x, y, w, h);
      } else {
        PlasticUtils.drawButtonBorder(g, x, y, w, h, false);
      }
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, x, y, w - 1, h - 1);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$ComboBoxArrowButtonBorder() {}
}

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

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

final class PlasticBorders$ComboBoxEditorBorder
  extends AbstractBorder
{
  PlasticBorders$ComboBoxEditorBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(2, 2, 2, 0);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    if (c.isEnabled())
    {
      PlasticUtils.drawFlush3DBorder(g, x, y, w + 2, h);
    }
    else
    {
      PlasticUtils.drawDisabledBorder(g, x, y, w + 2, h - 1);
      g.setColor(UIManager.getColor("control"));
      g.drawLine(x, y + h - 1, x + w, y + h - 1);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$ComboBoxEditorBorder() {}
}

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

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

final class PlasticBorders$EtchedBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$EtchedBorder(PlasticBorders.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)
  {
    PlasticUtils.drawThinPressed3DBorder(g, x, y, w, h);
    PlasticUtils.drawThinFlush3DBorder(g, x + 1, y + 1, w - 2, h - 2);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$EtchedBorder() {}
}

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

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

class PlasticBorders$Flush3DBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$Flush3DBorder(PlasticBorders.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)
  {
    if (c.isEnabled()) {
      PlasticUtils.drawFlush3DBorder(g, x, y, w, h);
    } else {
      PlasticUtils.drawDisabledBorder(g, x, y, w, h);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  public Insets getBorderInsets(Component c, Insets newInsets)
  {
    top = INSETStop;
    left = INSETSleft;
    bottom = INSETSbottom;
    right = INSETSright;
    return newInsets;
  }
  
  private PlasticBorders$Flush3DBorder() {}
}

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

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

final class PlasticBorders$InternalFrameBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$InternalFrameBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  private static final Insets NORMAL_INSETS = new Insets(1, 1, 1, 1);
  private static final Insets MAXIMIZED_INSETS = new Insets(1, 1, 0, 0);
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    JInternalFrame frame = (JInternalFrame)c;
    if (frame.isMaximum()) {
      paintMaximizedBorder(g, x, y, w, h);
    } else {
      PlasticUtils.drawThinFlush3DBorder(g, x, y, w, h);
    }
  }
  
  private void paintMaximizedBorder(Graphics g, int x, int y, int w, int h)
  {
    g.translate(x, y);
    g.setColor(PlasticLookAndFeel.getControlHighlight());
    g.drawLine(0, 0, w - 2, 0);
    g.drawLine(0, 0, 0, h - 2);
    g.translate(-x, -y);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return ((JInternalFrame)c).isMaximum() ? MAXIMIZED_INSETS : NORMAL_INSETS;
  }
  
  private PlasticBorders$InternalFrameBorder() {}
}

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

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

final class PlasticBorders$MenuBarHeaderBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$MenuBarHeaderBorder(PlasticBorders.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)
  {
    PlasticUtils.drawThinPressed3DBorder(g, x, y, w, h + 1);
    PlasticUtils.drawThinFlush3DBorder(g, x + 1, y + 1, w - 2, h - 1);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$MenuBarHeaderBorder() {}
}

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

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

final class PlasticBorders$MenuBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$MenuBorder(PlasticBorders.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)
  {
    JMenuItem b = (JMenuItem)c;
    ButtonModel model = b.getModel();
    if ((model.isArmed()) || (model.isSelected()))
    {
      g.setColor(PlasticLookAndFeel.getControlDarkShadow());
      g.drawLine(0, 0, w - 2, 0);
      g.drawLine(0, 0, 0, h - 1);
      
      g.setColor(PlasticLookAndFeel.getPrimaryControlHighlight());
      g.drawLine(w - 1, 0, w - 1, h - 1);
    }
    else if (model.isRollover())
    {
      g.translate(x, y);
      PlasticUtils.drawFlush3DBorder(g, x, y, w, h);
      g.translate(-x, -y);
    }
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  public Insets getBorderInsets(Component c, Insets newInsets)
  {
    top = INSETStop;
    left = INSETSleft;
    bottom = INSETSbottom;
    right = INSETSright;
    return newInsets;
  }
  
  private PlasticBorders$MenuBorder() {}
}

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

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

final class PlasticBorders$NoMarginPopupMenuBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$NoMarginPopupMenuBorder(PlasticBorders.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(PlasticLookAndFeel.getControlDarkShadow());
    g.drawRect(0, 0, w - 1, h - 1);
    g.translate(-x, -y);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$NoMarginPopupMenuBorder() {}
}

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

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

final class PlasticBorders$PaletteBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$PaletteBorder(PlasticBorders.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(PlasticLookAndFeel.getControlDarkShadow());
    g.drawRect(0, 0, w - 1, h - 1);
    g.translate(-x, -y);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$PaletteBorder() {}
}

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

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

final class PlasticBorders$PopupMenuBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$PopupMenuBorder(PlasticBorders.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(PlasticLookAndFeel.getControlDarkShadow());
    g.drawRect(0, 0, w - 1, h - 1);
    g.setColor(PlasticLookAndFeel.getMenuItemBackground());
    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 PlasticBorders$PopupMenuBorder() {}
}

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

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

class PlasticBorders$RolloverButtonBorder
  extends PlasticBorders.ButtonBorder
{
  PlasticBorders$RolloverButtonBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  private PlasticBorders$RolloverButtonBorder()
  {
    super(new Insets(3, 3, 3, 3));
  }
  
  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()) && ((!model.isPressed()) || (model.isArmed()))) {
        super.paintBorder(c, g, x, y, w, h);
      }
      return;
    }
    if (model.isRollover())
    {
      if ((model.isPressed()) && (model.isArmed())) {
        PlasticUtils.drawPressed3DBorder(g, x, y, w, h);
      } else {
        PlasticUtils.drawFlush3DBorder(g, x, y, w, h);
      }
    }
    else if (model.isSelected()) {
      PlasticUtils.drawDark3DBorder(g, x, y, w, h);
    }
  }
}

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

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

final class PlasticBorders$RolloverMarginBorder
  extends EmptyBorder
{
  PlasticBorders$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.plastic.PlasticBorders.RolloverMarginBorder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.jgoodies.looks.plastic;

import java.awt.Component;
import java.awt.Graphics;
import javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder;

final class PlasticBorders$ScrollPaneBorder
  extends MetalBorders.ScrollPaneBorder
{
  PlasticBorders$ScrollPaneBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    g.translate(x, y);
    
    g.setColor(PlasticLookAndFeel.getControlDarkShadow());
    g.drawRect(0, 0, w - 2, h - 2);
    g.setColor(PlasticLookAndFeel.getControlHighlight());
    g.drawLine(w - 1, 0, w - 1, h - 1);
    g.drawLine(0, h - 1, w - 1, h - 1);
    
    g.translate(-x, -y);
  }
  
  private PlasticBorders$ScrollPaneBorder() {}
}

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

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 PlasticBorders$SeparatorBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$SeparatorBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  private static final Insets INSETS = new Insets(0, 0, 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 PlasticBorders$SeparatorBorder() {}
}

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

import java.awt.Component;
import java.awt.Graphics;
import javax.swing.text.JTextComponent;

final class PlasticBorders$TextFieldBorder
  extends PlasticBorders.Flush3DBorder
{
  private PlasticBorders$TextFieldBorder()
  {
    super(null);
  }
  
  PlasticBorders$TextFieldBorder(PlasticBorders.1 x0)
  {
    this();
  }
  
  public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
  {
    if (!(c instanceof JTextComponent))
    {
      if (c.isEnabled()) {
        PlasticUtils.drawFlush3DBorder(g, x, y, w, h);
      } else {
        PlasticUtils.drawDisabledBorder(g, x, y, w, h);
      }
      return;
    }
    if ((c.isEnabled()) && (((JTextComponent)c).isEditable())) {
      PlasticUtils.drawFlush3DBorder(g, x, y, w, h);
    } else {
      PlasticUtils.drawDisabledBorder(g, x, y, w, h);
    }
  }
}

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

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

final class PlasticBorders$ThinLoweredBorder
  extends AbstractBorder
  implements UIResource
{
  PlasticBorders$ThinLoweredBorder(PlasticBorders.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)
  {
    PlasticUtils.drawThinPressed3DBorder(g, x, y, w, h);
  }
  
  public Insets getBorderInsets(Component c)
  {
    return INSETS;
  }
  
  private PlasticBorders$ThinLoweredBorder() {}
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.PlasticBorders.ThinLoweredBorder
 * Java Class Version: 1.4 (48.0)
 * J
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