- 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 Summary
Nested Classes Modifier and Type Class and Description class
BasicTabbedPaneUI.FocusHandler
This class should be treated as a "protected" inner class.class
BasicTabbedPaneUI.MouseHandler
This class should be treated as a "protected" inner class.class
BasicTabbedPaneUI.PropertyChangeHandler
This class should be treated as a "protected" inner class.class
BasicTabbedPaneUI.TabbedPaneLayout
This class should be treated as a "protected" inner class.class
BasicTabbedPaneUI.TabSelectionHandler
This class should be treated as a "protected" inner class.
-
Field Summary
Fields Modifier and Type Field and Description protected Rectangle
calcRect
A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.protected Insets
contentBorderInsets
protected Color
darkShadow
protected KeyStroke
downKey
Deprecated.As of Java 2 platform v1.3.protected Color
focus
protected FocusListener
focusListener
protected Color
highlight
protected KeyStroke
leftKey
Deprecated.As of Java 2 platform v1.3.protected Color
lightHighlight
protected int
maxTabHeight
protected int
maxTabWidth
protected MouseListener
mouseListener
protected PropertyChangeListener
propertyChangeListener
protected Rectangle[]
rects
protected KeyStroke
rightKey
Deprecated.As of Java 2 platform v1.3.protected int
runCount
protected int
selectedRun
protected Insets
selectedTabPadInsets
protected Color
shadow
protected Insets
tabAreaInsets
protected ChangeListener
tabChangeListener
protected Insets
tabInsets
protected JTabbedPane
tabPane
protected int
tabRunOverlay
protected int[]
tabRuns
protected int
textIconGap
protected KeyStroke
upKey
Deprecated.As of Java 2 platform v1.3.-
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
-
Constructor Summary
Constructors Constructor and Description BasicTabbedPaneUI()
-
Method Summary
Methods 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, FontMetrics metrics)
protected ChangeListener
createChangeListener()
protected FocusListener
createFocusListener()
protected LayoutManager
createLayoutManager()
Invoked byinstallUI
to create a layout manager object to manage theJTabbedPane
.protected MouseListener
createMouseListener()
protected PropertyChangeListener
createPropertyChangeListener()
protected 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 ComponentUI
createUI(JComponent c)
protected void
expandTabRunsArray()
protected int
getBaseline(int tab)
Returns the baseline for the specified tab.int
getBaseline(JComponent c, int width, int height)
Returns the baseline.protected int
getBaselineOffset()
Returns the amount the baseline is offset by.Component.BaselineResizeBehavior
getBaselineResizeBehavior(JComponent c)
Returns an enum indicating how the baseline of the component changes as the size changes.protected Insets
getContentBorderInsets(int tabPlacement)
protected int
getFocusIndex()
Returns the index of the tab that has focus.protected FontMetrics
getFontMetrics()
protected Icon
getIconForTab(int tabIndex)
Dimension
getMaximumSize(JComponent c)
Returns the specified component's maximum size appropriate for the look and feel.Dimension
getMinimumSize(JComponent c)
Returns the specified component's minimum size appropriate for the look and feel.protected int
getNextTabIndex(int base)
protected int
getNextTabIndexInRun(int tabCount, int base)
protected int
getNextTabRun(int baseRun)
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 Insets
getSelectedTabPadInsets(int tabPlacement)
protected Insets
getTabAreaInsets(int tabPlacement)
protected Rectangle
getTabBounds(int tabIndex, Rectangle dest)
Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component.Rectangle
getTabBounds(JTabbedPane pane, int i)
Returns the bounds of the specified tab index.protected 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(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 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 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(JComponent c)
Configures the specified component appropriately for the look and feel.protected int
lastTabInRun(int tabCount, int run)
protected void
layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void
navigateSelectedTab(int direction)
void
paint(Graphics g, JComponent c)
Paints the specified component appropriately for the look and feel.protected void
paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
protected void
paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void
paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void
paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void
paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void
paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void
paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
protected void
paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
protected void
paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
Paints the tabs in the tab area.protected void
paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected 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.protected void
paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
protected static void
rotateInsets(Insets topInsets, 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 toindex
.protected void
setVisibleComponent(Component component)
protected boolean
shouldPadTabRun(int tabPlacement, int run)
protected boolean
shouldRotateTabRuns(int tabPlacement)
int
tabForCoordinate(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(JComponent c)
Reverses configuration which was done on the specified component duringinstallUI
.-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update
-
-
-
-
Field Detail
-
tabPane
protected JTabbedPane tabPane
-
highlight
protected Color highlight
-
lightHighlight
protected Color lightHighlight
-
shadow
protected Color shadow
-
darkShadow
protected Color darkShadow
-
focus
protected Color focus
-
textIconGap
protected int textIconGap
-
tabRunOverlay
protected int tabRunOverlay
-
tabInsets
protected Insets tabInsets
-
selectedTabPadInsets
protected Insets selectedTabPadInsets
-
tabAreaInsets
protected Insets tabAreaInsets
-
contentBorderInsets
protected Insets contentBorderInsets
-
upKey
@Deprecated protected KeyStroke upKey
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.
-
downKey
@Deprecated protected KeyStroke downKey
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.
-
leftKey
@Deprecated protected KeyStroke leftKey
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.
-
rightKey
@Deprecated protected KeyStroke rightKey
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.
-
tabRuns
protected int[] tabRuns
-
runCount
protected int runCount
-
selectedRun
protected int selectedRun
-
rects
protected Rectangle[] rects
-
maxTabHeight
protected int maxTabHeight
-
maxTabWidth
protected int maxTabWidth
-
tabChangeListener
protected ChangeListener tabChangeListener
-
propertyChangeListener
protected PropertyChangeListener propertyChangeListener
-
mouseListener
protected MouseListener mouseListener
-
focusListener
protected FocusListener focusListener
-
calcRect
protected transient Rectangle calcRect
A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
Description copied from class:ComponentUI
Configures the specified component appropriately for the look and feel. This method is invoked when theComponentUI
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:- Install default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
- Install a
LayoutManager
on the component if necessary. - Create/add any required sub-components to the component.
- Create/install event listeners on the component.
- Create/install a
PropertyChangeListener
on the component in order to detect and respond to component property changes appropriately. - Install keyboard UI (mnemonics, traversal, etc.) on the component.
- Initialize any appropriate instance data.
- Overrides:
installUI
in classComponentUI
- Parameters:
c
- the component where this UI delegate is being installed- See Also:
ComponentUI.uninstallUI(javax.swing.JComponent)
,JComponent.setUI(javax.swing.plaf.ComponentUI)
,JComponent.updateUI()
-
uninstallUI
public void uninstallUI(JComponent c)
Description copied from class:ComponentUI
Reverses configuration which was done on the specified component duringinstallUI
. This method is invoked when thisUIComponent
instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed ininstallUI
, being careful to leave theJComponent
instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:- Remove any UI-set borders from the component.
- Remove any UI-set layout managers on the component.
- Remove any UI-added sub-components from the component.
- Remove any UI-added event/property listeners from the component.
- Remove any UI-installed keyboard UI from the component.
- Nullify any allocated instance data objects to allow for GC.
- Overrides:
uninstallUI
in classComponentUI
- Parameters:
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- See Also:
ComponentUI.installUI(javax.swing.JComponent)
,JComponent.updateUI()
-
createLayoutManager
protected LayoutManager createLayoutManager()
Invoked byinstallUI
to create a layout manager object to manage theJTabbedPane
.- Returns:
- a layout manager object
- See Also:
BasicTabbedPaneUI.TabbedPaneLayout
,JTabbedPane.getTabLayoutPolicy()
-
installComponents
protected void installComponents()
Creates and installs any required subcomponents for the JTabbedPane. Invoked by installUI.- Since:
- 1.4
-
createScrollButton
protected 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. 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
-
uninstallComponents
protected void uninstallComponents()
Removes any installed subcomponents from the JTabbedPane. Invoked by uninstallUI.- Since:
- 1.4
-
installDefaults
protected void installDefaults()
-
uninstallDefaults
protected void uninstallDefaults()
-
installListeners
protected void installListeners()
-
uninstallListeners
protected void uninstallListeners()
-
createMouseListener
protected MouseListener createMouseListener()
-
createFocusListener
protected FocusListener createFocusListener()
-
createChangeListener
protected ChangeListener createChangeListener()
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
-
installKeyboardActions
protected void installKeyboardActions()
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
-
setRolloverTab
protected void setRolloverTab(int index)
Sets the tab the mouse is currently over toindex
.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.- Parameters:
index
- Index of the tab the mouse is over.- Since:
- 1.5
-
getRolloverTab
protected int getRolloverTab()
Returns the tab the mouse is currently over, or-1
if the mouse is no longer over any tab.- Returns:
- the tab the mouse is currently over, or
-1
if the mouse is no longer over any tab - Since:
- 1.5
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
Description copied from class:ComponentUI
Returns the specified component's minimum size appropriate for the look and feel. Ifnull
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 invokesgetPreferredSize
and returns that value.- Overrides:
getMinimumSize
in classComponentUI
- Parameters:
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- Returns:
- a
Dimension
object ornull
- See Also:
JComponent.getMinimumSize()
,LayoutManager.minimumLayoutSize(java.awt.Container)
,ComponentUI.getPreferredSize(javax.swing.JComponent)
-
getMaximumSize
public Dimension getMaximumSize(JComponent c)
Description copied from class:ComponentUI
Returns the specified component's maximum size appropriate for the look and feel. Ifnull
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 invokesgetPreferredSize
and returns that value.- Overrides:
getMaximumSize
in classComponentUI
- Parameters:
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- Returns:
- a
Dimension
object ornull
- See Also:
JComponent.getMaximumSize()
,LayoutManager2.maximumLayoutSize(java.awt.Container)
-
getBaseline
public int getBaseline(JComponent c, int width, int height)
Returns the baseline.- Overrides:
getBaseline
in classComponentUI
- Parameters:
c
-JComponent
baseline is being requested forwidth
- the width to get the baseline forheight
- the height to get the baseline for- Returns:
- baseline or a value < 0 indicating there is no reasonable baseline
- Throws:
NullPointerException
- ifc
isnull
IllegalArgumentException
- if width or height is < 0- Since:
- 1.6
- See Also:
JComponent.getBaseline(int, int)
-
getBaselineResizeBehavior
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
Returns an enum indicating how the baseline of the component changes as the size changes.- Overrides:
getBaselineResizeBehavior
in classComponentUI
- Parameters:
c
-JComponent
to return baseline resize behavior for- Returns:
- an enum indicating how the baseline changes as the component size changes
- Throws:
NullPointerException
- ifc
isnull
- Since:
- 1.6
- See Also:
JComponent.getBaseline(int, int)
-
getBaseline
protected 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
-
getBaselineOffset
protected 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
-
paint
public void paint(Graphics g, JComponent c)
Description copied from class:ComponentUI
Paints the specified component appropriately for the look and feel. This method is invoked from theComponentUI.update
method when the specified component is being painted. Subclasses should override this method and use the specifiedGraphics
object to render the content of the component.- Overrides:
paint
in classComponentUI
- Parameters:
g
- theGraphics
context in which to paintc
- the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components- See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
-
paintTabArea
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
Paints the tabs in the tab area. Invoked by paint(). The graphics parameter must be a validGraphics
object. 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 renderingtabPlacement
- the placement for the tabs within the JTabbedPaneselectedIndex
- the tab index of the selected component- Since:
- 1.4
-
paintTab
protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
-
layoutLabel
protected void layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
-
paintIcon
protected void paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
-
paintText
protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
-
getTabLabelShiftX
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
-
getTabLabelShiftY
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
-
paintFocusIndicator
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
-
paintTabBorder
protected 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
-
paintTabBackground
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
-
paintContentBorder
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
-
paintContentBorderTopEdge
protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
-
paintContentBorderLeftEdge
protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
-
paintContentBorderBottomEdge
protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
-
paintContentBorderRightEdge
protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
-
getTabBounds
public Rectangle getTabBounds(JTabbedPane pane, int i)
Returns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate space.- Specified by:
getTabBounds
in classTabbedPaneUI
-
getTabRunCount
public int getTabRunCount(JTabbedPane pane)
- Specified by:
getTabRunCount
in classTabbedPaneUI
-
tabForCoordinate
public int tabForCoordinate(JTabbedPane pane, int x, int y)
Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space.- Specified by:
tabForCoordinate
in classTabbedPaneUI
-
getTabBounds
protected Rectangle getTabBounds(int tabIndex, Rectangle dest)
Returns 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 validRectangle
instance. The handling of invalid parameters is unspecified.- Parameters:
tabIndex
- the index of the tabdest
- the rectangle where the result should be placed- Returns:
- the resulting rectangle
- Since:
- 1.4
-
getVisibleComponent
protected Component getVisibleComponent()
-
setVisibleComponent
protected void setVisibleComponent(Component component)
-
assureRectsCreated
protected void assureRectsCreated(int tabCount)
-
expandTabRunsArray
protected void expandTabRunsArray()
-
getRunForTab
protected int getRunForTab(int tabCount, int tabIndex)
-
lastTabInRun
protected int lastTabInRun(int tabCount, int run)
-
getTabRunOverlay
protected int getTabRunOverlay(int tabPlacement)
-
getTabRunIndent
protected int getTabRunIndent(int tabPlacement, int run)
-
shouldPadTabRun
protected boolean shouldPadTabRun(int tabPlacement, int run)
-
shouldRotateTabRuns
protected boolean shouldRotateTabRuns(int tabPlacement)
-
getIconForTab
protected Icon getIconForTab(int tabIndex)
-
getTextViewForTab
protected 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. 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
-
calculateTabHeight
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
-
calculateMaxTabHeight
protected int calculateMaxTabHeight(int tabPlacement)
-
calculateTabWidth
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
-
calculateMaxTabWidth
protected int calculateMaxTabWidth(int tabPlacement)
-
calculateTabAreaHeight
protected int calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)
-
calculateTabAreaWidth
protected int calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)
-
getTabInsets
protected Insets getTabInsets(int tabPlacement, int tabIndex)
-
getSelectedTabPadInsets
protected Insets getSelectedTabPadInsets(int tabPlacement)
-
getTabAreaInsets
protected Insets getTabAreaInsets(int tabPlacement)
-
getContentBorderInsets
protected Insets getContentBorderInsets(int tabPlacement)
-
getFontMetrics
protected FontMetrics getFontMetrics()
-
navigateSelectedTab
protected void navigateSelectedTab(int direction)
-
selectNextTabInRun
protected void selectNextTabInRun(int current)
-
selectPreviousTabInRun
protected void selectPreviousTabInRun(int current)
-
selectNextTab
protected void selectNextTab(int current)
-
selectPreviousTab
protected void selectPreviousTab(int current)
-
selectAdjacentRunTab
protected void selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)
-
getFocusIndex
protected int getFocusIndex()
Returns the index of the tab that has focus.- Returns:
- index of tab that has focus
- Since:
- 1.5
-
getTabRunOffset
protected int getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)
-
getPreviousTabIndex
protected int getPreviousTabIndex(int base)
-
getNextTabIndex
protected int getNextTabIndex(int base)
-
getNextTabIndexInRun
protected int getNextTabIndexInRun(int tabCount, int base)
-
getPreviousTabIndexInRun
protected int getPreviousTabIndexInRun(int tabCount, int base)
-
getPreviousTabRun
protected int getPreviousTabRun(int baseRun)
-
getNextTabRun
protected int getNextTabRun(int baseRun)
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/plaf/basic/basictabbedpaneui.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.