java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
javax.swing.plaf.basic.BasicTabbedPaneUI
- All Implemented Interfaces:
- SwingConstants
- Direct Known Subclasses:
- MetalTabbedPaneUI,- SynthTabbedPaneUI
public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
A Basic L&F implementation of TabbedPaneUI.
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classBasicTabbedPaneUI.FocusHandlerThis class should be treated as a "protected" inner class.classBasicTabbedPaneUI.MouseHandlerThis class should be treated as a "protected" inner class.classBasicTabbedPaneUI.PropertyChangeHandlerThis class should be treated as a "protected" inner class.classBasicTabbedPaneUI.TabbedPaneLayoutThis class should be treated as a "protected" inner class.classBasicTabbedPaneUI.TabSelectionHandlerThis class should be treated as a "protected" inner class.
- 
Field SummaryFields Modifier and Type Field Description protected RectanglecalcRectA rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.protected InsetscontentBorderInsetsContent border insetsprotected ColordarkShadowDark shadow colorprotected KeyStrokedownKeyDeprecated.As of Java 2 platform v1.3.protected ColorfocusFocus colorprotected FocusListenerfocusListenerFocus change listenerprotected ColorhighlightHighlight colorprotected KeyStrokeleftKeyDeprecated.As of Java 2 platform v1.3.protected ColorlightHighlightLight highlight colorprotected intmaxTabHeightMaximum tab heightprotected intmaxTabWidthMaximum tab widthprotected MouseListenermouseListenerMouse change listenerprotected PropertyChangeListenerpropertyChangeListenerProperty change listenerprotected Rectangle[]rectsTab rectsprotected KeyStrokerightKeyDeprecated.As of Java 2 platform v1.3.protected intrunCountRun countprotected intselectedRunSelected runprotected InsetsselectedTabPadInsetsSelected tab insetsprotected ColorshadowShadow colorprotected InsetstabAreaInsetsTab area insetsprotected ChangeListenertabChangeListenerTab change listenerprotected InsetstabInsetsTab insetsprotected JTabbedPanetabPaneThe tab paneprotected inttabRunOverlayTab run overlayprotected int[]tabRunsTab runsprotected inttextIconGapText icon gapprotected KeyStrokeupKeyDeprecated.As of Java 2 platform v1.3.Fields declared in interface javax.swing.SwingConstantsBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
- 
Constructor SummaryConstructors Constructor Description BasicTabbedPaneUI()
- 
Method SummaryModifier and Type Method Description protected voidassureRectsCreated(int tabCount)Assure the rectangles are created.protected intcalculateMaxTabHeight(int tabPlacement)Calculates the maximum tab height.protected intcalculateMaxTabWidth(int tabPlacement)Calculates the maximum tab width.protected intcalculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)Calculates the tab area height.protected intcalculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)Calculates the tab area width.protected intcalculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)Calculates the tab height.protected intcalculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)Calculates the tab width.protected ChangeListenercreateChangeListener()Creates a change listener.protected FocusListenercreateFocusListener()Creates a focus listener.protected LayoutManagercreateLayoutManager()Invoked byinstallUIto create a layout manager object to manage theJTabbedPane.protected MouseListenercreateMouseListener()Creates a mouse listener.protected PropertyChangeListenercreatePropertyChangeListener()Creates a property change listener.protected JButtoncreateScrollButton(int direction)Creates and returns a JButton that will provide the user with a way to scroll the tabs in a particular direction.static ComponentUIcreateUI(JComponent c)Create a UI.protected voidexpandTabRunsArray()Expands the tab runs array.protected intgetBaseline(int tab)Returns the baseline for the specified tab.intgetBaseline(JComponent c, int width, int height)Returns the baseline.protected intgetBaselineOffset()Returns the amount the baseline is offset by.Component.BaselineResizeBehaviorgetBaselineResizeBehavior(JComponent c)Returns an enum indicating how the baseline of the component changes as the size changes.protected InsetsgetContentBorderInsets(int tabPlacement)Returns the content border insets.protected intgetFocusIndex()Returns the index of the tab that has focus.protected FontMetricsgetFontMetrics()Returns the font metrics.protected IcongetIconForTab(int tabIndex)Returns the icon for a tab.protected intgetNextTabIndex(int base)Returns the next tab index.protected intgetNextTabIndexInRun(int tabCount, int base)Returns the next tab index in the run.protected intgetNextTabRun(int baseRun)Returns the next tab run.protected intgetPreviousTabIndex(int base)Returns the previous tab index.protected intgetPreviousTabIndexInRun(int tabCount, int base)Returns the previous tab index in the run.protected intgetPreviousTabRun(int baseRun)Returns the previous tab run.protected intgetRolloverTab()Returns the tab the mouse is currently over, or-1if the mouse is no longer over any tab.protected intgetRunForTab(int tabCount, int tabIndex)Returns the run for a tab.protected InsetsgetSelectedTabPadInsets(int tabPlacement)Returns the selected tab pad insets.protected InsetsgetTabAreaInsets(int tabPlacement)Returns the tab area insets.protected RectanglegetTabBounds(int tabIndex, Rectangle dest)Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component.RectanglegetTabBounds(JTabbedPane pane, int i)Returns the bounds of the specified tab index.protected InsetsgetTabInsets(int tabPlacement, int tabIndex)Returns the tab insets.protected intgetTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)Returns the tab label shift x.protected intgetTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)Returns the tab label shift y.protected intgetTabRunIndent(int tabPlacement, int run)Returns the tab run indent.protected intgetTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)Returns the tab run offset.protected intgetTabRunOverlay(int tabPlacement)Returns the tab run overlay.protected ViewgetTextViewForTab(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 ComponentgetVisibleComponent()Returns the visible component.protected voidinstallComponents()Creates and installs any required subcomponents for the JTabbedPane.protected voidinstallDefaults()Install the defaults.protected voidinstallKeyboardActions()Installs the keyboard actions.protected voidinstallListeners()Install the listeners.protected intlastTabInRun(int tabCount, int run)Returns the last tab in a run.protected voidlayoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)Laysout a label.protected voidnavigateSelectedTab(int direction)Navigate the selected tab.protected voidpaintContentBorder(Graphics g, int tabPlacement, int selectedIndex)Paints the content border.protected voidpaintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border bottom edge.protected voidpaintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border left edge.protected voidpaintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border right edge.protected voidpaintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border top edge.protected voidpaintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)Paints the focus indicator.protected voidpaintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)Paints an icon.protected voidpaintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)Paints a tab.protected voidpaintTabArea(Graphics g, int tabPlacement, int selectedIndex)Paints the tabs in the tab area.protected voidpaintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)Paints the tab background.protected voidpaintTabBorder(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 voidpaintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)Paints text.protected static voidrotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement)Rotates the insets.protected voidselectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)Selects an adjacent run of tabs.protected voidselectNextTab(int current)Select the next tab.protected voidselectNextTabInRun(int current)Select the next tab in the run.protected voidselectPreviousTab(int current)Select the previous tab.protected voidselectPreviousTabInRun(int current)Select the previous tab in the run.protected voidsetRolloverTab(int index)Sets the tab the mouse is currently over toindex.protected voidsetVisibleComponent(Component component)Sets the visible component.protected booleanshouldPadTabRun(int tabPlacement, int run)Returns whether or not the tab run should be padded.protected booleanshouldRotateTabRuns(int tabPlacement)Returns whether or not the tab run should be rotated.inttabForCoordinate(JTabbedPane pane, int x, int y)Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space.protected voiduninstallComponents()Removes any installed subcomponents from the JTabbedPane.protected voiduninstallDefaults()Uninstall the defaults.protected voiduninstallKeyboardActions()Uninstalls the keyboard actions.protected voiduninstallListeners()Uninstall the listeners.Methods declared in class javax.swing.plaf.ComponentUIcontains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
- 
Field Details- 
tabPaneThe tab pane
- 
highlightHighlight color
- 
lightHighlightLight highlight color
- 
shadowShadow color
- 
darkShadowDark shadow color
- 
focusFocus color
- 
textIconGapprotected int textIconGapText icon gap
- 
tabRunOverlayprotected int tabRunOverlayTab run overlay
- 
tabInsetsTab insets
- 
selectedTabPadInsetsSelected tab insets
- 
tabAreaInsetsTab area insets
- 
contentBorderInsetsContent border insets
- 
upKeyDeprecated.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.
- 
downKeyDeprecated.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.
- 
leftKeyDeprecated.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.
- 
rightKeyDeprecated.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.
- 
tabRunsprotected int[] tabRunsTab runs
- 
runCountprotected int runCountRun count
- 
selectedRunprotected int selectedRunSelected run
- 
rectsTab rects
- 
maxTabHeightprotected int maxTabHeightMaximum tab height
- 
maxTabWidthprotected int maxTabWidthMaximum tab width
- 
tabChangeListenerTab change listener
- 
propertyChangeListenerProperty change listener
- 
mouseListenerMouse change listener
- 
focusListenerFocus change listener
- 
calcRectA rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.
 
