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
,FlatTitlePane.TitleBarCaptionHitTest
,SwingConstants
- Direct Known Subclasses:
FlatThemePreviewAll.PreviewFlatTabbedPaneUI
public class FlatTabbedPaneUI
extends BasicTabbedPaneUI
implements FlatStylingSupport.StyleableUI, FlatTitlePane.TitleBarCaptionHitTest
Provides the Flat LaF UI delegate for
JTabbedPane
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
protected class
protected class
private static class
protected class
protected class
Layout manager for wrap tab layout policy (and base class for scroll tab layout policy).protected class
Layout manager used for scroll tab layout policy.protected class
private class
private static class
private static class
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabbedPaneLayout, BasicTabbedPaneUI.TabSelectionHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected static final int
protected static final int
protected static final int
private boolean
protected static final int
protected int
protected Color
protected Insets
protected Color
protected int
protected int
protected Icon
private boolean
protected Color
protected int
protected Color
protected Color
protected static final int
protected Color
protected Color
protected Color
private FlatTabbedPaneUI.Handler
protected boolean
protected boolean
protected Color
protected Color
protected Color
private boolean
private boolean
private Container
protected int
protected int
private JButton
protected String
protected static final int
protected static final int
private Object[]
private boolean
private boolean
private boolean
protected boolean
private Dimension
private int
private int
protected Color
protected Color
protected Insets
protected boolean
protected boolean
protected static final int
protected static final int
private int
protected int
private int
protected boolean
private JButton
protected String
protected int
protected int
private int
protected int
protected int
protected Insets
protected Color
protected boolean
protected boolean
private int
private int
protected JViewport
private int
private int
private Container
protected Color
protected FlatTabbedPaneUI.FlatWheelTabScroller
protected static final int
protected static final int
protected static final int
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 -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
alignmentToString
(int value, String defaultValue) 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) private int
calculateTabHeightImpl
(int tabPlacement, int tabIndex, int fontHeight, boolean rotated) protected int
calculateTabWidth
(int tabPlacement, int tabIndex, FontMetrics metrics) private int
calculateTabWidthImpl
(int tabPlacement, int tabIndex, FontMetrics metrics, boolean rotated) protected void
closeTab
(int tabIndex) protected Shape
createCardTabInnerPath
(int tabPlacement, int x, int y, int w, int h) protected Shape
createCardTabOuterPath
(int tabPlacement, int x, int y, int w, int h) protected ChangeListener
protected FocusListener
protected LayoutManager
protected JButton
protected MouseListener
protected PropertyChangeListener
protected JButton
createScrollButton
(int direction) protected LayoutManager
static ComponentUI
protected FlatTabbedPaneUI.FlatWheelTabScroller
protected void
protected void
protected void
protected Insets
getContentBorderInsets
(int tabPlacement) The content border insets are used to create a separator between tabs and content.private FlatTabbedPaneUI.Handler
private int
private int
protected Insets
getRealTabAreaInsets
(int tabPlacement) protected int
getRealTabRotation
(int tabPlacement) protected int
protected int
protected Insets
getSelectedTabPadInsets
(int tabPlacement) getStyleableValue
(JComponent c, String key) protected int
getTabAlignment
(int tabIndex) protected int
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 Color
getTabForeground
(int tabPlacement, int tabIndex, boolean isSelected) protected Insets
getTabInsets
(int tabPlacement, int tabIndex) protected Insets
getTabInsetsRotated
(int tabPlacement, int tabIndex, int rotation) protected int
getTabLabelShiftX
(int tabPlacement, int tabIndex, boolean isSelected) protected int
getTabLabelShiftY
(int tabPlacement, int tabIndex, boolean isSelected) protected int
protected int
protected int
protected int
private int
private int
protected boolean
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
void
private boolean
isHorizontalOrRotated
(int tabPlacement) Returnstrue
if tab placement is top/bottom and text is painted horizontally or if tab placement is left/right and text is painted vertically (rotated).protected boolean
isHorizontalTabPlacement
(int tabPlacement) private boolean
isLastInRun
(int tabIndex) private boolean
protected boolean
protected boolean
private boolean
protected boolean
protected boolean
protected boolean
isTabClosable
(int tabIndex) isTitleBarCaptionAt
(int x, int y) Invoked for a component that is enabled and has mouse listeners, to check whether it processes mouse input at the given x/y location.protected String
layoutAndClipLabel
(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) private String
layoutVerticalCompoundLabel
(int rotation, JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) 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
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) 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
protected static int
protected static int
protected static int
parseTabRotation
(String str) protected static int
protected static int
parseTabType
(String str) protected static int
parseTabWidthMode
(String str) private int
private int
rectsTotalWidth
(boolean leftToRight) private void
repaintRolloverLaterOnce
(int oldIndex) Repaint rollover tab, but deferred and only once.private void
repaintTab
(int tabIndex) private AffineTransform
rotateGraphics
(Graphics g, int tabPlacement, Rectangle r) private void
rotateLeft
(Rectangle viewR, Rectangle r) private void
rotateRight
(Rectangle viewR, Rectangle r) private void
runWithOriginalLayoutManager
(Runnable runnable) protected void
setPressedTabClose
(boolean pressed) protected void
setRolloverTab
(int index) protected void
setRolloverTab
(int x, int y) protected void
setRolloverTabClose
(boolean rollover) private void
shiftTabs
(int sx, int sy) protected boolean
shouldRotateTabRuns
(int tabPlacement) private void
stretchTabsHeight
(int sh) private void
stretchTabsWidth
(int sw, boolean leftToRight) int
tabForCoordinate
(JTabbedPane pane, int x, int y) protected void
protected void
protected void
protected void
protected void
protected void
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, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setVisibleComponent, shouldPadTabRun, uninstallKeyboardActions, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize
-
Field Details
-
TAB_TYPE_UNDERLINED
protected static final int TAB_TYPE_UNDERLINED- Since:
- 2
- See Also:
-
TAB_TYPE_CARD
protected static final int TAB_TYPE_CARD- Since:
- 2
- See Also:
-
NEVER
protected static final int NEVER- See Also:
-
AS_NEEDED
protected static final int AS_NEEDED- See Also:
-
AS_NEEDED_SINGLE
protected static final int AS_NEEDED_SINGLE- See Also:
-
BOTH
protected static final int BOTH- See Also:
-
FILL
protected static final int FILL- See Also:
-
WIDTH_MODE_PREFERRED
protected static final int WIDTH_MODE_PREFERRED- See Also:
-
WIDTH_MODE_EQUAL
protected static final int WIDTH_MODE_EQUAL- See Also:
-
WIDTH_MODE_COMPACT
protected static final int WIDTH_MODE_COMPACT- See Also:
-
NONE
protected static final int NONE- Since:
- 3.3
- See Also:
-
AUTO
protected static final int AUTO- Since:
- 3.3
- See Also:
-
focusForwardTraversalKeys
-
focusBackwardTraversalKeys
-
foreground
-
disabledForeground
-
selectedBackground
-
selectedForeground
-
underlineColor
-
inactiveUnderlineColor
- Since:
- 2.2
-
disabledUnderlineColor
-
hoverColor
-
hoverForeground
- Since:
- 3.1
-
focusColor
-
focusForeground
- Since:
- 3.1
-
tabSeparatorColor
-
contentAreaColor
-
textIconGapUnscaled
private int textIconGapUnscaled -
minimumTabWidth
protected int minimumTabWidth -
maximumTabWidth
protected int maximumTabWidth -
tabHeight
protected int tabHeight -
tabSelectionHeight
protected int tabSelectionHeight -
cardTabSelectionHeight
protected int cardTabSelectionHeight- Since:
- 2
-
tabArc
protected int tabArc- Since:
- 3.2
-
tabSelectionArc
protected int tabSelectionArc- Since:
- 3.2
-
cardTabArc
protected int cardTabArc- Since:
- 3.2
-
selectedInsets
- Since:
- 3.2
-
tabSelectionInsets
- Since:
- 3.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
-
tabType
private int tabType -
tabsPopupPolicy
private int tabsPopupPolicy -
scrollButtonsPolicy
private int scrollButtonsPolicy -
scrollButtonsPlacement
private int scrollButtonsPlacement -
tabAreaAlignment
private int tabAreaAlignment -
tabAlignment
private int tabAlignment -
tabWidthMode
private int tabWidthMode -
tabRotation
private int tabRotation- Since:
- 3.3
-
closeIcon
-
arrowType
-
buttonInsets
-
buttonArc
protected int buttonArc -
buttonHoverBackground
-
buttonPressedBackground
-
moreTabsButtonToolTipText
-
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
-
wheelTabScroller
-
tabCloseButton
-
moreTabsButton
-
leadingComponent
-
trailingComponent
-
scrollBackwardButtonPrefSize
-
handler
-
blockRollover
private boolean blockRollover -
rolloverTabClose
private boolean rolloverTabClose -
pressedTabClose
private boolean pressedTabClose -
inBasicLayoutContainer
private boolean inBasicLayoutContainer -
oldRenderingHints
-
oldStyleValues
-
repaintRolloverPending
private boolean repaintRolloverPending -
inCalculateEqual
private boolean inCalculateEqual
-
-
Constructor Details
-
FlatTabbedPaneUI
public FlatTabbedPaneUI()
-
-
Method Details
-
createUI
-
installUI
- 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
-
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
-
getHandler
-
createWheelTabScroller
-
createMouseListener
- Overrides:
createMouseListener
in classBasicTabbedPaneUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListener
in classBasicTabbedPaneUI
-
createChangeListener
- Overrides:
createChangeListener
in classBasicTabbedPaneUI
-
createFocusListener
- Overrides:
createFocusListener
in classBasicTabbedPaneUI
-
createLayoutManager
- Overrides:
createLayoutManager
in classBasicTabbedPaneUI
-
createScrollLayoutManager
-
createMoreTabsButton
-
createScrollButton
- Overrides:
createScrollButton
in classBasicTabbedPaneUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
- 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
-
repaintRolloverLaterOnce
private void repaintRolloverLaterOnce(int oldIndex) Repaint rollover tab, but deferred and only once. This is to avoid unnecessary repaints in case of temporary changes to rollover tab. E.g. when moving mouse over a single tab, a re-layout may occur and set rollover tab to -1, in BasicTabbedPaneUI.TabbedPaneLayout.layoutContainer() and BasicTabbedPaneUI.TabbedPaneScrollLayout.layoutContainer(), and subsequently change rollover tab back to previous value. -
isRolloverTabClose
protected boolean isRolloverTabClose() -
setRolloverTabClose
protected void setRolloverTabClose(boolean rollover) -
isPressedTabClose
protected boolean isPressedTabClose() -
setPressedTabClose
protected void setPressedTabClose(boolean pressed) -
repaintTab
private void repaintTab(int tabIndex) -
calculateTabWidth
- Overrides:
calculateTabWidth
in classBasicTabbedPaneUI
-
calculateTabWidthImpl
private int calculateTabWidthImpl(int tabPlacement, int tabIndex, FontMetrics metrics, boolean rotated) -
calculateTabHeight
protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) - Overrides:
calculateTabHeight
in classBasicTabbedPaneUI
-
calculateTabHeightImpl
private int calculateTabHeightImpl(int tabPlacement, int tabIndex, int fontHeight, boolean rotated) -
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
- Overrides:
getTabInsets
in classBasicTabbedPaneUI
-
getTabInsetsRotated
- Since:
- 3.3
-
getSelectedTabPadInsets
- Overrides:
getSelectedTabPadInsets
in classBasicTabbedPaneUI
-
getRealTabAreaInsets
-
getTabAreaInsets
- Overrides:
getTabAreaInsets
in classBasicTabbedPaneUI
-
getContentBorderInsets
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
- Overrides:
update
in classComponentUI
-
paint
- Overrides:
paint
in classBasicTabbedPaneUI
-
paintTabArea
- 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
-
paintIcon
protected void paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected) - Overrides:
paintIcon
in classBasicTabbedPaneUI
-
rotateGraphics
-
getTabForeground
- Since:
- 3.1
-
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
- 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
-
createCardTabOuterPath
- Since:
- 3.2
-
createCardTabInnerPath
- Since:
- 3.2
-
paintTabCloseButton
-
paintTabSeparator
-
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
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
-
layoutVerticalCompoundLabel
private String layoutVerticalCompoundLabel(int rotation, JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) -
rotateLeft
-
rotateRight
-
getRealTabRotation
protected int getRealTabRotation(int tabPlacement) - Since:
- 3.3
-
tabForCoordinate
- Overrides:
tabForCoordinate
in classBasicTabbedPaneUI
-
getTabBounds
- Overrides:
getTabBounds
in classBasicTabbedPaneUI
-
getTabCloseBounds
-
getTabCloseHitArea
-
isTabClosable
protected boolean isTabClosable(int tabIndex) -
closeTab
protected void closeTab(int tabIndex) -
getTabClientProperty
-
getTabClientPropertyInt
-
ensureCurrentLayout
protected void ensureCurrentLayout() -
shouldRotateTabRuns
protected boolean shouldRotateTabRuns(int tabPlacement) - Overrides:
shouldRotateTabRuns
in classBasicTabbedPaneUI
-
isLastInRun
private boolean isLastInRun(int tabIndex) -
isScrollTabLayout
private boolean isScrollTabLayout() -
isLeftToRight
private boolean isLeftToRight() -
isHorizontalTabPlacement
protected boolean isHorizontalTabPlacement(int tabPlacement) - Since:
- 3.3
-
isHorizontalOrRotated
private boolean isHorizontalOrRotated(int tabPlacement) Returnstrue
if tab placement is top/bottom and text is painted horizontally or if tab placement is left/right and text is painted vertically (rotated). -
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() -
getTabRotation
protected int getTabRotation()- Since:
- 3.3
-
parseTabType
- Since:
- 2
-
parseTabsPopupPolicy
-
parseScrollButtonsPolicy
-
parseScrollButtonsPlacement
-
parseAlignment
-
alignmentToString
-
parseTabWidthMode
-
parseTabRotation
- Since:
- 3.3
-
parseTabIconPlacement
-
runWithOriginalLayoutManager
-
ensureSelectedTabIsVisibleLater
protected void ensureSelectedTabIsVisibleLater() -
ensureSelectedTabIsVisible
protected void ensureSelectedTabIsVisible() -
getLeadingPreferredWidth
private int getLeadingPreferredWidth() -
getLeadingPreferredHeight
private int getLeadingPreferredHeight() -
getTrailingPreferredWidth
private int getTrailingPreferredWidth() -
getTrailingPreferredHeight
private int getTrailingPreferredHeight() -
shiftTabs
private void shiftTabs(int sx, int sy) -
stretchTabsWidth
private void stretchTabsWidth(int sw, boolean leftToRight) -
stretchTabsHeight
private void stretchTabsHeight(int sh) -
rectsTotalWidth
private int rectsTotalWidth(boolean leftToRight) -
rectsTotalHeight
private int rectsTotalHeight() -
isTitleBarCaptionAt
Description copied from interface:FlatTitlePane.TitleBarCaptionHitTest
Invoked for a component that is enabled and has mouse listeners, to check whether it processes mouse input at the given x/y location. Useful for components that do not use mouse input on whole component bounds. E.g. a tabbed pane with a few tabs has some empty space beside the tabs that can be used to move the window.- Specified by:
isTitleBarCaptionAt
in interfaceFlatTitlePane.TitleBarCaptionHitTest
- Returns:
true
if the component is not interested in mouse input at the given locationfalse
if the component wants process mouse input at the given locationnull
if the component children should be checked- Since:
- 3.4
-