looks-2.2.0

 g.fillRect(x, y, w + 1, h);
  }
  
  protected void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    int bottom = h;
    int right = w + 1;
    
    g.translate(x, y);
    if (isFirstDisplayedTab(tabIndex, x, tabPane.getBounds().x))
    {
      if (isSelected)
      {
        g.setColor(shadowColor);
        g.fillRect(right, 0, 1, bottom - 1);
        g.fillRect(right - 1, bottom - 1, 1, 1);
        
        g.setColor(selectHighlight);
        g.fillRect(0, 0, 1, bottom);
        g.fillRect(right - 1, 0, 1, bottom - 1);
        g.fillRect(1, bottom - 1, right - 2, 1);
      }
    }
    else if (isSelected)
    {
      g.setColor(shadowColor);
      g.fillRect(0, 0, 1, bottom - 1);
      g.fillRect(1, bottom - 1, 1, 1);
      g.fillRect(right, 0, 1, bottom - 1);
      g.fillRect(right - 1, bottom - 1, 1, 1);
      
      g.setColor(selectHighlight);
      g.fillRect(1, 0, 1, bottom - 1);
      g.fillRect(right - 1, 0, 1, bottom - 1);
      g.fillRect(2, bottom - 1, right - 3, 1);
    }
    else
    {
      g.setColor(shadowColor);
      g.fillRect(1, h / 2, 1, h - h / 2);
    }
    g.translate(-x, -y);
  }
  
  protected void paintContentBorderBottomEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted)
  {
    g.setColor(shadowColor);
    g.fillRect(x, y + h - 1, w, 1);
  }
  
  protected void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {}
}

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

import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;

final class PlasticTabbedPaneUI$BottomRenderer
  extends PlasticTabbedPaneUI.AbstractRenderer
{
  PlasticTabbedPaneUI$BottomRenderer(JTabbedPane x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  private PlasticTabbedPaneUI$BottomRenderer(JTabbedPane tabPane)
  {
    super(tabPane, null);
  }
  
  protected Insets getTabAreaInsets(Insets defaultInsets)
  {
    return new Insets(top, left + 5, bottom, right);
  }
  
  protected int getTabLabelShiftY(int tabIndex, boolean isSelected)
  {
    return isSelected ? 0 : -1;
  }
  
  protected int getTabRunOverlay(int tabRunOverlay)
  {
    return tabRunOverlay - 2;
  }
  
  protected int getTabRunIndent(int run)
  {
    return 6 * run;
  }
  
  protected Insets getSelectedTabPadInsets()
  {
    return SOUTH_INSETS;
  }
  
  protected Insets getTabInsets(int tabIndex, Insets tabInsets)
  {
    return new Insets(top, left - 2, bottom, right - 2);
  }
  
  protected void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
  {
    if ((!tabPane.hasFocus()) || (!isSelected)) {
      return;
    }
    Rectangle tabRect = rects[tabIndex];
    int top = y;
    int left = x + 6;
    int height = height - 3;
    int width = width - 12;
    g.setColor(focus);
    g.drawRect(left, top, width, height);
  }
  
  protected void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    g.setColor(selectColor);
    g.fillRect(x, y, w, h);
  }
  
  protected void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    int bottom = h - 1;
    int right = w + 4;
    
    g.translate(x - 3, y);
    
    g.setColor(selectHighlight);
    
    g.fillRect(0, 0, 1, 2);
    g.drawLine(0, 2, 4, bottom - 4);
    g.fillRect(5, bottom - 3, 1, 2);
    g.fillRect(6, bottom - 1, 1, 1);
    
    g.fillRect(7, bottom, 1, 1);
    g.setColor(darkShadow);
    g.fillRect(8, bottom, right - 13, 1);
    
    g.drawLine(right + 1, 0, right - 3, bottom - 4);
    g.fillRect(right - 4, bottom - 3, 1, 2);
    g.fillRect(right - 5, bottom - 1, 1, 1);
    
    g.translate(-x + 3, -y);
  }
  
  protected void paintContentBorderBottomEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted)
  {
    int bottom = y + h - 1;
    int right = x + w - 1;
    g.translate(x, bottom);
    if ((drawBroken) && (x >= x) && (x <= x + w))
    {
      g.setColor(darkShadow);
      g.fillRect(0, 0, x - x - 2, 1);
      if (x + width < x + w - 2)
      {
        g.setColor(darkShadow);
        g.fillRect(x + width + 2 - x, 0, right - x - width - 2, 1);
      }
    }
    else
    {
      g.setColor(darkShadow);
      g.fillRect(0, 0, w - 1, 1);
    }
    g.translate(-x, -bottom);
  }
  
  protected int getTabsOverlay()
  {
    return 4;
  }
}

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

import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;

