Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jgoodies.plaf.windows
Class ExtWindowsTabbedPaneUI

    java.lang.Object
      javax.swing.plaf.ComponentUI
          javax.swing.plaf.TabbedPaneUI
              javax.swing.plaf.basic.BasicTabbedPaneUI
                  com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI
                      com.jgoodies.plaf.windows.ExtWindowsTabbedPaneUI

All Implemented Interfaces:
  SwingConstants

public final class ExtWindowsTabbedPaneUI
extends com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI

The JGoodies Windows Look and Feel implementation of `TabbedPaneUI`.

The flat appearance is work in progress; currently it works only for a single line of tabs and paints distored tabs for multiple lines.

Author:
  Karsten Lentzsch

Nested Class Summary

Nested classes inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
`BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandler`

Field Summary

Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
`calcRect, contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, upKey`

Fields inherited from interface javax.swing.SwingConstants
`BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST`

Constructor Summary
`ExtWindowsTabbedPaneUI()`

Method Summary
`protected PropertyChangeListener` | `createPropertyChangeListener()` Creates and answer a handler that listens to property changes.
`static ComponentUI` | `createUI(JComponent x)` Creates and answers the `ExtWindowsTabbedPaneUI`.
`protected Insets` | `getContentBorderInsets(int tabPlacement)`
`protected Icon` | `getIconForTab(int tabIndex)` Answers the icon for the tab with the specified index.
`protected Insets` | `getSelectedTabPadInsets(int tabPlacement)`
`protected Insets` | `getTabAreaInsets(int tabPlacement)`
`protected int` | `getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)`
`protected int` | `getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)`
`void` | `installUI(JComponent c)` Installs the UI.
`protected void` | `layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)` Copied here from super(super)class to avoid labels being centered on vertical tab runs if they consist of icon and text
`protected void` | `paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)` Paints the bottom edge of the pane's content border.
`protected void` | `paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)` paints the left Edge of the pane's content border
`protected void` | `paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)` paints the right Edge of the pane's content border
`protected void` | `paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)` Paints the top edge of the pane's content border
`protected void` | `paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rectangles, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)`
`protected void` | `paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)` Paints the border for a single tab; it does not paint the tab's background.
`protected boolean` | `shouldRotateTabRuns(int tabPlacement)`

Methods inherited from class com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI
`paintTabBackground`

Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
`assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, expandTabRunsArray, getFontMetrics, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreferredSize, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRunForTab, getTabBounds, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installListeners, lastTabInRun, navigateSelectedTab, paint, paintContentBorder, paintIcon, paintTab, paintTabArea, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setVisibleComponent, shouldPadTabRun, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI`

Methods inherited from class javax.swing.plaf.ComponentUI
`contains, getAccessibleChild, getAccessibleChildrenCount, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExtWindowsTabbedPaneUI

    public ExtWindowsTabbedPaneUI()

Method Detail

### createUI

    public static ComponentUI createUI(JComponent x)

  Creates and answers the `ExtWindowsTabbedPaneUI`.

  See Also:
    `ComponentUI.createUI(JComponent)`

### installUI

    public void installUI(JComponent c)

  Installs the UI.

  See Also:
    `ComponentUI.installUI(JComponent)`

### createPropertyChangeListener

    protected PropertyChangeListener createPropertyChangeListener()

  Creates and answer a handler that listens to property changes. Unlike the superclass BasicTabbedPane, the PlasticTabbedPaneUI uses an extended Handler.

### getIconForTab

    protected Icon getIconForTab(int tabIndex)

  Answers the icon for the tab with the specified index. In case, we have globally switched of the use tab icons, we answer `null` if and only if we have a title.

### getContentBorderInsets

    protected Insets getContentBorderInsets(int tabPlacement)

### getTabLabelShiftX

    protected int getTabLabelShiftX(int tabPlacement,
                                    int tabIndex,
                                    boolean isSelected)

### getTabLabelShiftY

    protected int getTabLabelShiftY(int tabPlacement,
                                    int tabIndex,
                                    boolean isSelected)

### getSelectedTabPadInsets

    protected Insets getSelectedTabPadInsets(int tabPlacement)

### getTabAreaInsets

    protected Insets getTabAreaInsets(int tabPlacement)

### paintContentBorderTopEdge

    protected void paintContentBorderTopEdge(Graphics g,
                                             int tabPlacement,
                                             int selectedIndex,
                                             int x,
                                             int y,
                                             int w,
                                             int h)

  Paints the top edge of the pane's content border

### paintContentBorderBottomEdge

    protected void paintContentBorderBottomEdge(Graphics g,
                                                int tabPlacement,
                                                int selectedIndex,
                                                int x,
                                                int y,
                                                int w,
                                                int h)

  Paints the bottom edge of the pane's content border.

### paintContentBorderLeftEdge

    protected void paintContentBorderLeftEdge(Graphics g,
                                              int tabPlacement,
                                              int selectedIndex,
                                              int x,
                                              int y,
                                              int w,
                                              int h)

  paints the left Edge of the pane's content border

### paintContentBorderRightEdge

    protected void paintContentBorderRightEdge(Graphics g,
                                               int tabPlacement,
                                               int selectedIndex,
                                               int x,
                                               int y,
                                               int w,
                                               int h)

  paints the right Edge of the pane's content border

### paintTabBorder

    protected void paintTabBorder(Graphics g,
                                  int tabPlacement,
                                  int tabIndex,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  boolean isSelected)

  Paints the border for a single tab; it does not paint the tab's background.

### paintFocusIndicator

    protected void paintFocusIndicator(Graphics g,
                                       int tabPlacement,
                                       Rectangle[] rectangles,
                                       int tabIndex,
                                       Rectangle iconRect,
                                       Rectangle textRect,
                                       boolean isSelected)

### shouldRotateTabRuns

    protected boolean shouldRotateTabRuns(int tabPlacement)

### layoutLabel

    protected void layoutLabel(int tabPlacement,
                               FontMetrics metrics,
                               int tabIndex,
                               String title,
                               Icon icon,
                               Rectangle tabRect,
                               Rectangle iconRect,
                               Rectangle textRect,
                               boolean isSelected)

  Copied here from super(super)class to avoid labels being centered on vertical tab runs if they consist of icon and text

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.