java.lang.Object | |||
↳ | javax.swing.plaf.ComponentUI | ||
↳ | javax.swing.plaf.TabbedPaneUI | ||
↳ | javax.swing.plaf.basic.BasicTabbedPaneUI |
![]() |
A Basic L&F implementation of TabbedPaneUI.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BasicTabbedPaneUI.FocusHandler | This class should be treated as a "protected" inner class. | ||||||||||
BasicTabbedPaneUI.MouseHandler | This class should be treated as a "protected" inner class. | ||||||||||
BasicTabbedPaneUI.PropertyChangeHandler | This class should be treated as a "protected" inner class. | ||||||||||
BasicTabbedPaneUI.TabSelectionHandler | This class should be treated as a "protected" inner class. | ||||||||||
BasicTabbedPaneUI.TabbedPaneLayout | This class should be treated as a "protected" inner class. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
calcRect | A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly. | ||||||||||
contentBorderInsets | |||||||||||
darkShadow | |||||||||||
downKey | This field is deprecated. As of Java 2 platform v1.3. | ||||||||||
focus | |||||||||||
focusListener | |||||||||||
highlight | |||||||||||
leftKey | This field is deprecated. As of Java 2 platform v1.3. | ||||||||||
lightHighlight | |||||||||||
maxTabHeight | |||||||||||
maxTabWidth | |||||||||||
mouseListener | |||||||||||
propertyChangeListener | |||||||||||
rects | |||||||||||
rightKey | This field is deprecated. As of Java 2 platform v1.3. | ||||||||||
runCount | |||||||||||
selectedRun | |||||||||||
selectedTabPadInsets | |||||||||||
shadow | |||||||||||
tabAreaInsets | |||||||||||
tabChangeListener | |||||||||||
tabInsets | |||||||||||
tabPane | |||||||||||
tabRunOverlay | |||||||||||
tabRuns | |||||||||||
textIconGap | |||||||||||
upKey | This field is deprecated. As of Java 2 platform v1.3. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the baseline.
| |||||||||||
Returns an enum indicating how the baseline of the component
changes as the size changes.
| |||||||||||
Returns the specified component's maximum size appropriate for
the look and feel.
| |||||||||||
Returns the specified component's minimum size appropriate for
the look and feel.
| |||||||||||
Returns the bounds of the specified tab index.
| |||||||||||
Configures the specified component appropriate for the look and feel.
| |||||||||||
Paints the specified component appropriate for the look and feel.
| |||||||||||
Returns the tab index which intersects the specified point
in the JTabbedPane's coordinate space.
| |||||||||||
Reverses configuration which was done on the specified component during
installUI . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by
installUI to create
a layout manager object to manage
the JTabbedPane . | |||||||||||
Creates and returns a JButton that will provide the user
with a way to scroll the tabs in a particular direction.
| |||||||||||
Returns the baseline for the specified tab.
| |||||||||||
Returns the amount the baseline is offset by.
| |||||||||||
Returns the index of the tab that has focus.
| |||||||||||
Returns the tab the mouse is currently over, or
-1 if the mouse is no
longer over any tab. | |||||||||||
Returns the bounds of the specified tab in the coordinate space
of the JTabbedPane component.
| |||||||||||
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.
| |||||||||||
Creates and installs any required subcomponents for the JTabbedPane.
| |||||||||||
Paints the tabs in the tab area.
| |||||||||||
this function draws the border around each tab
note that this function does now draw the background of the tab.
| |||||||||||
Sets the tab the mouse is currently over to
index . | |||||||||||
Removes any installed subcomponents from the JTabbedPane.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.
This field is deprecated.
As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
This field is deprecated.
As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
This field is deprecated.
As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
This field is deprecated.
As of Java 2 platform v1.3.
As of Java 2 platform v1.3 this previously undocumented field is no longer used. Key bindings are now defined by the LookAndFeel, please refer to the key bindings specification for further details.
Returns the baseline.
c | JComponent baseline is being requested for |
---|---|
width | the width to get the baseline for |
height | the height to get the baseline for |
Returns an enum indicating how the baseline of the component changes as the size changes.
c | JComponent to return baseline resize behavior for |
---|
NullPointerException |
---|
Returns the specified component's maximum size appropriate for
the look and feel. If null
is returned, the maximum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize
and returns that value.
c | the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components |
---|
Dimension
object or null
Returns the specified component's minimum size appropriate for
the look and feel. If null
is returned, the minimum
size will be calculated by the component's layout manager instead
(this is the preferred approach for any component with a specific
layout manager installed). The default implementation of this
method invokes getPreferredSize
and returns that value.
c | the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components |
---|
Dimension
object or null
Returns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate space.
Configures the specified component appropriate for the look and feel.
This method is invoked when the ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
c | the component where this UI delegate is being installed |
---|
Paints the specified component appropriate for the look and feel.
This method is invoked from the ComponentUI.update
method when
the specified component is being painted. Subclasses should override
this method and use the specified Graphics
object to
render the content of the component.
g | the Graphics context in which to paint |
---|---|
c | the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components |
Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space.
Reverses configuration which was done on the specified component during
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
c | the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components |
---|
Invoked by installUI
to create
a layout manager object to manage
the JTabbedPane
.
Creates and returns a JButton that will provide the user with a way to scroll the tabs in a particular direction. The returned JButton must be instance of UIResource.
direction | One of the SwingConstants constants: SOUTH, NORTH, EAST or WEST |
---|
IllegalArgumentException | if direction is not one of NORTH, SOUTH, EAST or WEST |
---|
Returns the baseline for the specified tab.
tab | index of tab to get baseline for |
---|
IndexOutOfBoundsException | if index is out of range (index < 0 || index >= tab count) |
---|
Returns the amount the baseline is offset by. This is typically
the same as getTabLabelShiftY
.
Returns the index of the tab that has focus.
Returns the tab the mouse is currently over, or -1
if the mouse is no
longer over any tab.
-1
if the mouse is no
longer over any tabReturns the bounds of the specified tab in the coordinate space
of the JTabbedPane component. This is required because the tab rects
are by default defined in the coordinate space of the component where
they are rendered, which could be the JTabbedPane
(for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT).
This method should be used whenever the tab rectangle must be relative
to the JTabbedPane itself and the result should be placed in a
designated Rectangle object (rather than instantiating and returning
a new Rectangle each time). The tab index parameter must be a valid
tabbed pane tab index (0 to tab count - 1, inclusive). The destination
rectangle parameter must be a valid Rectangle
instance.
The handling of invalid parameters is unspecified.
tabIndex | the index of the tab |
---|---|
dest | the rectangle where the result should be placed |
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. This is provided to support html rendering inside tabs.
tabIndex | the index of the tab |
---|
Creates and installs any required subcomponents for the JTabbedPane. Invoked by installUI.
Paints the tabs in the tab area.
Invoked by paint().
The graphics parameter must be a valid 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 rendering |
---|---|
tabPlacement | the placement for the tabs within the JTabbedPane |
selectedIndex | the tab index of the selected component |
this function draws the border around each tab note that this function does now draw the background of the tab. that is done elsewhere
Sets the tab the mouse is currently over to 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. |
---|
Removes any installed subcomponents from the JTabbedPane. Invoked by uninstallUI.