final class PlasticTabbedPaneUI$LeftEmbeddedRenderer
  extends PlasticTabbedPaneUI.AbstractRenderer
{
  PlasticTabbedPaneUI$LeftEmbeddedRenderer(JTabbedPane x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  private PlasticTabbedPaneUI$LeftEmbeddedRenderer(JTabbedPane tabPane)
  {
    super(tabPane, null);
  }
  
  protected Insets getTabAreaInsets(Insets insets)
  {
    return EMPTY_INSETS;
  }
  
  protected Insets getContentBorderInsets(Insets defaultInsets)
  {
    return WEST_INSETS;
  }
  
  protected int getTabRunOverlay(int tabRunOverlay)
  {
    return 0;
  }
  
  protected boolean shouldPadTabRun(int run, boolean aPriori)
  {
    return false;
  }
  
  protected Insets getTabInsets(int tabIndex, Insets tabInsets)
  {
    return new Insets(top, left, bottom, right);
  }
  
  protected Insets getSelectedTabPadInsets()
  {
    return EMPTY_INSETS;
  }
  
  protected void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    g.setColor(selectColor);
    g.fillRect(x, y, w, h);
  }
  
  protected void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    int bottom = h;
    int right = w;
    
    g.translate(x, y);
    if (isFirstDisplayedTab(tabIndex, y, tabPane.getBounds().y))
    {
      if (isSelected)
      {
        g.setColor(selectHighlight);
        g.fillRect(0, 0, right, 1);
        g.fillRect(0, 0, 1, bottom - 1);
        g.fillRect(1, bottom - 1, right - 1, 1);
        g.setColor(shadowColor);
        g.fillRect(0, bottom - 1, 1, 1);
        g.fillRect(1, bottom, right - 1, 1);
      }
    }
    else if (isSelected)
    {
      g.setColor(selectHighlight);
      g.fillRect(1, 1, right - 1, 1);
      g.fillRect(0, 2, 1, bottom - 2);
      g.fillRect(1, bottom - 1, right - 1, 1);
      g.setColor(shadowColor);
      g.fillRect(1, 0, right - 1, 1);
      g.fillRect(0, 1, 1, 1);
      g.fillRect(0, bottom - 1, 1, 1);
      g.fillRect(1, bottom, right - 1, 1);
    }
    else
    {
      g.setColor(shadowColor);
      g.fillRect(0, 0, right / 3, 1);
    }
    g.translate(-x, -y);
  }
  
  protected void paintContentBorderLeftEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted)
  {
    g.setColor(shadowColor);
    g.fillRect(x, y, 1, h);
  }
  
  protected void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {}
}

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

import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;

final class PlasticTabbedPaneUI$LeftRenderer
  extends PlasticTabbedPaneUI.AbstractRenderer
{
  PlasticTabbedPaneUI$LeftRenderer(JTabbedPane x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  private PlasticTabbedPaneUI$LeftRenderer(JTabbedPane tabPane)
  {
    super(tabPane, null);
  }
  
  protected Insets getTabAreaInsets(Insets defaultInsets)
  {
    return new Insets(top + 4, left, bottom, right);
  }
  
  protected int getTabLabelShiftX(int tabIndex, boolean isSelected)
  {
    return 1;
  }
  
  protected int getTabRunOverlay(int tabRunOverlay)
  {
    return 1;
  }
  
  protected boolean shouldPadTabRun(int run, boolean aPriori)
  {
    return false;
  }
  
  protected Insets getTabInsets(int tabIndex, Insets tabInsets)
  {
    return new Insets(top, left - 5, bottom + 1, right - 5);
  }
  
  protected Insets getSelectedTabPadInsets()
  {
    return WEST_INSETS;
  }
  
  protected void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
  {
    if ((!tabPane.hasFocus()) || (!isSelected)) {
      return;
    }
    Rectangle tabRect = rects[tabIndex];
    int top = y + 2;
    int left = x + 3;
    int height = height - 5;
    int width = width - 6;
    g.setColor(focus);
    g.drawRect(left, top, width, height);
  }
  
  protected void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    if (!isSelected)
    {
      g.setColor(selectLight);
      g.fillRect(x + 1, y + 1, w - 1, h - 2);
    }
    else
    {
      g.setColor(selectColor);
      g.fillRect(x + 1, y + 1, w - 3, h - 2);
    }
  }
  
  protected void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    int bottom = h - 1;
    int left = 0;
    g.translate(x, y);
    
    g.setColor(selectHighlight);
    
    g.fillRect(left + 2, 0, w - 2 - left, 1);
    
    g.fillRect(left + 1, 1, 1, 1);
    g.fillRect(left, 2, 1, bottom - 3);
    g.setColor(darkShadow);
    g.fillRect(left + 1, bottom - 1, 1, 1);
    
    g.fillRect(left + 2, bottom, w - 2 - left, 1);
    
    g.translate(-x, -y);
  }
  
  protected void paintContentBorderLeftEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted)
  {
    g.setColor(selectHighlight);
    if ((drawBroken) && (y >= y) && (y <= y + h))
    {
      g.fillRect(x, y, 1, y + 1 - y);
      if (y + height < y + h - 2) {
        g.fillRect(x, y + height - 1, 1, y + h - y - height);
      }
    }
    else
    {
      g.fillRect(x, y, 1, h - 1);
    }
  }
}

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

import java.beans.PropertyChangeEvent;
import javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler;