- 
- 
Constructor Details- 
BasicTabbedPaneUIpublic BasicTabbedPaneUI()
 
- 
- 
Method Details- 
createUICreate a UI.- Parameters:
- c- a component
- Returns:
- a UI
 
- 
createLayoutManagerInvoked byinstallUIto create a layout manager object to manage theJTabbedPane.- Returns:
- a layout manager object
- See Also:
- BasicTabbedPaneUI.TabbedPaneLayout,- JTabbedPane.getTabLayoutPolicy()
 
- 
installComponentsprotected void installComponents()Creates and installs any required subcomponents for the JTabbedPane. Invoked by installUI.- Since:
- 1.4
 
- 
createScrollButtonCreates 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.- Parameters:
- direction- One of the SwingConstants constants: SOUTH, NORTH, EAST or WEST
- Returns:
- Widget for user to
- Throws:
- IllegalArgumentException- if direction is not one of NORTH, SOUTH, EAST or WEST
- Since:
- 1.5
- See Also:
- JTabbedPane.setTabPlacement(int),- SwingConstants
 
- 
uninstallComponentsprotected void uninstallComponents()Removes any installed subcomponents from the JTabbedPane. Invoked by uninstallUI.- Since:
- 1.4
 
- 
installDefaultsprotected void installDefaults()Install the defaults.
- 
uninstallDefaultsprotected void uninstallDefaults()Uninstall the defaults.
- 
installListenersprotected void installListeners()Install the listeners.
- 
uninstallListenersprotected void uninstallListeners()Uninstall the listeners.
- 
createMouseListenerCreates a mouse listener.- Returns:
- a mouse listener
 
