Package com.formdev.flatlaf.ui
Class FlatTabbedPaneUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TabbedPaneUI
-
- javax.swing.plaf.basic.BasicTabbedPaneUI
-
- com.formdev.flatlaf.ui.FlatTabbedPaneUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
,SwingConstants
public class FlatTabbedPaneUI extends BasicTabbedPaneUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJTabbedPane
.- UiDefault:
- TabbedPane.font Font, TabbedPane.background Color, TabbedPane.foreground Color, TabbedPane.shadow Color used for cropped line, TabbedPane.textIconGap int, TabbedPane.tabInsets Insets, TabbedPane.selectedTabPadInsets Insets unused, TabbedPane.tabAreaInsets Insets, TabbedPane.tabsOverlapBorder boolean, TabbedPane.tabRunOverlay int, TabbedPane.tabsOpaque boolean, TabbedPane.contentOpaque boolean unused, TabbedPane.opaque boolean, TabbedPane.selectionFollowsFocus boolean default is true , TabbedPane.disabledForeground Color, TabbedPane.selectedBackground Color optional, TabbedPane.selectedForeground Color, TabbedPane.underlineColor Color, TabbedPane.inactiveUnderlineColor Color, TabbedPane.disabledUnderlineColor Color, TabbedPane.hoverColor Color, TabbedPane.focusColor Color, TabbedPane.tabSeparatorColor Color optional; defaults to TabbedPane.contentAreaColor, TabbedPane.contentAreaColor Color, TabbedPane.minimumTabWidth int optional, TabbedPane.maximumTabWidth int optional, TabbedPane.tabHeight int, TabbedPane.tabSelectionHeight int, TabbedPane.cardTabSelectionHeight int, TabbedPane.contentSeparatorHeight int, TabbedPane.showTabSeparators boolean, TabbedPane.tabSeparatorsFullHeight boolean, TabbedPane.hasFullBorder boolean, TabbedPane.rotateTabRuns boolean, TabbedPane.tabLayoutPolicy String wrap (default) or scroll, TabbedPane.tabType String underlined (default) or card, TabbedPane.tabsPopupPolicy String never or asNeeded (default), TabbedPane.scrollButtonsPolicy String never, asNeeded or asNeededSingle (default), TabbedPane.scrollButtonsPlacement String both (default) or trailing, TabbedPane.tabAreaAlignment String leading (default), center, trailing or fill, TabbedPane.tabAlignment String leading, center (default) or trailing, TabbedPane.tabWidthMode String preferred (default), equal or compact, ScrollPane.smoothScrolling boolean, TabbedPane.closeIcon Icon, TabbedPane.arrowType String chevron (default) or triangle, TabbedPane.buttonInsets Insets, TabbedPane.buttonArc int, TabbedPane.buttonHoverBackground Color, TabbedPane.buttonPressedBackground Color, TabbedPane.moreTabsButtonToolTipText String, TabbedPane.tabCloseToolTipText String
- ClientProperty:
- JTabbedPane.showTabSeparators boolean, JTabbedPane.hasFullBorder boolean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FlatTabbedPaneUI.FlatMoreTabsButton
protected class
FlatTabbedPaneUI.FlatScrollableTabButton
protected class
FlatTabbedPaneUI.FlatTabAreaButton
protected class
FlatTabbedPaneUI.FlatTabbedPaneLayout
protected class
FlatTabbedPaneUI.FlatTabbedPaneScrollLayout
Layout manager used for scroll tab layout policy.protected class
FlatTabbedPaneUI.FlatWheelTabScroller
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandler
-
-
Field Summary
-
Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
calcRect, contentBorderInsets, darkShadow, downKey, focus, focusListener, highlight, leftKey, lightHighlight, maxTabHeight, maxTabWidth, mouseListener, propertyChangeListener, rects, rightKey, runCount, selectedRun, selectedTabPadInsets, shadow, tabAreaInsets, tabChangeListener, tabInsets, tabPane, tabRunOverlay, tabRuns, textIconGap, upKey
-
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 Description FlatTabbedPaneUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(Object style)
protected Object
applyStyleProperty(String key, Object value)
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 void
closeTab(int tabIndex)
protected ChangeListener
createChangeListener()
protected FocusListener
createFocusListener()
protected LayoutManager
createLayoutManager()
protected JButton
createMoreTabsButton()
protected MouseListener
createMouseListener()
protected PropertyChangeListener
createPropertyChangeListener()
protected JButton
createScrollButton(int direction)
protected LayoutManager
createScrollLayoutManager(BasicTabbedPaneUI.TabbedPaneLayout delegate)
static ComponentUI
createUI(JComponent c)
protected FlatTabbedPaneUI.FlatWheelTabScroller
createWheelTabScroller()
protected void
ensureCurrentLayout()
protected void
ensureSelectedTabIsVisible()
protected void
ensureSelectedTabIsVisibleLater()
protected Insets
getContentBorderInsets(int tabPlacement)
The content border insets are used to create a separator between tabs and content.protected Insets
getRealTabAreaInsets(int tabPlacement)
protected int
getScrollButtonsPlacement()
protected int
getScrollButtonsPolicy()
protected Insets
getSelectedTabPadInsets(int tabPlacement)
Map<String,Class<?>>
getStyleableInfos(JComponent c)
Object
getStyleableValue(JComponent c, String key)
protected int
getTabAlignment(int tabIndex)
protected int
getTabAreaAlignment()
protected Insets
getTabAreaInsets(int tabPlacement)
protected Color
getTabBackground(int tabPlacement, int tabIndex, boolean isSelected)
protected Rectangle
getTabBounds(int tabIndex, Rectangle dest)
protected Object
getTabClientProperty(int tabIndex, String key)
protected int
getTabClientPropertyInt(int tabIndex, String key, int defaultValue)
protected Rectangle
getTabCloseBounds(int tabIndex, int x, int y, int w, int h, Rectangle dest)
protected Rectangle
getTabCloseHitArea(int tabIndex)
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)
protected int
getTabsPopupPolicy()
protected int
getTabType()
protected int
getTabWidthMode()
protected boolean
hideTabArea()
protected void
installComponents()
protected void
installDefaults()
protected void
installHiddenTabsNavigation()
protected void
installKeyboardActions()
protected void
installLeadingComponent()
protected void
installListeners()
protected void
installStyle()
protected void
installTrailingComponent()
void
installUI(JComponent c)
protected boolean
isHorizontalTabPlacement()
protected boolean
isPressedTabClose()
protected boolean
isRolloverTabClose()
protected boolean
isSmoothScrollingEnabled()
protected boolean
isTabbedPaneOrChildFocused()
protected boolean
isTabClosable(int tabIndex)
protected String
layoutAndClipLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
void
paint(Graphics g, JComponent c)
protected void
paintCardTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h)
protected void
paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
Actually does nearly the same as super.paintContentBorder() but - not using UIManager.getColor("TabbedPane.contentAreaColor") to be GUI builder friendly - tabsOverlapBorder is always true - paint full border (if enabled) - not invoking paintContentBorder*Edge() methods - repaint selection - painting active tab border styleprotected void
paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, 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)
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)
protected void
paintTabCloseButton(Graphics g, int tabIndex, int x, int y, int w, int h)
protected void
paintTabSelection(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h)
protected void
paintTabSeparator(Graphics g, int tabPlacement, int x, int y, int w, int h)
protected void
paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
protected static int
parseAlignment(String str, int defaultValue)
protected static int
parseScrollButtonsPlacement(String str)
protected static int
parseScrollButtonsPolicy(String str)
protected static int
parseTabIconPlacement(String str)
protected static int
parseTabsPopupPolicy(String str)
protected static int
parseTabType(String str)
protected static int
parseTabWidthMode(String str)
protected void
setPressedTabClose(boolean pressed)
protected void
setRolloverTab(int index)
protected void
setRolloverTab(int x, int y)
protected void
setRolloverTabClose(boolean rollover)
protected boolean
shouldRotateTabRuns(int tabPlacement)
int
tabForCoordinate(JTabbedPane pane, int x, int y)
protected void
uninstallComponents()
protected void
uninstallDefaults()
protected void
uninstallHiddenTabsNavigation()
protected void
uninstallLeadingComponent()
protected void
uninstallListeners()
protected void
uninstallTrailingComponent()
void
update(Graphics g, JComponent c)
-
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getTabBounds, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintIcon, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setVisibleComponent, shouldPadTabRun, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize
-
-
-
-
Field Detail
-
TAB_TYPE_UNDERLINED
protected static final int TAB_TYPE_UNDERLINED
- Since:
- 2
- See Also:
- Constant Field Values
-
TAB_TYPE_CARD
protected static final int TAB_TYPE_CARD
- Since:
- 2
- See Also:
- Constant Field Values
-
NEVER
protected static final int NEVER
- See Also:
- Constant Field Values
-
AS_NEEDED
protected static final int AS_NEEDED
- See Also:
- Constant Field Values
-
AS_NEEDED_SINGLE
protected static final int AS_NEEDED_SINGLE
- See Also:
- Constant Field Values
-
BOTH
protected static final int BOTH
- See Also:
- Constant Field Values
-
FILL
protected static final int FILL
- See Also:
- Constant Field Values
-
WIDTH_MODE_PREFERRED
protected static final int WIDTH_MODE_PREFERRED
- See Also:
- Constant Field Values
-
WIDTH_MODE_EQUAL
protected static final int WIDTH_MODE_EQUAL
- See Also:
- Constant Field Values
-
WIDTH_MODE_COMPACT
protected static final int WIDTH_MODE_COMPACT
- See Also:
- Constant Field Values
-
foreground
protected Color foreground
-
disabledForeground
protected Color disabledForeground
-
selectedBackground
protected Color selectedBackground
-
selectedForeground
protected Color selectedForeground
-
underlineColor
protected Color underlineColor
-
inactiveUnderlineColor
protected Color inactiveUnderlineColor
- Since:
- 2.2
-
disabledUnderlineColor
protected Color disabledUnderlineColor
-
hoverColor
protected Color hoverColor
-
focusColor
protected Color focusColor
-
tabSeparatorColor
protected Color tabSeparatorColor
-
contentAreaColor
protected Color contentAreaColor
-
minimumTabWidth
protected int minimumTabWidth
-
maximumTabWidth
protected int maximumTabWidth
-
tabHeight
protected int tabHeight
-
tabSelectionHeight
protected int tabSelectionHeight
-
cardTabSelectionHeight
protected int cardTabSelectionHeight
- Since:
- 2
-
contentSeparatorHeight
protected int contentSeparatorHeight
-
showTabSeparators
protected boolean showTabSeparators
-
tabSeparatorsFullHeight
protected boolean tabSeparatorsFullHeight
-
hasFullBorder
protected boolean hasFullBorder
-
tabsOpaque
protected boolean tabsOpaque
-
rotateTabRuns
protected boolean rotateTabRuns
- Since:
- 2.5
-
closeIcon
protected Icon closeIcon
-
arrowType
protected String arrowType
-
buttonInsets
protected Insets buttonInsets
-
buttonArc
protected int buttonArc
-
buttonHoverBackground
protected Color buttonHoverBackground
-
buttonPressedBackground
protected Color buttonPressedBackground
-
moreTabsButtonToolTipText
protected String moreTabsButtonToolTipText
-
tabCloseToolTipText
protected String tabCloseToolTipText
- Since:
- 2
-
showContentSeparator
protected boolean showContentSeparator
- Since:
- 2
-
hideTabAreaWithOneTab
protected boolean hideTabAreaWithOneTab
- Since:
- 2
-
tabClosable
protected boolean tabClosable
- Since:
- 2
-
tabIconPlacement
protected int tabIconPlacement
- Since:
- 2
-
tabViewport
protected JViewport tabViewport
-
wheelTabScroller
protected FlatTabbedPaneUI.FlatWheelTabScroller wheelTabScroller
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicTabbedPaneUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicTabbedPaneUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicTabbedPaneUI
-
installComponents
protected void installComponents()
- Overrides:
installComponents
in classBasicTabbedPaneUI
-
uninstallComponents
protected void uninstallComponents()
- Overrides:
uninstallComponents
in classBasicTabbedPaneUI
-
installHiddenTabsNavigation
protected void installHiddenTabsNavigation()
-
uninstallHiddenTabsNavigation
protected void uninstallHiddenTabsNavigation()
-
installLeadingComponent
protected void installLeadingComponent()
-
uninstallLeadingComponent
protected void uninstallLeadingComponent()
-
installTrailingComponent
protected void installTrailingComponent()
-
uninstallTrailingComponent
protected void uninstallTrailingComponent()
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicTabbedPaneUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicTabbedPaneUI
-
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActions
in classBasicTabbedPaneUI
-
createWheelTabScroller
protected FlatTabbedPaneUI.FlatWheelTabScroller createWheelTabScroller()
-
createMouseListener
protected MouseListener createMouseListener()
- Overrides:
createMouseListener
in classBasicTabbedPaneUI
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
- Overrides:
createPropertyChangeListener
in classBasicTabbedPaneUI
-
createChangeListener
protected ChangeListener createChangeListener()
- Overrides:
createChangeListener
in classBasicTabbedPaneUI
-
createFocusListener
protected FocusListener createFocusListener()
- Overrides:
createFocusListener
in classBasicTabbedPaneUI
-
createLayoutManager
protected LayoutManager createLayoutManager()
- Overrides:
createLayoutManager
in classBasicTabbedPaneUI
-
createScrollLayoutManager
protected LayoutManager createScrollLayoutManager(BasicTabbedPaneUI.TabbedPaneLayout delegate)
-
createMoreTabsButton
protected JButton createMoreTabsButton()
-
createScrollButton
protected JButton createScrollButton(int direction)
- Overrides:
createScrollButton
in classBasicTabbedPaneUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
setRolloverTab
protected void setRolloverTab(int x, int y)
-
setRolloverTab
protected void setRolloverTab(int index)
- Overrides:
setRolloverTab
in classBasicTabbedPaneUI
-
isRolloverTabClose
protected boolean isRolloverTabClose()
-
setRolloverTabClose
protected void setRolloverTabClose(boolean rollover)
-
isPressedTabClose
protected boolean isPressedTabClose()
-
setPressedTabClose
protected void setPressedTabClose(boolean pressed)
-
calculateTabWidth
protected int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
- Overrides:
calculateTabWidth
in classBasicTabbedPaneUI
-
calculateTabHeight
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
- Overrides:
calculateTabHeight
in classBasicTabbedPaneUI
-
calculateMaxTabWidth
protected int calculateMaxTabWidth(int tabPlacement)
- Overrides:
calculateMaxTabWidth
in classBasicTabbedPaneUI
-
calculateMaxTabHeight
protected int calculateMaxTabHeight(int tabPlacement)
- Overrides:
calculateMaxTabHeight
in classBasicTabbedPaneUI
-
calculateTabAreaWidth
protected int calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)
- Overrides:
calculateTabAreaWidth
in classBasicTabbedPaneUI
-
calculateTabAreaHeight
protected int calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)
- Overrides:
calculateTabAreaHeight
in classBasicTabbedPaneUI
-
getTabInsets
protected Insets getTabInsets(int tabPlacement, int tabIndex)
- Overrides:
getTabInsets
in classBasicTabbedPaneUI
-
getSelectedTabPadInsets
protected Insets getSelectedTabPadInsets(int tabPlacement)
- Overrides:
getSelectedTabPadInsets
in classBasicTabbedPaneUI
-
getRealTabAreaInsets
protected Insets getRealTabAreaInsets(int tabPlacement)
-
getTabAreaInsets
protected Insets getTabAreaInsets(int tabPlacement)
- Overrides:
getTabAreaInsets
in classBasicTabbedPaneUI
-
getContentBorderInsets
protected Insets getContentBorderInsets(int tabPlacement)
The content border insets are used to create a separator between tabs and content. If client property JTabbedPane.hasFullBorder is true, then the content border insets are also used for the border.- Overrides:
getContentBorderInsets
in classBasicTabbedPaneUI
-
getTabLabelShiftX
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
- Overrides:
getTabLabelShiftX
in classBasicTabbedPaneUI
-
getTabLabelShiftY
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
- Overrides:
getTabLabelShiftY
in classBasicTabbedPaneUI
-
update
public void update(Graphics g, JComponent c)
- Overrides:
update
in classComponentUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classBasicTabbedPaneUI
-
paintTabArea
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
- Overrides:
paintTabArea
in classBasicTabbedPaneUI
-
paintTab
protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
- Overrides:
paintTab
in classBasicTabbedPaneUI
-
paintText
protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
- Overrides:
paintText
in classBasicTabbedPaneUI
-
paintTabBackground
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
- Overrides:
paintTabBackground
in classBasicTabbedPaneUI
-
getTabBackground
protected Color getTabBackground(int tabPlacement, int tabIndex, boolean isSelected)
- Since:
- 2
-
paintTabBorder
protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
- Overrides:
paintTabBorder
in classBasicTabbedPaneUI
-
paintCardTabBorder
protected void paintCardTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h)
- Since:
- 2
-
paintTabCloseButton
protected void paintTabCloseButton(Graphics g, int tabIndex, int x, int y, int w, int h)
-
paintTabSeparator
protected void paintTabSeparator(Graphics g, int tabPlacement, int x, int y, int w, int h)
-
paintTabSelection
protected void paintTabSelection(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h)
-
isTabbedPaneOrChildFocused
protected boolean isTabbedPaneOrChildFocused()
- Since:
- 2.2
-
paintContentBorder
protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
Actually does nearly the same as super.paintContentBorder() but - not using UIManager.getColor("TabbedPane.contentAreaColor") to be GUI builder friendly - tabsOverlapBorder is always true - paint full border (if enabled) - not invoking paintContentBorder*Edge() methods - repaint selection - painting active tab border style- Overrides:
paintContentBorder
in classBasicTabbedPaneUI
-
paintFocusIndicator
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
- Overrides:
paintFocusIndicator
in classBasicTabbedPaneUI
-
layoutAndClipLabel
protected String layoutAndClipLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
-
tabForCoordinate
public int tabForCoordinate(JTabbedPane pane, int x, int y)
- Overrides:
tabForCoordinate
in classBasicTabbedPaneUI
-
getTabBounds
protected Rectangle getTabBounds(int tabIndex, Rectangle dest)
- Overrides:
getTabBounds
in classBasicTabbedPaneUI
-
getTabCloseBounds
protected Rectangle getTabCloseBounds(int tabIndex, int x, int y, int w, int h, Rectangle dest)
-
getTabCloseHitArea
protected Rectangle getTabCloseHitArea(int tabIndex)
-
isTabClosable
protected boolean isTabClosable(int tabIndex)
-
closeTab
protected void closeTab(int tabIndex)
-
getTabClientPropertyInt
protected int getTabClientPropertyInt(int tabIndex, String key, int defaultValue)
-
ensureCurrentLayout
protected void ensureCurrentLayout()
-
shouldRotateTabRuns
protected boolean shouldRotateTabRuns(int tabPlacement)
- Overrides:
shouldRotateTabRuns
in classBasicTabbedPaneUI
-
isHorizontalTabPlacement
protected boolean isHorizontalTabPlacement()
-
isSmoothScrollingEnabled
protected boolean isSmoothScrollingEnabled()
-
hideTabArea
protected boolean hideTabArea()
-
getTabType
protected int getTabType()
- Since:
- 2
-
getTabsPopupPolicy
protected int getTabsPopupPolicy()
-
getScrollButtonsPolicy
protected int getScrollButtonsPolicy()
-
getScrollButtonsPlacement
protected int getScrollButtonsPlacement()
-
getTabAreaAlignment
protected int getTabAreaAlignment()
-
getTabAlignment
protected int getTabAlignment(int tabIndex)
-
getTabWidthMode
protected int getTabWidthMode()
-
parseTabType
protected static int parseTabType(String str)
- Since:
- 2
-
parseTabsPopupPolicy
protected static int parseTabsPopupPolicy(String str)
-
parseScrollButtonsPolicy
protected static int parseScrollButtonsPolicy(String str)
-
parseScrollButtonsPlacement
protected static int parseScrollButtonsPlacement(String str)
-
parseAlignment
protected static int parseAlignment(String str, int defaultValue)
-
parseTabWidthMode
protected static int parseTabWidthMode(String str)
-
parseTabIconPlacement
protected static int parseTabIconPlacement(String str)
-
ensureSelectedTabIsVisibleLater
protected void ensureSelectedTabIsVisibleLater()
-
ensureSelectedTabIsVisible
protected void ensureSelectedTabIsVisible()
-
-