final class PlasticTabbedPaneUI$MyPropertyChangeHandler
  extends BasicTabbedPaneUI.PropertyChangeHandler
{
  private final PlasticTabbedPaneUI this$0;
  
  private PlasticTabbedPaneUI$MyPropertyChangeHandler(PlasticTabbedPaneUI paramPlasticTabbedPaneUI)
  {
    super(paramPlasticTabbedPaneUI);
  }
  
  PlasticTabbedPaneUI$MyPropertyChangeHandler(PlasticTabbedPaneUI x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  public void propertyChange(PropertyChangeEvent e)
  {
    String pName = e.getPropertyName();
    if (null == pName) {
      return;
    }
    super.propertyChange(e);
    if (pName.equals("tabPlacement"))
    {
      PlasticTabbedPaneUI.access$1200(this$0);
      return;
    }
    if (pName.equals("jgoodies.embeddedTabs"))
    {
      PlasticTabbedPaneUI.access$1300(this$0, (Boolean)e.getNewValue());
      return;
    }
    if (pName.equals("jgoodies.noContentBorder"))
    {
      PlasticTabbedPaneUI.access$1400(this$0, (Boolean)e.getNewValue());
      return;
    }
  }
}

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

import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;

final class PlasticTabbedPaneUI$RightEmbeddedRenderer
  extends PlasticTabbedPaneUI.AbstractRenderer
{
  PlasticTabbedPaneUI$RightEmbeddedRenderer(JTabbedPane x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  private PlasticTabbedPaneUI$RightEmbeddedRenderer(JTabbedPane tabPane)
  {
    super(tabPane, null);
  }
  
  protected Insets getTabAreaInsets(Insets insets)
  {
    return EMPTY_INSETS;
  }
  
  protected Insets getContentBorderInsets(Insets defaultInsets)
  {
    return EAST_INSETS;
  }
  
  protected int getTabRunIndent(int run)
  {
    return 4 * run;
  }
  
  protected int getTabRunOverlay(int tabRunOverlay)
  {
    return 0;
  }
  
  protected boolean shouldPadTabRun(int run, boolean aPriori)
  {
    return false;
  }
  
  protected Insets getTabInsets(int tabIndex, Insets tabInsets)
  {
    return new Insets(top, left, bottom, right);
  }
  
  protected Insets getSelectedTabPadInsets()
  {
    return EMPTY_INSETS;
  }
  
  protected void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    g.setColor(selectColor);
    g.fillRect(x, y, w, h);
  }
  
  protected void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    int bottom = h;
    int right = w - 1;
    
    g.translate(x + 1, y);
    if (isFirstDisplayedTab(tabIndex, y, tabPane.getBounds().y))
    {
      if (isSelected)
      {
        g.setColor(shadowColor);
        
        g.fillRect(right - 1, bottom - 1, 1, 1);
        g.fillRect(0, bottom, right - 1, 1);
        g.setColor(selectHighlight);
        g.fillRect(0, 0, right - 1, 1);
        g.fillRect(right - 1, 0, 1, bottom - 1);
        g.fillRect(0, bottom - 1, right - 1, 1);
      }
    }
    else if (isSelected)
    {
      g.setColor(shadowColor);
      g.fillRect(0, -1, right - 1, 1);
      g.fillRect(right - 1, 0, 1, 1);
      
      g.fillRect(right - 1, bottom - 1, 1, 1);
      g.fillRect(0, bottom, right - 1, 1);
      g.setColor(selectHighlight);
      g.fillRect(0, 0, right - 1, 1);
      g.fillRect(right - 1, 1, 1, bottom - 2);
      g.fillRect(0, bottom - 1, right - 1, 1);
    }
    else
    {
      g.setColor(shadowColor);
      g.fillRect(2 * right / 3, 0, right / 3, 1);
    }
    g.translate(-x - 1, -y);
  }
  
  protected void paintContentBorderRightEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted)
  {
    g.setColor(shadowColor);
    g.fillRect(x + w - 1, y, 1, h);
  }
  
  protected void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) {}
}

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

import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;