- 
createFocusListenerCreates a focus listener.- Returns:
- a focus listener
 
- 
createChangeListenerCreates a change listener.- Returns:
- a change listener
 
- 
createPropertyChangeListenerCreates a property change listener.- Returns:
- a property change listener
 
- 
installKeyboardActionsprotected void installKeyboardActions()Installs the keyboard actions.
- 
uninstallKeyboardActionsprotected void uninstallKeyboardActions()Uninstalls the keyboard actions.
- 
setRolloverTabprotected void setRolloverTab(int index)Sets the tab the mouse is currently over toindex.indexwill 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.- Parameters:
- index- Index of the tab the mouse is over.
- Since:
- 1.5
 
- 
getRolloverTabprotected int getRolloverTab()Returns the tab the mouse is currently over, or-1if the mouse is no longer over any tab.- Returns:
- the tab the mouse is currently over, or -1if the mouse is no longer over any tab
- Since:
- 1.5
 
- 
getBaselineReturns the baseline.- Overrides:
- getBaselinein class- ComponentUI
- Parameters:
- c-- JComponentbaseline is being requested for
- width- the width to get the baseline for
- height- the height to get the baseline for
- Returns:
- baseline or a value < 0 indicating there is no reasonable baseline
- Throws:
- NullPointerException- if- cis- null
- IllegalArgumentException- if width or height is < 0
- Since:
- 1.6
- See Also:
- JComponent.getBaseline(int, int)
 
