public final class WindowsTabbedPaneUI
extends com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI
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.
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandlercalcRect, 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, upKeyBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
WindowsTabbedPaneUI() |
| Modifier and Type | Method and Description |
|---|---|
protected PropertyChangeListener |
createPropertyChangeListener()
Creates and answer a handler that listens to property changes.
|
static ComponentUI |
createUI(JComponent x)
Creates and answers the
WindowsTabbedPaneUI. |
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) |
installDefaults, paintContentBorder, paintTabBackground, setRolloverTab, uninstallDefaultsassureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getFocusIndex, getFontMetrics, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getTabBounds, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installKeyboardActions, installListeners, lastTabInRun, navigateSelectedTab, paint, paintIcon, paintTab, paintTabArea, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setVisibleComponent, shouldPadTabRun, tabForCoordinate, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, updatepublic static ComponentUI createUI(JComponent x)
WindowsTabbedPaneUI.ComponentUI.createUI(JComponent)public void installUI(JComponent c)
installUI in class BasicTabbedPaneUIComponentUI.installUI(JComponent)protected PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener in class BasicTabbedPaneUIprotected Icon getIconForTab(int tabIndex)
null if and only if we have a title.getIconForTab in class BasicTabbedPaneUIprotected Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets in class BasicTabbedPaneUIprotected int getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
getTabLabelShiftX in class BasicTabbedPaneUIprotected int getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
getTabLabelShiftY in class BasicTabbedPaneUIprotected Insets getSelectedTabPadInsets(int tabPlacement)
getSelectedTabPadInsets in class BasicTabbedPaneUIprotected Insets getTabAreaInsets(int tabPlacement)
getTabAreaInsets in class BasicTabbedPaneUIprotected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderTopEdge in class BasicTabbedPaneUIprotected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderBottomEdge in class BasicTabbedPaneUIprotected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderLeftEdge in class BasicTabbedPaneUIprotected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderRightEdge in class BasicTabbedPaneUIprotected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
paintTabBorder in class com.sun.java.swing.plaf.windows.WindowsTabbedPaneUIprotected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rectangles, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
paintFocusIndicator in class BasicTabbedPaneUIprotected boolean shouldRotateTabRuns(int tabPlacement)
shouldRotateTabRuns in class BasicTabbedPaneUIprotected void layoutLabel(int tabPlacement,
FontMetrics metrics,
int tabIndex,
String title,
Icon icon,
Rectangle tabRect,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected)
layoutLabel in class BasicTabbedPaneUICopyright © 2001-2014 JGoodies Software GmbH. All Rights Reserved.