final class PlasticTabbedPaneUI$RightRenderer
  extends PlasticTabbedPaneUI.AbstractRenderer
{
  PlasticTabbedPaneUI$RightRenderer(JTabbedPane x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  private PlasticTabbedPaneUI$RightRenderer(JTabbedPane tabPane)
  {
    super(tabPane, null);
  }
  
  protected int getTabLabelShiftX(int tabIndex, boolean isSelected)
  {
    return 1;
  }
  
  protected int getTabRunOverlay(int tabRunOverlay)
  {
    return 1;
  }
  
  protected boolean shouldPadTabRun(int run, boolean aPriori)
  {
    return false;
  }
  
  protected Insets getTabInsets(int tabIndex, Insets tabInsets)
  {
    return new Insets(top, left - 5, bottom + 1, right - 5);
  }
  
  protected Insets getSelectedTabPadInsets()
  {
    return EAST_INSETS;
  }
  
  protected void paintFocusIndicator(Graphics g, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
  {
    if ((!tabPane.hasFocus()) || (!isSelected)) {
      return;
    }
    Rectangle tabRect = rects[tabIndex];
    int top = y + 2;
    int left = x + 3;
    int height = height - 5;
    int width = width - 6;
    g.setColor(focus);
    g.drawRect(left, top, width, height);
  }
  
  protected void paintTabBackground(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    if (!isSelected)
    {
      g.setColor(selectLight);
      g.fillRect(x, y, w, h);
    }
    else
    {
      g.setColor(selectColor);
      g.fillRect(x + 2, y, w - 2, h);
    }
  }
  
  protected void paintTabBorder(Graphics g, int tabIndex, int x, int y, int w, int h, boolean isSelected)
  {
    int bottom = h - 1;
    int right = w;
    
    g.translate(x, y);
    
    g.setColor(selectHighlight);
    g.fillRect(0, 0, right - 1, 1);
    
    g.setColor(darkShadow);
    g.fillRect(right - 1, 1, 1, 1);
    g.fillRect(right, 2, 1, bottom - 3);
    
    g.fillRect(right - 1, bottom - 1, 1, 1);
    g.fillRect(0, bottom, right - 1, 1);
    
    g.translate(-x, -y);
  }
  
  protected void paintContentBorderRightEdge(Graphics g, int x, int y, int w, int h, boolean drawBroken, Rectangle selRect, boolean isContentBorderPainted)
  {
    g.setColor(darkShadow);
    if ((drawBroken) && (y >= y) && (y <= y + h))
    {
      g.fillRect(x + w - 1, y, 1, y - y);
      if (y + height < y + h - 2) {
        g.fillRect(x + w - 1, y + height, 1, y + h - y - height);
      }
    }
    else
    {
      g.fillRect(x + w - 1, y, 1, h - 1);
    }
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.PlasticTabbedPaneUI.RightRenderer
 * 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.Graphics;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.UIManager;
import javax.swing.plaf.UIResource;

final class PlasticTabbedPaneUI$ScrollableTabPanel
  extends JPanel
  implements UIResource
{
  private final PlasticTabbedPaneUI this$0;
  
  public PlasticTabbedPaneUI$ScrollableTabPanel(PlasticTabbedPaneUI arg1)
  {
    super(null);
    setOpaque(PlasticTabbedPaneUI.access$17400(???).isOpaque());
    Color bgColor = UIManager.getColor("TabbedPane.tabAreaBackground");
    if (bgColor == null) {
      bgColor = PlasticTabbedPaneUI.access$17500(???).getBackground();
    }
    setBackground(bgColor);
  }
  
  public void paintComponent(Graphics g)
  {
    super.paintComponent(g);
    this$0.paintTabArea(g, PlasticTabbedPaneUI.access$17600(this$0).getTabPlacement(), PlasticTabbedPaneUI.access$17700(this$0).getSelectedIndex());
  }
}

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

import java.awt.Dimension;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Action;
import javax.swing.ActionMap;
import javax.swing.JButton;
import javax.swing.JTabbedPane;
import javax.swing.JViewport;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

final class PlasticTabbedPaneUI$ScrollableTabSupport
  implements ActionListener, ChangeListener
{
  public PlasticTabbedPaneUI.ScrollableTabViewport viewport;
  public PlasticTabbedPaneUI.ScrollableTabPanel tabPanel;
  public JButton scrollForwardButton;
  public JButton scrollBackwardButton;
  public int leadingTabIndex;
  private final Point tabViewPosition = new Point(0, 0);
  private final PlasticTabbedPaneUI this$0;
  
  PlasticTabbedPaneUI$ScrollableTabSupport(PlasticTabbedPaneUI paramPlasticTabbedPaneUI, int tabPlacement)
  {
    viewport = new PlasticTabbedPaneUI.ScrollableTabViewport(paramPlasticTabbedPaneUI);
    tabPanel = new PlasticTabbedPaneUI.ScrollableTabPanel(paramPlasticTabbedPaneUI);
    viewport.setView(tabPanel);
    viewport.addChangeListener(this);
    createButtons();
  }
  
  void createButtons()
  {
    if (scrollForwardButton != null)
    {
      PlasticTabbedPaneUI.access$15400(this$0).remove(scrollForwardButton);
      scrollForwardButton.removeActionListener(this);
      PlasticTabbedPaneUI.access$15500(this$0).remove(scrollBackwardButton);
      scrollBackwardButton.removeActionListener(this);
    }
    int tabPlacement = PlasticTabbedPaneUI.access$15600(this$0).getTabPlacement();
    int width = UIManager.getInt("ScrollBar.width");
    if ((tabPlacement == 1) || (tabPlacement == 3))
    {
      scrollForwardButton = new PlasticTabbedPaneUI.ArrowButton(3, width);
      scrollBackwardButton = new PlasticTabbedPaneUI.ArrowButton(7, width);
    }
    else
    {
      scrollForwardButton = new PlasticTabbedPaneUI.ArrowButton(5, width);
      scrollBackwardButton = new PlasticTabbedPaneUI.ArrowButton(1, width);
    }
    scrollForwardButton.addActionListener(this);
    scrollBackwardButton.addActionListener(this);
    PlasticTabbedPaneUI.access$15700(this$0).add(scrollForwardButton);
    PlasticTabbedPaneUI.access$15800(this$0).add(scrollBackwardButton);
  }
  
  public void scrollForward(int tabPlacement)
  {
    Dimension viewSize = viewport.getViewSize();
    Rectangle viewRect = viewport.getViewRect();
    if ((tabPlacement == 1) || (tabPlacement == 3))
    {
      if (width < width - x) {}
    }
    else if (height >= height - y) {
      return;
    }
    setLeadingTabIndex(tabPlacement, leadingTabIndex + 1);
  }
  
  public void scrollBackward(int tabPlacement)
  {
    if (leadingTabIndex == 0) {
      return;
    }
    setLeadingTabIndex(tabPlacement, leadingTabIndex - 1);
  }
  
  public void setLeadingTabIndex(int tabPlacement, int index)
  {
    leadingTabIndex = index;
    Dimension viewSize = viewport.getViewSize();
    Rectangle viewRect = viewport.getViewRect();
    switch (tabPlacement)
    {
    case 1: 
    case 3: 
      tabViewPosition.x = (leadingTabIndex == 0 ? 0 : access$15900this$0)[leadingTabIndex].x - PlasticTabbedPaneUI.access$1100(this$0).getTabsOverlay());
      if (width - tabViewPosition.x < width)
      {
        Dimension extentSize = new Dimension(width - tabViewPosition.x, height);
        
        viewport.setExtentSize(extentSize);
      }
      break;
    case 2: 
    case 4: 
      tabViewPosition.y = (leadingTabIndex == 0 ? 0 : access$16000this$0)[leadingTabIndex].y);
      if (height - tabViewPosition.y < height)
      {
        Dimension extentSize = new Dimension(width, height - tabViewPosition.y);
        
        viewport.setExtentSize(extentSize);
      }
      break;
    }
    viewport.setViewPosition(tabViewPosition);
  }
  
  public void stateChanged(ChangeEvent e)
  {
    JViewport viewport = (JViewport)e.getSource();
    int tabPlacement = PlasticTabbedPaneUI.access$16100(this$0).getTabPlacement();
    int tabCount = PlasticTabbedPaneUI.access$16200(this$0).getTabCount();
    Rectangle vpRect = viewport.getBounds();
    Dimension viewSize = viewport.getViewSize();
    Rectangle viewRect = viewport.getViewRect();
    
    leadingTabIndex = PlasticTabbedPaneUI.access$16300(this$0, x, y);
    if (leadingTabIndex + 1 < tabCount) {
      switch (tabPlacement)
      {
      case 1: 
      case 3: 
        if (access$16400this$0)[leadingTabIndex].x < x) {
          leadingTabIndex += 1;
        }
        break;
      case 2: 
      case 4: 
        if (access$16500this$0)[leadingTabIndex].y < y) {
          leadingTabIndex += 1;
        }
        break;
      }
    }
    Insets contentInsets = this$0.getContentBorderInsets(tabPlacement);
    switch (tabPlacement)
    {
    case 2: 
      PlasticTabbedPaneUI.access$16600(this$0).repaint(x + width, y, left, height);
      
      scrollBackwardButton.setEnabled((y > 0) && (leadingTabIndex > 0));
      
      scrollForwardButton.setEnabled((leadingTabIndex < tabCount - 1) && (height - y > height));
      
      break;
    case 4: 
      PlasticTabbedPaneUI.access$16700(this$0).repaint(x - right, y, right, height);
      
      scrollBackwardButton.setEnabled((y > 0) && (leadingTabIndex > 0));
      
      scrollForwardButton.setEnabled((leadingTabIndex < tabCount - 1) && (height - y > height));
      
      break;
    case 3: 
      PlasticTabbedPaneUI.access$16800(this$0).repaint(x, y - bottom, width, bottom);
      
      scrollBackwardButton.setEnabled((x > 0) && (leadingTabIndex > 0));
      
      scrollForwardButton.setEnabled((leadingTabIndex < tabCount - 1) && (width - x > width));
      
      break;
    case 1: 
    default: 
      PlasticTabbedPaneUI.access$16900(this$0).repaint(x, y + height, width, top);
      
      scrollBackwardButton.setEnabled((x > 0) && (leadingTabIndex > 0));
      
      scrollForwardButton.setEnabled((leadingTabIndex < tabCount - 1) && (width - x > width));
    }
  }
  
  public void actionPerformed(ActionEvent e)
  {
    ActionMap map = PlasticTabbedPaneUI.access$17000(this$0).getActionMap();
    if (map != null)
    {
      String actionKey;
      String actionKey;
      if (e.getSource() == scrollForwardButton) {
        actionKey = "scrollTabsForwardAction";
      } else {
        actionKey = "scrollTabsBackwardAction";
      }
      Action action = map.get(actionKey);
      if ((action != null) && (action.isEnabled())) {
        action.actionPerformed(new ActionEvent(PlasticTabbedPaneUI.access$17100(this$0), 1001, null, e.getWhen(), e.getModifiers()));
      }
    }
  }
}

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

