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.
javax.swing.plaf.basic.BasicTabbedPaneUI.FocusHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.MouseHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout, javax.swing.plaf.basic.BasicTabbedPaneUI.TabSelectionHandler
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
Constructor and Description |
---|
WindowsTabbedPaneUI() |
Modifier and Type | Method and Description |
---|---|
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
Creates and answer a handler that listens to property changes.
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent x)
Creates and answers the
WindowsTabbedPaneUI . |
protected java.awt.Insets |
getContentBorderInsets(int tabPlacement) |
protected javax.swing.Icon |
getIconForTab(int tabIndex)
Answers the icon for the tab with the specified index.
|
protected java.awt.Insets |
getSelectedTabPadInsets(int tabPlacement) |
protected java.awt.Insets |
getTabAreaInsets(int tabPlacement) |
protected int |
getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected) |
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected) |
void |
installUI(javax.swing.JComponent c)
Installs the UI.
|
protected void |
layoutLabel(int tabPlacement,
java.awt.FontMetrics metrics,
int tabIndex,
java.lang.String title,
javax.swing.Icon icon,
java.awt.Rectangle tabRect,
java.awt.Rectangle iconRect,
java.awt.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(java.awt.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(java.awt.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(java.awt.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(java.awt.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(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rectangles,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect,
boolean isSelected) |
protected void |
paintTabBorder(java.awt.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, uninstallDefaults
assureRectsCreated, 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, uninstallUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
WindowsTabbedPaneUI
.ComponentUI.createUI(JComponent)
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.basic.BasicTabbedPaneUI
ComponentUI.installUI(JComponent)
protected java.beans.PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected javax.swing.Icon getIconForTab(int tabIndex)
null
if and only if we have a title.getIconForTab
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getContentBorderInsets(int tabPlacement)
getContentBorderInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
getTabLabelShiftX
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
getTabLabelShiftY
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getSelectedTabPadInsets(int tabPlacement)
getSelectedTabPadInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected java.awt.Insets getTabAreaInsets(int tabPlacement)
getTabAreaInsets
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintContentBorderTopEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderTopEdge
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintContentBorderBottomEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderBottomEdge
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintContentBorderLeftEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderLeftEdge
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintContentBorderRightEdge(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderRightEdge
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void paintTabBorder(java.awt.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.WindowsTabbedPaneUI
protected void paintFocusIndicator(java.awt.Graphics g, int tabPlacement, java.awt.Rectangle[] rectangles, int tabIndex, java.awt.Rectangle iconRect, java.awt.Rectangle textRect, boolean isSelected)
paintFocusIndicator
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected boolean shouldRotateTabRuns(int tabPlacement)
shouldRotateTabRuns
in class javax.swing.plaf.basic.BasicTabbedPaneUI
protected void layoutLabel(int tabPlacement, java.awt.FontMetrics metrics, int tabIndex, java.lang.String title, javax.swing.Icon icon, java.awt.Rectangle tabRect, java.awt.Rectangle iconRect, java.awt.Rectangle textRect, boolean isSelected)
layoutLabel
in class javax.swing.plaf.basic.BasicTabbedPaneUI
Copyright © 2001-2009 JGoodies Karsten Lentzsch. All Rights Reserved.