- 
getBaselineResizeBehaviorReturns an enum indicating how the baseline of the component changes as the size changes.- Overrides:
- getBaselineResizeBehaviorin class- ComponentUI
- Parameters:
- c-- JComponentto return baseline resize behavior for
- Returns:
- an enum indicating how the baseline changes as the component size changes
- Throws:
- NullPointerException- if- cis- null
- Since:
- 1.6
- See Also:
- JComponent.getBaseline(int, int)
 
- 
getBaselineprotected int getBaseline(int tab)Returns the baseline for the specified tab.- Parameters:
- tab- index of tab to get baseline for
- Returns:
- baseline or a value < 0 indicating there is no reasonable baseline
- Throws:
- IndexOutOfBoundsException- if index is out of range (index < 0 || index >= tab count)
- Since:
- 1.6
 
- 
getBaselineOffsetprotected int getBaselineOffset()Returns the amount the baseline is offset by. This is typically the same asgetTabLabelShiftY.- Returns:
- amount to offset the baseline by
- Since:
- 1.6
 
- 
paintTabAreaPaints the tabs in the tab area. Invoked by paint(). The graphics parameter must be a validGraphicsobject. Tab placement may be either:JTabbedPane.TOP,JTabbedPane.BOTTOM,JTabbedPane.LEFT, orJTabbedPane.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.- Parameters:
- 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
- Since:
- 1.4
 
- 
paintTabprotected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)Paints a tab.- Parameters:
- g- the graphics
- tabPlacement- the tab placement
- rects- rectangles
- tabIndex- the tab index
- iconRect- the icon rectangle
- textRect- the text rectangle
 
- 
layoutLabelprotected void layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)Laysout a label.- Parameters:
- tabPlacement- the tab placement
- metrics- the font metric
- tabIndex- the tab index
- title- the title
- icon- the icon
- tabRect- the tab rectangle
- iconRect- the icon rectangle
- textRect- the text rectangle
- isSelected- selection status
 
- 
paintIconprotected void paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)Paints an icon.- Parameters:
- g- the graphics
- tabPlacement- the tab placement
- tabIndex- the tab index
- icon- the icon
- iconRect- the icon rectangle
- isSelected- selection status
 
- 
paintTextprotected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)Paints text.- Parameters:
- g- the graphics
- tabPlacement- the tab placement
- font- the font
- metrics- the font metrics
- tabIndex- the tab index
- title- the title
- textRect- the text rectangle
- isSelected- selection status
 
- 
getTabLabelShiftXprotected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)Returns the tab label shift x.- Parameters:
- tabPlacement- the tab placement
- tabIndex- the tab index
- isSelected- selection status
- Returns:
- the tab label shift x
 
- 
getTabLabelShiftYprotected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)Returns the tab label shift y.- Parameters:
- tabPlacement- the tab placement
- tabIndex- the tab index
- isSelected- selection status
- Returns:
- the tab label shift y
 
- 
paintFocusIndicatorprotected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)Paints the focus indicator.- Parameters:
- g- the graphics
- tabPlacement- the tab placement
- rects- rectangles
- tabIndex- the tab index
- iconRect- the icon rectangle
- textRect- the text rectangle
- isSelected- selection status
 
- 
paintTabBorderprotected void paintTabBorder(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. that is done elsewhere- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabIndex- the index of the tab with respect to other tabs
- x- the x coordinate of tab
- y- the y coordinate of tab
- w- the width of the tab
- h- the height of the tab
- isSelected- a- booleanwhich determines whether or not the tab is selected
 
- 
paintTabBackgroundprotected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)Paints the tab background.- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabIndex- the index of the tab with respect to other tabs
- x- the x coordinate of tab
- y- the y coordinate of tab
- w- the width of the tab
- h- the height of the tab
- isSelected- a- booleanwhich determines whether or not the tab is selected
 
- 
paintContentBorderPaints the content border.- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- selectedIndex- the tab index of the selected component
 