import java.awt.Color;
import javax.swing.JTabbedPane;
import javax.swing.JViewport;
import javax.swing.UIManager;
import javax.swing.plaf.UIResource;

final class PlasticTabbedPaneUI$ScrollableTabViewport
  extends JViewport
  implements UIResource
{
  private final PlasticTabbedPaneUI this$0;
  
  public PlasticTabbedPaneUI$ScrollableTabViewport(PlasticTabbedPaneUI arg1)
  {
    setName("TabbedPane.scrollableViewport");
    setScrollMode(0);
    setOpaque(PlasticTabbedPaneUI.access$17200(???).isOpaque());
    Color bgColor = UIManager.getColor("TabbedPane.tabAreaBackground");
    if (bgColor == null) {
      bgColor = PlasticTabbedPaneUI.access$17300(???).getBackground();
    }
    setBackground(bgColor);
  }
}

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

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JTabbedPane;

class PlasticTabbedPaneUI$ScrollTabsBackwardAction
  extends AbstractAction
{
  PlasticTabbedPaneUI$ScrollTabsBackwardAction(PlasticTabbedPaneUI.1 x0)
  {
    this();
  }
  
  public void actionPerformed(ActionEvent e)
  {
    JTabbedPane pane = null;
    Object src = e.getSource();
    if ((src instanceof JTabbedPane)) {
      pane = (JTabbedPane)src;
    } else if ((src instanceof PlasticArrowButton)) {
      pane = (JTabbedPane)((PlasticArrowButton)src).getParent();
    } else {
      return;
    }
    PlasticTabbedPaneUI ui = (PlasticTabbedPaneUI)pane.getUI();
    if (PlasticTabbedPaneUI.access$8300(ui)) {
      PlasticTabbedPaneUI.access$1000(ui).scrollBackward(pane.getTabPlacement());
    }
  }
  
  private PlasticTabbedPaneUI$ScrollTabsBackwardAction() {}
}

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

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JTabbedPane;

