Class FlatTabbedPane
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JTabbedPane
-
- com.formdev.flatlaf.extras.components.FlatTabbedPane
-
- All Implemented Interfaces:
FlatComponentExtension,FlatStyleableComponent,ImageObserver,MenuContainer,Serializable,Accessible,SwingConstants
public class FlatTabbedPane extends JTabbedPane implements FlatComponentExtension, FlatStyleableComponent
Subclass ofJTabbedPanethat provides easy access to FlatLaf specific client properties.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlatTabbedPane.ScrollButtonsPlacementstatic classFlatTabbedPane.ScrollButtonsPolicystatic classFlatTabbedPane.TabAlignmentstatic classFlatTabbedPane.TabAreaAlignmentstatic classFlatTabbedPane.TabRotationstatic classFlatTabbedPane.TabsPopupPolicystatic classFlatTabbedPane.TabTypestatic classFlatTabbedPane.TabWidthMode-
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
-
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
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 FlatTabbedPane()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentgetLeadingComponent()Returns a component that will be placed at the leading edge of the tabs area.intgetMaximumTabWidth()Returns the maximum width of a tab.intgetMaximumTabWidth(int tabIndex)Returns the maximum width of the tab at the given tab index.intgetMinimumTabWidth()Returns the minimum width of a tab.intgetMinimumTabWidth(int tabIndex)Returns the minimum width of the tab at the given tab index.FlatTabbedPane.ScrollButtonsPlacementgetScrollButtonsPlacement()Returns the placement of the forward/backward scroll arrow buttons.FlatTabbedPane.ScrollButtonsPolicygetScrollButtonsPolicy()Returns the display policy for the forward/backward scroll arrow buttons.FlatTabbedPane.TabAlignmentgetTabAlignment()Returns the horizontal alignment of the tab title and icon.FlatTabbedPane.TabAreaAlignmentgetTabAreaAlignment()Returns the alignment of the tab area.InsetsgetTabAreaInsets()Returns the insets of the tab area.BiConsumer<JTabbedPane,Integer>getTabCloseCallback()Returns the callback that is invoked when a tab close button is clicked.BiConsumer<JTabbedPane,Integer>getTabCloseCallback(int tabIndex)Returns the callback that is invoked when the tab close button at the given tab index is clicked.StringgetTabCloseToolTipText()Returns the tooltip text used for tab close buttons.StringgetTabCloseToolTipText(int tabIndex)Returns the tooltip text used for tab close button at the given tab index.intgetTabHeight()Returns the minimum height of a tab.intgetTabIconPlacement()Returns the tab icon placement (relative to tab title).InsetsgetTabInsets()Returns the insets of a tab.InsetsgetTabInsets(int tabIndex)Returns the insets of the tab at the given tab index.FlatTabbedPane.TabRotationgetTabRotation()Returns how the tabs should be rotated.FlatTabbedPane.TabsPopupPolicygetTabsPopupPolicy()Returns the display policy for the "more tabs" button, which shows a popup menu with the (partly) hidden tabs.FlatTabbedPane.TabTypegetTabType()Returns type of selected tab.FlatTabbedPane.TabWidthModegetTabWidthMode()Returns how the tabs should be sized.ComponentgetTrailingComponent()Returns a component that will be placed at the trailing edge of the tabs area.booleanisHasFullBorder()Returns whether a full border is painted around a tabbed pane.booleanisHideTabAreaWithOneTab()Returns whether the tab area should be hidden if it contains only one tab.booleanisShowContentSeparators()Returns whether the separator between tabs area and content area should be shown.booleanisShowTabSeparators()Returns whether separators are shown between tabs.BooleanisTabClosable(int tabIndex)Returns whether the tab at the given tab index is closable.booleanisTabsClosable()Returns whether all tabs are closable.voidsetHasFullBorder(boolean hasFullBorder)Specifies whether a full border is painted around a tabbed pane.voidsetHideTabAreaWithOneTab(boolean hideTabAreaWithOneTab)Specifies whether the tab area should be hidden if it contains only one tab.voidsetLeadingComponent(Component leadingComponent)Specifies a component that will be placed at the leading edge of the tabs area.voidsetMaximumTabWidth(int maximumTabWidth)Specifies the maximum width of a tab.voidsetMaximumTabWidth(int tabIndex, int maximumTabWidth)Specifies the maximum width of the tab at the given tab index.voidsetMinimumTabWidth(int minimumTabWidth)Specifies the minimum width of a tab.voidsetMinimumTabWidth(int tabIndex, int minimumTabWidth)Specifies the minimum width of the tab at the given tab index.voidsetScrollButtonsPlacement(FlatTabbedPane.ScrollButtonsPlacement scrollButtonsPlacement)Specifies the placement of the forward/backward scroll arrow buttons.voidsetScrollButtonsPolicy(FlatTabbedPane.ScrollButtonsPolicy scrollButtonsPolicy)Specifies the display policy for the forward/backward scroll arrow buttons.voidsetShowContentSeparators(boolean showContentSeparators)Specifies whether the separator between tabs area and content area should be shown.voidsetShowTabSeparators(boolean showTabSeparators)Specifies whether separators are shown between tabs.voidsetTabAlignment(FlatTabbedPane.TabAlignment tabAlignment)Specifies the horizontal alignment of the tab title and icon.voidsetTabAreaAlignment(FlatTabbedPane.TabAreaAlignment tabAreaAlignment)Specifies the alignment of the tab area.voidsetTabAreaInsets(Insets tabAreaInsets)Specifies the insets of the tab area.voidsetTabClosable(int tabIndex, boolean tabClosable)Specifies whether the tab at the given tab index is closable.voidsetTabCloseCallback(int tabIndex, BiConsumer<JTabbedPane,Integer> tabCloseCallback)Specifies the callback that is invoked when the tab close button at the given tab index is clicked.voidsetTabCloseCallback(BiConsumer<JTabbedPane,Integer> tabCloseCallback)Specifies the callback that is invoked when a tab close button is clicked.voidsetTabCloseToolTipText(int tabIndex, String tabCloseToolTipText)Specifies the tooltip text used for tab close button at the given tab index.voidsetTabCloseToolTipText(String tabCloseToolTipText)Specifies the tooltip text used for tab close buttons.voidsetTabHeight(int tabHeight)Specifies the minimum height of a tab.voidsetTabIconPlacement(int tabIconPlacement)Specifies the tab icon placement (relative to tab title).voidsetTabInsets(int tabIndex, Insets tabInsets)Specifies the insets of the tab at the given tab index.voidsetTabInsets(Insets tabInsets)Specifies the insets of a tab.voidsetTabRotation(FlatTabbedPane.TabRotation tabRotation)Specifies how the tabs should be rotated.voidsetTabsClosable(boolean tabClosable)Specifies whether all tabs are closable.voidsetTabsPopupPolicy(FlatTabbedPane.TabsPopupPolicy tabsPopupPolicy)Specifies the display policy for the "more tabs" button, which shows a popup menu with the (partly) hidden tabs.voidsetTabType(FlatTabbedPane.TabType tabType)Specifies type of selected tab.voidsetTabWidthMode(FlatTabbedPane.TabWidthMode tabWidthMode)Specifies how the tabs should be sized.voidsetTrailingComponent(Component trailingComponent)Specifies a component that will be placed at the trailing edge of the tabs area.-
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.formdev.flatlaf.extras.components.FlatComponentExtension
getClientProperty, getClientPropertyBoolean, getClientPropertyBoolean, getClientPropertyColor, getClientPropertyEnumString, getClientPropertyInsets, getClientPropertyInt, getClientPropertyInt, putClientProperty, putClientPropertyBoolean, putClientPropertyEnumString
-
Methods inherited from interface com.formdev.flatlaf.extras.components.FlatStyleableComponent
getClientProperty, getStyle, getStyleClass, getStyleMap, putClientProperty, setStyle, setStyleClass, setStyleMap
-
-
-
-
Method Detail
-
isShowTabSeparators
public boolean isShowTabSeparators()
Returns whether separators are shown between tabs.
-
setShowTabSeparators
public void setShowTabSeparators(boolean showTabSeparators)
Specifies whether separators are shown between tabs.
-
isShowContentSeparators
public boolean isShowContentSeparators()
Returns whether the separator between tabs area and content area should be shown.
-
setShowContentSeparators
public void setShowContentSeparators(boolean showContentSeparators)
Specifies whether the separator between tabs area and content area should be shown.
-
isHasFullBorder
public boolean isHasFullBorder()
Returns whether a full border is painted around a tabbed pane.
-
setHasFullBorder
public void setHasFullBorder(boolean hasFullBorder)
Specifies whether a full border is painted around a tabbed pane.
-
isHideTabAreaWithOneTab
public boolean isHideTabAreaWithOneTab()
Returns whether the tab area should be hidden if it contains only one tab.
-
setHideTabAreaWithOneTab
public void setHideTabAreaWithOneTab(boolean hideTabAreaWithOneTab)
Specifies whether the tab area should be hidden if it contains only one tab.
-
getMinimumTabWidth
public int getMinimumTabWidth()
Returns the minimum width of a tab.
-
setMinimumTabWidth
public void setMinimumTabWidth(int minimumTabWidth)
Specifies the minimum width of a tab.
-
getMinimumTabWidth
public int getMinimumTabWidth(int tabIndex)
Returns the minimum width of the tab at the given tab index.
-
setMinimumTabWidth
public void setMinimumTabWidth(int tabIndex, int minimumTabWidth)Specifies the minimum width of the tab at the given tab index.
-
getMaximumTabWidth
public int getMaximumTabWidth()
Returns the maximum width of a tab.
-
setMaximumTabWidth
public void setMaximumTabWidth(int maximumTabWidth)
Specifies the maximum width of a tab.Applied only if tab does not have a custom tab component (see
JTabbedPane.setTabComponentAt(int, java.awt.Component)).
-
getMaximumTabWidth
public int getMaximumTabWidth(int tabIndex)
Returns the maximum width of the tab at the given tab index.
-
setMaximumTabWidth
public void setMaximumTabWidth(int tabIndex, int maximumTabWidth)Specifies the maximum width of the tab at the given tab index.Applied only if tab does not have a custom tab component (see
JTabbedPane.setTabComponentAt(int, java.awt.Component)).
-
getTabHeight
public int getTabHeight()
Returns the minimum height of a tab.
-
setTabHeight
public void setTabHeight(int tabHeight)
Specifies the minimum height of a tab.- See Also:
setTabInsets(Insets)
-
getTabInsets
public Insets getTabInsets()
Returns the insets of a tab.
-
setTabInsets
public void setTabInsets(Insets tabInsets)
Specifies the insets of a tab.- See Also:
setTabHeight(int)
-
getTabInsets
public Insets getTabInsets(int tabIndex)
Returns the insets of the tab at the given tab index.
-
setTabInsets
public void setTabInsets(int tabIndex, Insets tabInsets)Specifies the insets of the tab at the given tab index.- See Also:
setTabHeight(int)
-
getTabAreaInsets
public Insets getTabAreaInsets()
Returns the insets of the tab area.
-
setTabAreaInsets
public void setTabAreaInsets(Insets tabAreaInsets)
Specifies the insets of the tab area.
-
isTabsClosable
public boolean isTabsClosable()
Returns whether all tabs are closable.
-
setTabsClosable
public void setTabsClosable(boolean tabClosable)
Specifies whether all tabs are closable. If set totrue, all tabs in that tabbed pane are closable. To make individual tabs closable, usesetTabClosable(int, boolean).Note that you have to specify a callback (see
setTabCloseCallback(BiConsumer)) that is invoked when the user clicks a tab close button. The callback is responsible for closing the tab.
-
isTabClosable
public Boolean isTabClosable(int tabIndex)
Returns whether the tab at the given tab index is closable.
-
setTabClosable
public void setTabClosable(int tabIndex, boolean tabClosable)Specifies whether the tab at the given tab index is closable. To make all tabs closable, usesetTabsClosable(boolean).Note that you have to specify a callback (see
setTabCloseCallback(BiConsumer)) that is invoked when the user clicks a tab close button. The callback is responsible for closing the tab.
-
getTabCloseToolTipText
public String getTabCloseToolTipText()
Returns the tooltip text used for tab close buttons.
-
setTabCloseToolTipText
public void setTabCloseToolTipText(String tabCloseToolTipText)
Specifies the tooltip text used for tab close buttons.
-
getTabCloseToolTipText
public String getTabCloseToolTipText(int tabIndex)
Returns the tooltip text used for tab close button at the given tab index.
-
setTabCloseToolTipText
public void setTabCloseToolTipText(int tabIndex, String tabCloseToolTipText)Specifies the tooltip text used for tab close button at the given tab index.
-
getTabCloseCallback
public BiConsumer<JTabbedPane,Integer> getTabCloseCallback()
Returns the callback that is invoked when a tab close button is clicked. The callback is responsible for closing the tab.
-
setTabCloseCallback
public void setTabCloseCallback(BiConsumer<JTabbedPane,Integer> tabCloseCallback)
Specifies the callback that is invoked when a tab close button is clicked. The callback is responsible for closing the tab.Use a
BiConsumer<javax.swing.JTabbedPane, Integer> that receives the tabbed pane and the tab index as parameters:
If you need to check whether a modifier key (e.g. Alt or Shift) was pressed while the user clicked the tab close button, usemyTabbedPane.setTabCloseCallback( (tabbedPane, tabIndex) -> { // close tab here } );EventQueue.getCurrentEvent()to get current event, check whether it is aMouseEventand invoke its methods. E.g.AWTEvent e = EventQueue.getCurrentEvent(); boolean shift = (e instanceof MouseEvent) ? ((MouseEvent)e).isShiftDown() : false;
-
getTabCloseCallback
public BiConsumer<JTabbedPane,Integer> getTabCloseCallback(int tabIndex)
Returns the callback that is invoked when the tab close button at the given tab index is clicked. The callback is responsible for closing the tab.
-
setTabCloseCallback
public void setTabCloseCallback(int tabIndex, BiConsumer<JTabbedPane,Integer> tabCloseCallback)Specifies the callback that is invoked when the tab close button at the given tab index is clicked. The callback is responsible for closing the tab.- See Also:
setTabCloseCallback(BiConsumer)
-
getTabType
public FlatTabbedPane.TabType getTabType()
Returns type of selected tab.- Since:
- 2
-
setTabType
public void setTabType(FlatTabbedPane.TabType tabType)
Specifies type of selected tab.- Since:
- 2
-
getTabsPopupPolicy
public FlatTabbedPane.TabsPopupPolicy getTabsPopupPolicy()
Returns the display policy for the "more tabs" button, which shows a popup menu with the (partly) hidden tabs.
-
setTabsPopupPolicy
public void setTabsPopupPolicy(FlatTabbedPane.TabsPopupPolicy tabsPopupPolicy)
Specifies the display policy for the "more tabs" button, which shows a popup menu with the (partly) hidden tabs.
-
getScrollButtonsPolicy
public FlatTabbedPane.ScrollButtonsPolicy getScrollButtonsPolicy()
Returns the display policy for the forward/backward scroll arrow buttons.
-
setScrollButtonsPolicy
public void setScrollButtonsPolicy(FlatTabbedPane.ScrollButtonsPolicy scrollButtonsPolicy)
Specifies the display policy for the forward/backward scroll arrow buttons.
-
getScrollButtonsPlacement
public FlatTabbedPane.ScrollButtonsPlacement getScrollButtonsPlacement()
Returns the placement of the forward/backward scroll arrow buttons.
-
setScrollButtonsPlacement
public void setScrollButtonsPlacement(FlatTabbedPane.ScrollButtonsPlacement scrollButtonsPlacement)
Specifies the placement of the forward/backward scroll arrow buttons.
-
getTabAreaAlignment
public FlatTabbedPane.TabAreaAlignment getTabAreaAlignment()
Returns the alignment of the tab area.
-
setTabAreaAlignment
public void setTabAreaAlignment(FlatTabbedPane.TabAreaAlignment tabAreaAlignment)
Specifies the alignment of the tab area.
-
getTabAlignment
public FlatTabbedPane.TabAlignment getTabAlignment()
Returns the horizontal alignment of the tab title and icon.
-
setTabAlignment
public void setTabAlignment(FlatTabbedPane.TabAlignment tabAlignment)
Specifies the horizontal alignment of the tab title and icon.
-
getTabWidthMode
public FlatTabbedPane.TabWidthMode getTabWidthMode()
Returns how the tabs should be sized.
-
setTabWidthMode
public void setTabWidthMode(FlatTabbedPane.TabWidthMode tabWidthMode)
Specifies how the tabs should be sized.
-
getTabRotation
public FlatTabbedPane.TabRotation getTabRotation()
Returns how the tabs should be rotated.- Since:
- 3.3
-
setTabRotation
public void setTabRotation(FlatTabbedPane.TabRotation tabRotation)
Specifies how the tabs should be rotated.- Since:
- 3.3
-
getTabIconPlacement
public int getTabIconPlacement()
Returns the tab icon placement (relative to tab title).
-
setTabIconPlacement
public void setTabIconPlacement(int tabIconPlacement)
Specifies the tab icon placement (relative to tab title).Allowed Values are:
-
getLeadingComponent
public Component getLeadingComponent()
Returns a component that will be placed at the leading edge of the tabs area.
-
setLeadingComponent
public void setLeadingComponent(Component leadingComponent)
Specifies a component that will be placed at the leading edge of the tabs area.For top and bottom tab placement, the layed out component size will be the preferred component width and the tab area height.
For left and right tab placement, the layed out component size will be the tab area width and the preferred component height.
-
getTrailingComponent
public Component getTrailingComponent()
Returns a component that will be placed at the trailing edge of the tabs area.
-
setTrailingComponent
public void setTrailingComponent(Component trailingComponent)
Specifies a component that will be placed at the trailing edge of the tabs area.For top and bottom tab placement, the layed out component size will be the available horizontal space (minimum is preferred component width) and the tab area height.
For left and right tab placement, the layed out component size will be the tab area width and the available vertical space (minimum is preferred component height).
-
-