- 
paintContentBorderTopEdgeprotected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border top edge.- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- selectedIndex- the tab index of the selected component
- x- the x coordinate of tab
- y- the y coordinate of tab
- w- the width of the tab
- h- the height of the tab
 
- 
paintContentBorderLeftEdgeprotected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border left edge.- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- selectedIndex- the tab index of the selected component
- x- the x coordinate of tab
- y- the y coordinate of tab
- w- the width of the tab
- h- the height of the tab
 
- 
paintContentBorderBottomEdgeprotected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border bottom edge.- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- selectedIndex- the tab index of the selected component
- x- the x coordinate of tab
- y- the y coordinate of tab
- w- the width of the tab
- h- the height of the tab
 
- 
paintContentBorderRightEdgeprotected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)Paints the content border right edge.- Parameters:
- g- the graphics context in which to paint
- tabPlacement- the placement (left, right, bottom, top) of the tab
- selectedIndex- the tab index of the selected component
- x- the x coordinate of tab
- y- the y coordinate of tab
- w- the width of the tab
- h- the height of the tab
 
- 
getTabBoundsReturns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate space.- Specified by:
- getTabBoundsin class- TabbedPaneUI
- Parameters:
- pane- the pane
- i- the index
- Returns:
- the rectangle for the tab bounds
 
- 
tabForCoordinateReturns the tab index which intersects the specified point in the JTabbedPane's coordinate space.- Specified by:
- tabForCoordinatein class- TabbedPaneUI
- Parameters:
- pane- the pane
- x- the x coordinate
- y- the y coordinate
- Returns:
- the tab for the coordinate
 
- 
getTabBoundsReturns 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 validRectangleinstance. The handling of invalid parameters is unspecified.- Parameters:
- tabIndex- the index of the tab
- dest- the rectangle where the result should be placed
- Returns:
- the resulting rectangle
- Since:
- 1.4
 
- 
getVisibleComponentReturns the visible component.- Returns:
- the visible component
 
- 
setVisibleComponentSets the visible component.- Parameters:
- component- the component
 
- 
assureRectsCreatedprotected void assureRectsCreated(int tabCount)Assure the rectangles are created.- Parameters:
- tabCount- the tab count
 
- 
expandTabRunsArrayprotected void expandTabRunsArray()Expands the tab runs array.
- 
getRunForTabprotected int getRunForTab(int tabCount, int tabIndex)Returns the run for a tab.- Parameters:
- tabCount- the tab count
- tabIndex- the tab index.
- Returns:
- the run for a tab
 
- 
lastTabInRunprotected int lastTabInRun(int tabCount, int run)Returns the last tab in a run.- Parameters:
- tabCount- the tab count
- run- the run
- Returns:
- the last tab in a run
 
- 
getTabRunOverlayprotected int getTabRunOverlay(int tabPlacement)Returns the tab run overlay.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- the tab run overlay
 
- 
getTabRunIndentprotected int getTabRunIndent(int tabPlacement, int run)Returns the tab run indent.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- run- the tab run
- Returns:
- the tab run indent
 
- 
shouldPadTabRunprotected boolean shouldPadTabRun(int tabPlacement, int run)Returns whether or not the tab run should be padded.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- run- the tab run
- Returns:
- whether or not the tab run should be padded
 
- 
shouldRotateTabRunsprotected boolean shouldRotateTabRuns(int tabPlacement)Returns whether or not the tab run should be rotated.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- whether or not the tab run should be rotated
 
- 
getIconForTabReturns the icon for a tab.- Parameters:
- tabIndex- the index of the tab
- Returns:
- the icon for a tab
 
- 
getTextViewForTabReturns 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.- Parameters:
- tabIndex- the index of the tab
- Returns:
- the text view to render the tab's text or null if no specialized rendering is required
- Since:
- 1.4
 
- 
calculateTabHeightprotected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)Calculates the tab height.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabIndex- the index of the tab with respect to other tabs
- fontHeight- the font height
- Returns:
- the tab height
 