class PlasticTabbedPaneUI$ScrollTabsForwardAction
  extends AbstractAction
{
  PlasticTabbedPaneUI$ScrollTabsForwardAction(PlasticTabbedPaneUI.1 x0)
  {
    this();
  }
  
  public void actionPerformed(ActionEvent e)
  {
    JTabbedPane pane = null;
    Object src = e.getSource();
    if ((src instanceof JTabbedPane)) {
      pane = (JTabbedPane)src;
    } else if ((src instanceof PlasticArrowButton)) {
      pane = (JTabbedPane)((PlasticArrowButton)src).getParent();
    } else {
      return;
    }
    PlasticTabbedPaneUI ui = (PlasticTabbedPaneUI)pane.getUI();
    if (PlasticTabbedPaneUI.access$8300(ui)) {
      PlasticTabbedPaneUI.access$1000(ui).scrollForward(pane.getTabPlacement());
    }
  }
  
  private PlasticTabbedPaneUI$ScrollTabsForwardAction() {}
}

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

import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JTabbedPane;
import javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout;

class PlasticTabbedPaneUI$TabbedPaneLayout
  extends BasicTabbedPaneUI.TabbedPaneLayout
{
  private final PlasticTabbedPaneUI this$0;
  
  private PlasticTabbedPaneUI$TabbedPaneLayout(PlasticTabbedPaneUI paramPlasticTabbedPaneUI)
  {
    super(paramPlasticTabbedPaneUI);
  }
  
  PlasticTabbedPaneUI$TabbedPaneLayout(PlasticTabbedPaneUI x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  protected void calculateTabRects(int tabPlacement, int tabCount)
  {
    FontMetrics metrics = PlasticTabbedPaneUI.access$1500(this$0);
    Dimension size = PlasticTabbedPaneUI.access$1600(this$0).getSize();
    Insets insets = PlasticTabbedPaneUI.access$1700(this$0).getInsets();
    Insets theTabAreaInsets = this$0.getTabAreaInsets(tabPlacement);
    int fontHeight = metrics.getHeight();
    int selectedIndex = PlasticTabbedPaneUI.access$1800(this$0).getSelectedIndex();
    
    boolean verticalTabRuns = (tabPlacement == 2) || (tabPlacement == 4);
    boolean leftToRight = PlasticUtils.isLeftToRight(PlasticTabbedPaneUI.access$1900(this$0));
    int x;
    int y;
    int returnAt;
    switch (tabPlacement)
    {
    case 2: 
      PlasticTabbedPaneUI.access$2002(this$0, PlasticTabbedPaneUI.access$2100(this$0, tabPlacement));
      x = left + left;
      y = top + top;
      returnAt = height - (bottom + bottom);
      break;
    case 4: 
      PlasticTabbedPaneUI.access$2202(this$0, PlasticTabbedPaneUI.access$2300(this$0, tabPlacement));
      x = width - right - right - PlasticTabbedPaneUI.access$2400(this$0);
      y = top + top;
      returnAt = height - (bottom + bottom);
      break;
    case 3: 
      PlasticTabbedPaneUI.access$2502(this$0, PlasticTabbedPaneUI.access$2600(this$0, tabPlacement));
      x = left + left;
      y = height - bottom - bottom - PlasticTabbedPaneUI.access$2700(this$0);
      returnAt = width - (right + right);
      break;
    case 1: 
    default: 
      PlasticTabbedPaneUI.access$2802(this$0, PlasticTabbedPaneUI.access$2900(this$0, tabPlacement));
      x = left + left;
      y = top + top;
      returnAt = width - (right + right);
    }
    int theTabRunOverlay = this$0.getTabRunOverlay(tabPlacement);
    
    PlasticTabbedPaneUI.access$3002(this$0, 0);
    PlasticTabbedPaneUI.access$3102(this$0, -1);
    
    int tabInRun = -1;
    
    int runReturnAt = returnAt;
    if (tabCount == 0) {
      return;
    }
    for (int i = 0; i < tabCount; i++)
    {
      Rectangle rect = PlasticTabbedPaneUI.access$3200(this$0)[i];
      tabInRun++;
      if (!verticalTabRuns)
      {
        if (i > 0)
        {
          x = (access$3300this$0)[(i - 1)].x + access$3400this$0)[(i - 1)].width);
        }
        else
        {
          PlasticTabbedPaneUI.access$3500(this$0)[0] = 0;
          PlasticTabbedPaneUI.access$3602(this$0, 1);
          PlasticTabbedPaneUI.access$3702(this$0, 0);
          x = x;
        }
        width = PlasticTabbedPaneUI.access$3800(this$0, tabPlacement, i, metrics);
        PlasticTabbedPaneUI.access$3902(this$0, Math.max(PlasticTabbedPaneUI.access$4000(this$0), width));
        if ((tabInRun != 0) && (x + width > runReturnAt))
        {
          if (PlasticTabbedPaneUI.access$4100(this$0) > PlasticTabbedPaneUI.access$4200(this$0).length - 1) {
            PlasticTabbedPaneUI.access$4300(this$0);
          }
          tabInRun = 0;
          PlasticTabbedPaneUI.access$4400(this$0)[PlasticTabbedPaneUI.access$4500(this$0)] = i;
          PlasticTabbedPaneUI.access$4608(this$0);
          x = x;
          runReturnAt -= 2 * this$0.getTabRunIndent(tabPlacement, PlasticTabbedPaneUI.access$4700(this$0));
        }
        y = y;
        height = PlasticTabbedPaneUI.access$4800(this$0);
      }
      else
      {
        if (i > 0)
        {
          y = (access$4900this$0)[(i - 1)].y + access$5000this$0)[(i - 1)].height);
        }
        else
        {
          PlasticTabbedPaneUI.access$5100(this$0)[0] = 0;
          PlasticTabbedPaneUI.access$5202(this$0, 1);
          PlasticTabbedPaneUI.access$5302(this$0, 0);
          y = y;
        }
        height = PlasticTabbedPaneUI.access$5400(this$0, tabPlacement, i, fontHeight);
        PlasticTabbedPaneUI.access$5502(this$0, Math.max(PlasticTabbedPaneUI.access$5600(this$0), height));
        if ((tabInRun != 0) && (y + height > runReturnAt))
        {
          if (PlasticTabbedPaneUI.access$5700(this$0) > PlasticTabbedPaneUI.access$5800(this$0).length - 1) {
            PlasticTabbedPaneUI.access$5900(this$0);
          }
          PlasticTabbedPaneUI.access$6000(this$0)[PlasticTabbedPaneUI.access$6100(this$0)] = i;
          PlasticTabbedPaneUI.access$6208(this$0);
          y = y;
          tabInRun = 0;
          runReturnAt -= 2 * this$0.getTabRunIndent(tabPlacement, PlasticTabbedPaneUI.access$6300(this$0));
        }
        x = x;
        width = PlasticTabbedPaneUI.access$6400(this$0);
      }
      if (i == selectedIndex) {
        PlasticTabbedPaneUI.access$6502(this$0, PlasticTabbedPaneUI.access$6600(this$0) - 1);
      }
    }
    if (PlasticTabbedPaneUI.access$6700(this$0) > 1) {
      if (this$0.shouldRotateTabRuns(tabPlacement)) {
        rotateTabRuns(tabPlacement, PlasticTabbedPaneUI.access$6800(this$0));
      }
    }
    for (i = PlasticTabbedPaneUI.access$6900(this$0) - 1; i >= 0; i--)
    {
      int start = PlasticTabbedPaneUI.access$7000(this$0)[i];
      int next = PlasticTabbedPaneUI.access$7100(this$0)[(i + 1)];
      int end = next != 0 ? next - 1 : tabCount - 1;
      int indent = this$0.getTabRunIndent(tabPlacement, i);
      if (!verticalTabRuns)
      {
        for (int j = start; j <= end; j++)
        {
          Rectangle rect = PlasticTabbedPaneUI.access$7300(this$0)[j];
          y = y;
          x += indent;
        }
        if (this$0.shouldPadTabRun(tabPlacement, i)) {
          padTabRun(tabPlacement, start, end, returnAt - 2 * indent);
        }
        if (tabPlacement == 3) {
          y -= PlasticTabbedPaneUI.access$7400(this$0) - theTabRunOverlay;
        } else {
          y += PlasticTabbedPaneUI.access$7500(this$0) - theTabRunOverlay;
        }
      }
      else
      {
        for (int j = start; j <= end; j++)
        {
          Rectangle rect = PlasticTabbedPaneUI.access$7600(this$0)[j];
          x = x;
          y += indent;
        }
        if (this$0.shouldPadTabRun(tabPlacement, i)) {
          padTabRun(tabPlacement, start, end, returnAt - 2 * indent);
        }
        if (tabPlacement == 4) {
          x -= PlasticTabbedPaneUI.access$7700(this$0) - theTabRunOverlay;
        } else {
          x += PlasticTabbedPaneUI.access$7800(this$0) - theTabRunOverlay;
        }
      }
    }
    padSelectedTab(tabPlacement, selectedIndex);
    if ((!leftToRight) && (!verticalTabRuns))
    {
      int rightMargin = width - (right + right);
      for (i = 0; i < tabCount; i++) {
        access$7900this$0)[i].x = (rightMargin - access$8000this$0)[i].x - access$8100this$0)[i].width + PlasticTabbedPaneUI.access$1100(this$0).getTabsOverlay());
      }
    }
  }
  
  protected void padSelectedTab(int tabPlacement, int selectedIndex)
  {
    if (selectedIndex >= 0)
    {
      Rectangle selRect = PlasticTabbedPaneUI.access$8200(this$0)[selectedIndex];
      Insets padInsets = this$0.getSelectedTabPadInsets(tabPlacement);
      x -= left;
      width += left + right;
      y -= top;
      height += top + bottom;
    }
  }
}

