public class WebBasicTabbedPaneUI
extends javax.swing.plaf.TabbedPaneUI
implements javax.swing.SwingConstants
| Modifier and Type | Class and Description |
|---|---|
protected static class |
WebBasicTabbedPaneUI.Actions
todo Temporary sun swing UIAction replacement
|
class |
WebBasicTabbedPaneUI.CroppedEdge |
class |
WebBasicTabbedPaneUI.FocusHandler
This class should be treated as a "protected" inner class.
|
class |
WebBasicTabbedPaneUI.MouseHandler
This class should be treated as a "protected" inner class.
|
class |
WebBasicTabbedPaneUI.PropertyChangeHandler
This class should be treated as a "protected" inner class.
|
class |
WebBasicTabbedPaneUI.ScrollableTabSupport |
class |
WebBasicTabbedPaneUI.ScrollableTabViewport |
class |
WebBasicTabbedPaneUI.TabbedPaneLayout
This class should be treated as a "protected" inner class.
|
class |
WebBasicTabbedPaneUI.TabbedPaneScrollLayout |
class |
WebBasicTabbedPaneUI.TabSelectionHandler
This class should be treated as a "protected" inner class.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Rectangle |
calcRect
A rectangle used for general layout calculations in order
to avoid constructing many new Rectangles on the fly.
|
protected java.awt.Insets |
contentBorderInsets |
protected java.awt.Color |
darkShadow |
protected javax.swing.KeyStroke |
downKey
Deprecated.
As of Java 2 platform v1.3.
|
protected java.awt.Color |
focus |
protected java.awt.event.FocusListener |
focusListener |
protected java.awt.Color |
highlight |
protected java.util.Vector<javax.swing.text.View> |
htmlViews |
protected javax.swing.KeyStroke |
leftKey
Deprecated.
As of Java 2 platform v1.3.
|
protected java.awt.Color |
lightHighlight |
protected int |
maxTabHeight |
protected int |
maxTabWidth |
protected java.awt.event.MouseListener |
mouseListener |
protected java.beans.PropertyChangeListener |
propertyChangeListener |
protected java.awt.Rectangle[] |
rects |
protected javax.swing.KeyStroke |
rightKey
Deprecated.
As of Java 2 platform v1.3.
|
protected int |
runCount |
protected int |
selectedRun |
protected java.awt.Insets |
selectedTabPadInsets |
protected java.awt.Color |
shadow |
protected java.awt.Insets |
tabAreaInsets |
protected javax.swing.event.ChangeListener |
tabChangeListener |
protected java.awt.Insets |
tabInsets |
protected javax.swing.JTabbedPane |
tabPane |
protected int |
tabRunOverlay |
protected int[] |
tabRuns |
protected WebBasicTabbedPaneUI.ScrollableTabSupport |
tabScroller |
protected int |
textIconGap |
protected javax.swing.KeyStroke |
upKey
Deprecated.
As of Java 2 platform v1.3.
|
| Constructor and Description |
|---|
WebBasicTabbedPaneUI() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assureRectsCreated(int tabCount) |
protected int |
calculateMaxTabHeight(int tabPlacement) |
protected int |
calculateMaxTabWidth(int tabPlacement) |
protected int |
calculateTabAreaHeight(int tabPlacement,
int horizRunCount,
int maxTabHeight) |
protected int |
calculateTabAreaWidth(int tabPlacement,
int vertRunCount,
int maxTabWidth) |
protected int |
calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight) |
protected int |
calculateTabWidth(int tabPlacement,
int tabIndex,
java.awt.FontMetrics metrics) |
protected javax.swing.event.ChangeListener |
createChangeListener() |
protected java.awt.event.FocusListener |
createFocusListener() |
protected java.awt.LayoutManager |
createLayoutManager()
Invoked by
installUI to create
a layout manager object to manage
the JTabbedPane. |
protected java.awt.event.MouseListener |
createMouseListener() |
protected java.beans.PropertyChangeListener |
createPropertyChangeListener() |
protected javax.swing.JButton |
createScrollButton(int direction)
Creates and returns a JButton that will provide the user
with a way to scroll the tabs in a particular direction.
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c) |
protected void |
expandTabRunsArray() |
protected int |
getBaseline(int tab)
Returns the baseline for the specified tab.
|
int |
getBaseline(javax.swing.JComponent c,
int width,
int height)
Returns the baseline.
|
protected int |
getBaselineOffset()
Returns the amount the baseline is offset by.
|
java.awt.Component.BaselineResizeBehavior |
getBaselineResizeBehavior(javax.swing.JComponent c)
Returns an enum indicating how the baseline of the component
changes as the size changes.
|
protected java.awt.Insets |
getContentBorderInsets(int tabPlacement) |
protected int |
getFocusIndex()
Returns the index of the tab that has focus.
|
protected java.awt.FontMetrics |
getFontMetrics() |
protected javax.swing.Icon |
getIconForTab(int tabIndex) |
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c) |
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c) |
protected int |
getNextTabIndex(int base) |
protected int |
getNextTabIndexInRun(int tabCount,
int base) |
protected int |
getNextTabRun(int baseRun) |
protected int |
getNudge(boolean isSelected) |
protected int |
getPreviousTabIndex(int base) |
protected int |
getPreviousTabIndexInRun(int tabCount,
int base) |
protected int |
getPreviousTabRun(int baseRun) |
protected int |
getRolloverTab()
Returns the tab the mouse is currently over, or
-1 if the mouse is no
longer over any tab. |
protected int |
getRunForTab(int tabCount,
int tabIndex) |
protected java.awt.Insets |
getSelectedTabPadInsets(int tabPlacement) |
protected java.awt.Insets |
getTabAreaInsets(int tabPlacement) |
protected java.awt.Rectangle |
getTabBounds(int tabIndex,
java.awt.Rectangle dest)
Returns the bounds of the specified tab in the coordinate space
of the JTabbedPane component.
|
java.awt.Rectangle |
getTabBounds(javax.swing.JTabbedPane pane,
int i)
Returns the bounds of the specified tab index.
|
protected java.awt.Insets |
getTabInsets(int tabPlacement,
int tabIndex) |
protected int |
getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected) |
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected) |
int |
getTabRunCount(javax.swing.JTabbedPane pane) |
protected int |
getTabRunIndent(int tabPlacement,
int run) |
protected int |
getTabRunOffset(int tabPlacement,
int tabCount,
int tabIndex,
boolean forward) |
protected int |
getTabRunOverlay(int tabPlacement) |
protected javax.swing.text.View |
getTextViewForTab(int tabIndex)
Returns the text View object required to render stylized text (HTML) for
the specified tab or null if no specialized text rendering is needed
for this tab.
|
protected java.awt.Component |
getVisibleComponent() |
protected void |
installComponents()
Creates and installs any required subcomponents for the JTabbedPane.
|
protected void |
installDefaults() |
protected void |
installKeyboardActions() |
protected void |
installListeners() |
void |
installUI(javax.swing.JComponent c) |
protected boolean |
isSelectionFollowsFocus() |
protected int |
lastTabInRun(int tabCount,
int run) |
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) |
protected void |
navigateSelectedTab(int direction) |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
paintContentBorder(java.awt.Graphics g,
int tabPlacement,
int selectedIndex) |
protected void |
paintContentBorderBottomEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintContentBorderLeftEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintContentBorderRightEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintContentBorderTopEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h) |
protected void |
paintFocusIndicator(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect,
boolean isSelected) |
protected void |
paintIcon(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
javax.swing.Icon icon,
java.awt.Rectangle iconRect,
boolean isSelected) |
protected void |
paintTab(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect) |
protected void |
paintTabArea(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
Paints the tabs in the tab area.
|
protected void |
paintTabBackground(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected) |
protected void |
paintTabBorder(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
this function draws the border around each tab
note that this function does now draw the background of the tab.
|
protected void |
paintText(java.awt.Graphics g,
int tabPlacement,
java.awt.Font font,
java.awt.FontMetrics metrics,
int tabIndex,
java.lang.String title,
java.awt.Rectangle textRect,
boolean isSelected) |
protected boolean |
requestFocusForVisibleComponent() |
protected static void |
rotateInsets(java.awt.Insets topInsets,
java.awt.Insets targetInsets,
int targetPlacement) |
protected void |
selectAdjacentRunTab(int tabPlacement,
int tabIndex,
int offset) |
protected void |
selectNextTab(int current) |
protected void |
selectNextTabInRun(int current) |
protected void |
selectPreviousTab(int current) |
protected void |
selectPreviousTabInRun(int current) |
protected void |
setRolloverTab(int index)
Sets the tab the mouse is currently over to
index. |
protected void |
setVisibleComponent(java.awt.Component component) |
protected boolean |
shouldPadTabRun(int tabPlacement,
int run) |
protected boolean |
shouldRotateTabRuns(int tabPlacement) |
int |
tabForCoordinate(javax.swing.JTabbedPane pane,
int x,
int y)
Returns the tab index which intersects the specified point
in the JTabbedPane's coordinate space.
|
protected void |
uninstallComponents()
Removes any installed subcomponents from the JTabbedPane.
|
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
void |
uninstallUI(javax.swing.JComponent c) |
protected javax.swing.JTabbedPane tabPane
protected java.awt.Color highlight
protected java.awt.Color lightHighlight
protected java.awt.Color shadow
protected java.awt.Color darkShadow
protected java.awt.Color focus
protected int textIconGap
protected int tabRunOverlay
protected java.awt.Insets tabInsets
protected java.awt.Insets selectedTabPadInsets
protected java.awt.Insets tabAreaInsets
protected java.awt.Insets contentBorderInsets
@Deprecated protected javax.swing.KeyStroke upKey
@Deprecated protected javax.swing.KeyStroke downKey
@Deprecated protected javax.swing.KeyStroke leftKey
@Deprecated protected javax.swing.KeyStroke rightKey
protected int[] tabRuns
protected int runCount
protected int selectedRun
protected java.awt.Rectangle[] rects
protected int maxTabHeight
protected int maxTabWidth
protected javax.swing.event.ChangeListener tabChangeListener
protected java.beans.PropertyChangeListener propertyChangeListener
protected java.awt.event.MouseListener mouseListener
protected java.awt.event.FocusListener focusListener
protected java.util.Vector<javax.swing.text.View> htmlViews
protected WebBasicTabbedPaneUI.ScrollableTabSupport tabScroller
protected transient java.awt.Rectangle calcRect
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public void installUI(javax.swing.JComponent c)
installUI in class javax.swing.plaf.ComponentUIpublic void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.ComponentUIprotected java.awt.LayoutManager createLayoutManager()
installUI to create
a layout manager object to manage
the JTabbedPane.WebBasicTabbedPaneUI.TabbedPaneLayout,
JTabbedPane.getTabLayoutPolicy()protected void installComponents()
protected javax.swing.JButton createScrollButton(int direction)
direction - One of the SwingConstants constants:
SOUTH, NORTH, EAST or WESTjava.lang.IllegalArgumentException - if direction is not one of
NORTH, SOUTH, EAST or WESTJTabbedPane.setTabPlacement(int),
SwingConstantsprotected void uninstallComponents()
protected void installDefaults()
protected void uninstallDefaults()
protected void installListeners()
protected void uninstallListeners()
protected java.awt.event.MouseListener createMouseListener()
protected java.awt.event.FocusListener createFocusListener()
protected javax.swing.event.ChangeListener createChangeListener()
protected java.beans.PropertyChangeListener createPropertyChangeListener()
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
protected void setRolloverTab(int index)
index.
index will be -1 if the mouse is no longer over any
tab. No checking is done to ensure the passed in index identifies a
valid tab.index - Index of the tab the mouse is over.protected int getRolloverTab()
-1 if the mouse is no
longer over any tab.-1 if the mouse is no
longer over any tabpublic java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize in class javax.swing.plaf.ComponentUIpublic java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize in class javax.swing.plaf.ComponentUIpublic int getBaseline(javax.swing.JComponent c,
int width,
int height)
getBaseline in class javax.swing.plaf.ComponentUIjava.lang.NullPointerExceptionjava.lang.IllegalArgumentExceptionJComponent.getBaseline(int, int)public java.awt.Component.BaselineResizeBehavior getBaselineResizeBehavior(javax.swing.JComponent c)
getBaselineResizeBehavior in class javax.swing.plaf.ComponentUIjava.lang.NullPointerExceptionJComponent.getBaseline(int, int)protected int getBaseline(int tab)
tab - index of tab to get baseline forjava.lang.IndexOutOfBoundsException - if index is out of range
(index < 0 || index >= tab count)protected int getBaselineOffset()
getTabLabelShiftY.public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.ComponentUIprotected void paintTabArea(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
Graphics
object. Tab placement may be either:
JTabbedPane.TOP, JTabbedPane.BOTTOM,
JTabbedPane.LEFT, or JTabbedPane.RIGHT.
The selected index must be a valid tabbed pane tab index (0 to
tab count - 1, inclusive) or -1 if no tab is currently selected.
The handling of invalid parameters is unspecified.g - the graphics object to use for renderingtabPlacement - the placement for the tabs within the JTabbedPaneselectedIndex - the tab index of the selected componentprotected void paintTab(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
int tabIndex,
java.awt.Rectangle iconRect,
java.awt.Rectangle textRect)
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)
protected void paintIcon(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
javax.swing.Icon icon,
java.awt.Rectangle iconRect,
boolean isSelected)
protected void paintText(java.awt.Graphics g,
int tabPlacement,
java.awt.Font font,
java.awt.FontMetrics metrics,
int tabIndex,
java.lang.String title,
java.awt.Rectangle textRect,
boolean isSelected)
protected int getNudge(boolean isSelected)
protected int getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
protected int getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
protected void paintFocusIndicator(java.awt.Graphics g,
int tabPlacement,
java.awt.Rectangle[] rects,
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)
protected void paintTabBackground(java.awt.Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
protected void paintContentBorder(java.awt.Graphics g,
int tabPlacement,
int selectedIndex)
protected void paintContentBorderTopEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
protected void paintContentBorderLeftEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
protected void paintContentBorderBottomEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
protected void paintContentBorderRightEdge(java.awt.Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
public java.awt.Rectangle getTabBounds(javax.swing.JTabbedPane pane,
int i)
getTabBounds in class javax.swing.plaf.TabbedPaneUIpublic int getTabRunCount(javax.swing.JTabbedPane pane)
getTabRunCount in class javax.swing.plaf.TabbedPaneUIpublic int tabForCoordinate(javax.swing.JTabbedPane pane,
int x,
int y)
tabForCoordinate in class javax.swing.plaf.TabbedPaneUIprotected java.awt.Rectangle getTabBounds(int tabIndex,
java.awt.Rectangle dest)
Rectangle instance.
The handling of invalid parameters is unspecified.tabIndex - the index of the tabdest - the rectangle where the result should be placedprotected java.awt.Component getVisibleComponent()
protected void setVisibleComponent(java.awt.Component component)
protected void assureRectsCreated(int tabCount)
protected void expandTabRunsArray()
protected int getRunForTab(int tabCount,
int tabIndex)
protected int lastTabInRun(int tabCount,
int run)
protected int getTabRunOverlay(int tabPlacement)
protected int getTabRunIndent(int tabPlacement,
int run)
protected boolean shouldPadTabRun(int tabPlacement,
int run)
protected boolean shouldRotateTabRuns(int tabPlacement)
protected javax.swing.Icon getIconForTab(int tabIndex)
protected javax.swing.text.View getTextViewForTab(int tabIndex)
tabIndex - the index of the tabprotected int calculateTabHeight(int tabPlacement,
int tabIndex,
int fontHeight)
protected int calculateMaxTabHeight(int tabPlacement)
protected int calculateTabWidth(int tabPlacement,
int tabIndex,
java.awt.FontMetrics metrics)
protected int calculateMaxTabWidth(int tabPlacement)
protected int calculateTabAreaHeight(int tabPlacement,
int horizRunCount,
int maxTabHeight)
protected int calculateTabAreaWidth(int tabPlacement,
int vertRunCount,
int maxTabWidth)
protected java.awt.Insets getTabInsets(int tabPlacement,
int tabIndex)
protected java.awt.Insets getSelectedTabPadInsets(int tabPlacement)
protected java.awt.Insets getTabAreaInsets(int tabPlacement)
protected java.awt.Insets getContentBorderInsets(int tabPlacement)
protected java.awt.FontMetrics getFontMetrics()
protected void navigateSelectedTab(int direction)
protected boolean isSelectionFollowsFocus()
protected void selectNextTabInRun(int current)
protected void selectPreviousTabInRun(int current)
protected void selectNextTab(int current)
protected void selectPreviousTab(int current)
protected void selectAdjacentRunTab(int tabPlacement,
int tabIndex,
int offset)
protected int getFocusIndex()
protected int getTabRunOffset(int tabPlacement,
int tabCount,
int tabIndex,
boolean forward)
protected int getPreviousTabIndex(int base)
protected int getNextTabIndex(int base)
protected int getNextTabIndexInRun(int tabCount,
int base)
protected int getPreviousTabIndexInRun(int tabCount,
int base)
protected int getPreviousTabRun(int baseRun)
protected int getNextTabRun(int baseRun)
protected static void rotateInsets(java.awt.Insets topInsets,
java.awt.Insets targetInsets,
int targetPlacement)
protected boolean requestFocusForVisibleComponent()