- 
calculateMaxTabHeightprotected int calculateMaxTabHeight(int tabPlacement)Calculates the maximum tab height.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- the maximum tab height
 
- 
calculateTabWidthCalculates the tab width.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabIndex- the index of the tab with respect to other tabs
- metrics- the font metrics
- Returns:
- the tab width
 
- 
calculateMaxTabWidthprotected int calculateMaxTabWidth(int tabPlacement)Calculates the maximum tab width.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- the maximum tab width
 
- 
calculateTabAreaHeightprotected int calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)Calculates the tab area height.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- horizRunCount- horizontal run count
- maxTabHeight- maximum tab height
- Returns:
- the tab area height
 
- 
calculateTabAreaWidthprotected int calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)Calculates the tab area width.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- vertRunCount- vertical run count
- maxTabWidth- maximum tab width
- Returns:
- the tab area width
 
- 
getTabInsetsReturns the tab insets.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabIndex- the tab index
- Returns:
- the tab insets
 
- 
getSelectedTabPadInsetsReturns the selected tab pad insets.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- the selected tab pad insets
 
- 
getTabAreaInsetsReturns the tab area insets.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- the pad area insets
 
- 
getContentBorderInsetsReturns the content border insets.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- Returns:
- the content border insets
 
- 
getFontMetricsReturns the font metrics.- Returns:
- the font metrics
 
- 
navigateSelectedTabprotected void navigateSelectedTab(int direction)Navigate the selected tab.- Parameters:
- direction- the direction
 
- 
selectNextTabInRunprotected void selectNextTabInRun(int current)Select the next tab in the run.- Parameters:
- current- the current tab
 
- 
selectPreviousTabInRunprotected void selectPreviousTabInRun(int current)Select the previous tab in the run.- Parameters:
- current- the current tab
 
- 
selectNextTabprotected void selectNextTab(int current)Select the next tab.- Parameters:
- current- the current tab
 
- 
selectPreviousTabprotected void selectPreviousTab(int current)Select the previous tab.- Parameters:
- current- the current tab
 
- 
selectAdjacentRunTabprotected void selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)Selects an adjacent run of tabs.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabIndex- the index of the tab with respect to other tabs
- offset- selection offset
 
- 
getFocusIndexprotected int getFocusIndex()Returns the index of the tab that has focus.- Returns:
- index of tab that has focus
- Since:
- 1.5
 
- 
getTabRunOffsetprotected int getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)Returns the tab run offset.- Parameters:
- tabPlacement- the placement (left, right, bottom, top) of the tab
- tabCount- the tab count
- tabIndex- the index of the tab with respect to other tabs
- forward- forward or not
- Returns:
- the tab run offset
 
- 
getPreviousTabIndexprotected int getPreviousTabIndex(int base)Returns the previous tab index.- Parameters:
- base- the base
- Returns:
- the previous tab index
 
- 
getNextTabIndexprotected int getNextTabIndex(int base)Returns the next tab index.- Parameters:
- base- the base
- Returns:
- the next tab index
 
- 
getNextTabIndexInRunprotected int getNextTabIndexInRun(int tabCount, int base)Returns the next tab index in the run.- Parameters:
- tabCount- the tab count
- base- the base
- Returns:
- the next tab index in the run
 
- 
getPreviousTabIndexInRunprotected int getPreviousTabIndexInRun(int tabCount, int base)Returns the previous tab index in the run.- Parameters:
- tabCount- the tab count
- base- the base
- Returns:
- the previous tab index in the run
 
- 
getPreviousTabRunprotected int getPreviousTabRun(int baseRun)Returns the previous tab run.- Parameters:
- baseRun- the base run
- Returns:
- the previous tab run
 
- 
getNextTabRunprotected int getNextTabRun(int baseRun)Returns the next tab run.- Parameters:
- baseRun- the base run
- Returns:
- the next tab run
 
- 
rotateInsetsRotates the insets.- Parameters:
- topInsets- the top insets
- targetInsets- the target insets
- targetPlacement- the target placement
 
 
-