/* Location:
 * Qualified Name:     com.jgoodies.looks.plastic.PlasticTabbedPaneUI.TabbedPaneLayout
 * 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.Container;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Insets;
import java.awt.Rectangle;
import javax.swing.JButton;
import javax.swing.JTabbedPane;
import javax.swing.JViewport;
import javax.swing.SwingUtilities;

final class PlasticTabbedPaneUI$TabbedPaneScrollLayout
  extends PlasticTabbedPaneUI.TabbedPaneLayout
{
  private final PlasticTabbedPaneUI this$0;
  
  private PlasticTabbedPaneUI$TabbedPaneScrollLayout(PlasticTabbedPaneUI paramPlasticTabbedPaneUI)
  {
    super(paramPlasticTabbedPaneUI, null);
  }
  
  PlasticTabbedPaneUI$TabbedPaneScrollLayout(PlasticTabbedPaneUI x0, PlasticTabbedPaneUI.1 x1)
  {
    this(x0);
  }
  
  protected int preferredTabAreaHeight(int tabPlacement, int width)
  {
    return PlasticTabbedPaneUI.access$8400(this$0, tabPlacement);
  }
  
  protected int preferredTabAreaWidth(int tabPlacement, int height)
  {
    return PlasticTabbedPaneUI.access$8500(this$0, tabPlacement);
  }
  
  public void layoutContainer(Container parent)
  {
    int tabPlacement = PlasticTabbedPaneUI.access$8600(this$0).getTabPlacement();
    int tabCount = PlasticTabbedPaneUI.access$8700(this$0).getTabCount();
    Insets insets = PlasticTabbedPaneUI.access$8800(this$0).getInsets();
    int selectedIndex = PlasticTabbedPaneUI.access$8900(this$0).getSelectedIndex();
    Component visibleComponent = PlasticTabbedPaneUI.access$9000(this$0);
    
    calculateLayoutInfo();
    if (selectedIndex < 0)
    {
      if (visibleComponent != null) {
        PlasticTabbedPaneUI.access$9100(this$0, null);
      }
    }
    else
    {
      Component selectedComponent = PlasticTabbedPaneUI.access$9200(this$0).getComponentAt(selectedIndex);
      boolean shouldChangeFocus = false;
      if (selectedComponent != null)
      {
        if ((selectedComponent != visibleComponent) && (visibleComponent != null)) {
          if (SwingUtilities.findFocusOwner(visibleComponent) != null) {
            shouldChangeFocus = true;
          }
        }
        PlasticTabbedPaneUI.access$9300(this$0, selectedComponent);
      }
      Insets contentInsets = this$0.getContentBorderInsets(tabPlacement);
      Rectangle bounds = PlasticTabbedPaneUI.access$9400(this$0).getBounds();
      int numChildren = PlasticTabbedPaneUI.access$9500(this$0).getComponentCount();
      if (numChildren > 0)
      {
        int tw;
        int th;
        int tx;
        int ty;
        int cx;
        int cy;
        int cw;
        int ch;
        switch (tabPlacement)
        {
        case 2: 
          tw = PlasticTabbedPaneUI.access$9800(this$0, tabPlacement, PlasticTabbedPaneUI.access$9600(this$0), PlasticTabbedPaneUI.access$9700(this$0));
          
          th = height - top - bottom;
          tx = left;
          ty = top;
          
          cx = tx + tw + left;
          cy = ty + top;
          cw = width - left - right - tw - left - right;
          
          ch = height - top - bottom - top - bottom;
          
          break;
        case 4: 
          tw = PlasticTabbedPaneUI.access$10100(this$0, tabPlacement, PlasticTabbedPaneUI.access$9900(this$0), PlasticTabbedPaneUI.access$10000(this$0));
          
          th = height - top
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