Package com.jidesoft.plaf.basic
Class BasicJideTabbedPaneUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TabbedPaneUI
com.jidesoft.plaf.JideTabbedPaneUI
com.jidesoft.plaf.basic.BasicJideTabbedPaneUI
- All Implemented Interfaces:
EventListener,DocumentListener,SwingConstants
- Direct Known Subclasses:
VsnetJideTabbedPaneUI
public class BasicJideTabbedPaneUI
extends JideTabbedPaneUI
implements SwingConstants, DocumentListener
A basic Linvalid input: '&f' implementation of JideTabbedPaneUI
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classclassclassclassThis inner class is marked "public" due to a compiler bug.classclassclassThis inner class is marked "public" due to a compiler bug.classclassclassclassclassclassThis inner class is marked "public" due to a compiler bug.protected classclassDeprecated.protected classclassclassThis inner class is marked "public" due to a compiler bug.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected Colorprotected intprotected booleanprotected Colorprotected intprotected intprotected RectangleA rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly.protected intprotected Colorprotected intprotected intprotected intprotected intprotected intprotected intprotected JButton[]protected Colorprotected intprotected intprotected intprotected intprotected Colorprotected Colorprotected intprotected intprotected intprotected intprotected intprotected intprotected Colorprotected intprotected intprotected intprotected Colorprotected intprotected booleanprotected Colorprotected Colorprotected intprotected booleanprotected Colorprotected intprotected intprotected booleanprotected MouseListenerprotected MouseMotionListenerprotected MouseWheelListenerprotected intprotected Colorprotected Stringprotected Stringprotected Stringprotected Componentprotected Colorprotected PropertyChangeListenerprotected Rectangle[]protected intprotected intprotected Colorprotected Colorprotected Colorprotected Colorprotected intprotected Fontprotected Insetsprotected Colorprotected booleanprotected booleanprotected booleanprotected Insetsprotected Colorprotected ChangeListenerprotected intNumber of tabs.protected BasicJideTabbedPaneUI.TabEditorprotected FocusListenerprotected Insetsprotected Componentprotected Colorprotected ChangeListenerprotected JideTabbedPaneprotected intprotected intprotected int[]protected Componentprotected intprotected intprotected intprotected Colorprotected Colorprotected Colorstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final intprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected Polygonprotected BasicJideTabbedPaneUI.TabSpaceAllocatorFields 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 TypeMethodDescriptionprotected voidassureRectsCreated(int tabCount) protected intcalculateMaxTabHeight(int tabPlacement) protected intcalculateMaxTabWidth(int tabPlacement) protected intcalculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight) protected intcalculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth) protected intcalculateTabHeight(int tabPlacement, int tabIndex, FontMetrics metrics) protected intcalculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics) voidCancels the editing and discards the change.voidprotected ChangeListenerprotected BasicJideTabbedPaneUI.TabEditorprotected com.jidesoft.plaf.basic.BasicJideTabbedPaneUI.DropListenerprotected FocusListenerprotected LayoutManagerInvoked byinstallUIto create a layout manager object to manage theJTabbedPane.protected MouseListenerprotected MouseMotionListenerprotected MouseWheelListenerprotected BasicJideTabbedPaneUI.TabCloseButtoncreateNoFocusButton(int type) Deprecated.replaced byJideTabbedPane.createNoFocusButton(int)protected PropertyChangeListenerstatic ComponentUIbooleaneditTabAt(int tabIndex) Edits the tab at the index.voidensureActiveTabIsVisible(boolean scrollLeft) Scroll the selected tab visible in case the tab is outside of the viewport.voidprotected voidprotected voidensureCurrentRects(int leftMargin, int tabCount) protected voidprotected Colorprotected intprotected InsetsgetContentBorderInsets(int tabPlacement) protected StringgetCurrentDisplayTitleAt(JideTabbedPane tp, int index) intGets the tab index that is editing, if any.protected FontMetricsgetFontMetrics(int tab) protected intprotected intprotected intgetNextTabIndex(int base) protected intgetNextTabIndexInRun(int tabCount, int base) protected intgetNextTabRun(int baseRun) protected intgetPreviousTabIndex(int base) protected intgetPreviousTabIndexInRun(int tabCount, int base) protected intgetPreviousTabRun(int baseRun) protected StringgetResourceString(String key) Gets the resource string used in JideTabbedPane.protected intgetRunForTab(int tabCount, int tabIndex) protected InsetsgetSelectedTabPadInsets(int tabPlacement) protected InsetsgetTabAreaInsets(int tabPlacement) intgetTabAtLocation(int x, int y) Returns the tab index which intersects the specified point in the coordinate space of the component where the tabs are actually rendered, which could be the JTabbedPane (for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT).protected RectanglegetTabBounds(int tabIndex, Rectangle dest) Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component.getTabBounds(JTabbedPane pane, int i) Returns the bounds of the specified tab index.protected intprotected InsetsgetTabInsets(int tabPlacement, int tabIndex) protected intgetTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) protected intgetTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) protected ListCellRendererGets the tab panel for the JideTabbedPane.protected intprotected intintgetTabRunCount(JTabbedPane pane) protected intgetTabRunIndent(int tabPlacement, int run) protected intgetTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward) protected intgetTabRunOverlay(int tabPlacement) protected intprotected RectanglegetTabsTextBoundsAt(int tabIndex) protected ViewgetTextViewForTab(int tabIndex) Returns the text View object required to render stylized text (HTML) for the specified tab or null if no specialized text rendering is needed for this tab.protected Componentvoidvoidprotected voidCreates and installs any required subcomponents for the JTabbedPane.protected voidprotected voidprotected voidvoidbooleanisEmptyTabArea(int x, int y) Returns if the point resides in the empty tab area, which means it is in the tab area however no real tab contains that point.protected booleanprotected booleanprotected booleanprotected booleanprotected booleanbooleanChecks if the tab is being edited.protected booleanprotected booleanisTabTopVisible(int tabPlacement) protected booleanprotected intlastTabInRun(int tabCount, int run) protected voidlayoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) protected voidnavigateSelectedTab(int direction) voidpaint(Graphics g, JComponent c) voidpaintBackground(Graphics g, Component c) protected voidpaintBoxTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintButtonTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintContentBorder(Graphics g, int tabPlacement, int selectedIndex) Paints the border of the conten pane which should reflect the tabs as well.protected voidpaintContentBorder(Graphics g, int x, int y, int w, int h) protected voidpaintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) protected voidpaintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) protected voidpaintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) protected voidpaintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) protected voidpaintDefaultTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintExcelTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintExcelTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintFlatTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintFlatTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) protected voidpaintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected) protected voidpaintOffice2003TabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintOffice2003TabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintRoundedFlatTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintRoundedVsnetTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) protected voidpaintTabArea(Graphics g, int tabPlacement, int selectedIndex, Component c) Paints the tabs in the tab area.protected voidpaintTabAreaBackground(Graphics g, Rectangle rect, int tabPlacement) protected voidpaintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintTabBackgroundMouseOver(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected, Color backgroundUnselectedColorStart, Color backgroundUnselectedColorEnd) protected voidpaintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) this function draws the border around each tab note that this function does now draw the background of the tab.protected voidpaintTabBorderMouseOver(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) protected voidpaintVsnetTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintVsnetTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidpaintWindowsTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) protected voidprepareEditor(BasicJideTabbedPaneUI.TabEditor e, int tabIndex) voidbooleanprotected voidresizeEditor(int tabIndex) static voidrotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement) protected booleanprotected voidselectAdjacentRunTab(int tabPlacement, int tabIndex, int offset) protected voidselectNextTab(int current) protected voidselectNextTabInRun(int current) protected voidselectPreviousTab(int current) protected voidselectPreviousTabInRun(int current) protected voidsetVisibleComponent(Component component) protected booleanshouldPadTabRun(int tabPlacement, int run) protected booleanshouldRotateTabRuns(int tabPlacement) protected booleanvoidprotected voidvoidStops the editing and commits the change.inttabForCoordinate(JTabbedPane pane, int x, int y) Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space.voidprotected voidRemoves any installed subcomponents from the JTabbedPane.protected voidprotected voidprotected voidvoidprotected voidprotected voidReloads the mnemonics.Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
-
Field Details
-
_tabRectPadding
protected int _tabRectPadding -
_closeButtonMarginHorizon
protected int _closeButtonMarginHorizon -
_closeButtonMarginVertical
protected int _closeButtonMarginVertical -
_textMarginVertical
protected int _textMarginVertical -
_noIconMargin
protected int _noIconMargin -
_iconMargin
protected int _iconMargin -
_textPadding
protected int _textPadding -
_buttonSize
protected int _buttonSize -
_buttonMargin
protected int _buttonMargin -
_fitStyleBoundSize
protected int _fitStyleBoundSize -
_fitStyleFirstTabMargin
protected int _fitStyleFirstTabMargin -
_fitStyleIconMinWidth
protected int _fitStyleIconMinWidth -
_fitStyleTextMinWidth
protected int _fitStyleTextMinWidth -
_compressedStyleNoIconRectSize
protected int _compressedStyleNoIconRectSize -
_compressedStyleIconMargin
protected int _compressedStyleIconMargin -
_compressedStyleCloseButtonMarginHorizon
protected int _compressedStyleCloseButtonMarginHorizon -
_compressedStyleCloseButtonMarginVertical
protected int _compressedStyleCloseButtonMarginVertical -
_fixedStyleRectSize
protected int _fixedStyleRectSize -
_closeButtonMargin
protected int _closeButtonMargin -
_gripLeftMargin
protected int _gripLeftMargin -
_closeButtonMarginSize
protected int _closeButtonMarginSize -
_closeButtonLeftMargin
protected int _closeButtonLeftMargin -
_closeButtonRightMargin
protected int _closeButtonRightMargin -
_tabLeadingComponent
-
_tabTrailingComponent
-
_tabPane
-
_selectedTabFont
-
_tabBackground
-
_background
-
_highlight
-
_lightHighlight
-
_shadow
-
_darkShadow
-
_focus
-
_inactiveTabForeground
-
_inactiveSelectedTabForeground
-
_activeTabForeground
-
_tabListBackground
-
_selectedColor
-
_activeBackground
-
_textIconGap
protected int _textIconGap -
_tabRunOverlay
protected int _tabRunOverlay -
_showIconOnTab
protected boolean _showIconOnTab -
_showCloseButtonOnTab
protected boolean _showCloseButtonOnTab -
_closeButtonAlignment
protected int _closeButtonAlignment -
_tabInsets
-
_selectedTabPadInsets
-
_tabAreaInsets
-
_ignoreContentBorderInsetsIfNoTabs
protected boolean _ignoreContentBorderInsetsIfNoTabs -
_tabRuns
protected int[] _tabRuns -
_runCount
protected int _runCount -
_selectedRun
protected int _selectedRun -
_rects
-
_additionalWidth
protected int _additionalWidth -
_maxTabHeight
protected int _maxTabHeight -
_maxTabWidth
protected int _maxTabWidth -
_gripperWidth
protected int _gripperWidth -
_gripperHeight
protected int _gripperHeight -
_tabChangeListener
-
_tabFocusListener
-
_propertyChangeListener
-
_tabModelChangeListener
-
_mouseListener
-
_mousemotionListener
-
_mouseWheelListener
-
_tabScroller
-
_calcRect
A rectangle used for general layout calculations in order to avoid constructing many new Rectangles on the fly. -
_tabCount
protected int _tabCountNumber of tabs. When the count differs, the mnemonics are updated. -
_closeButtons
-
_dt
-
DEFAULT_LEFT_MARGIN
public static final int DEFAULT_LEFT_MARGIN- See Also:
-
OFFICE2003_LEFT_MARGIN
public static final int OFFICE2003_LEFT_MARGIN- See Also:
-
EXCEL_LEFT_MARGIN
public static final int EXCEL_LEFT_MARGIN- See Also:
-
_rectSizeExtend
protected int _rectSizeExtend -
tabRegion
-
_selectColor1
-
_selectColor2
-
_selectColor3
-
_unselectColor1
-
_unselectColor2
-
_unselectColor3
-
_officeTabBorderColor
-
_defaultTabBorderShadowColor
-
_mouseEnter
protected boolean _mouseEnter -
_indexMouseOver
protected int _indexMouseOver -
_alwaysShowLineBorder
protected boolean _alwaysShowLineBorder -
_showFocusIndicator
protected boolean _showFocusIndicator -
BUTTON_NAME_CLOSE
- See Also:
-
BUTTON_NAME_TAB_LIST
- See Also:
-
BUTTON_NAME_SCROLL_BACKWARD
- See Also:
-
BUTTON_NAME_SCROLL_FORWARD
- See Also:
-
tryTabSpacer
-
_closeButtonSelectedColor
-
_closeButtonColor
-
_popupColor
-
_tabEditor
-
_isEditing
protected boolean _isEditing -
_editingTab
protected int _editingTab -
_oldValue
-
_oldPrefix
-
_oldPostfix
-
_originalFocusComponent
-
PAINT_TAB
protected final boolean PAINT_TAB- See Also:
-
PAINT_TAB_BORDER
protected final boolean PAINT_TAB_BORDER- See Also:
-
PAINT_TAB_BACKGROUND
protected final boolean PAINT_TAB_BACKGROUND- See Also:
-
PAINT_TABAREA
protected final boolean PAINT_TABAREA- See Also:
-
PAINT_CONTENT_BORDER
protected final boolean PAINT_CONTENT_BORDER- See Also:
-
PAINT_CONTENT_BORDER_EDGE
protected final boolean PAINT_CONTENT_BORDER_EDGE- See Also:
-
-
Constructor Details
-
BasicJideTabbedPaneUI
public BasicJideTabbedPaneUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classComponentUI
-
installColorTheme
public void installColorTheme() -
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
uninstallColorTheme
public void uninstallColorTheme() -
createLayoutManager
Invoked byinstallUIto create a layout manager object to manage theJTabbedPane.- Returns:
- a layout manager object
- See Also:
-
scrollableTabLayoutEnabled
protected boolean scrollableTabLayoutEnabled() -
installComponents
protected void installComponents()Creates and installs any required subcomponents for the JTabbedPane. Invoked by installUI. -
uninstallComponents
protected void uninstallComponents()Removes any installed subcomponents from the JTabbedPane. Invoked by uninstallUI. -
installDefaults
protected void installDefaults() -
uninstallDefaults
protected void uninstallDefaults() -
installListeners
protected void installListeners() -
createDropListener
protected com.jidesoft.plaf.basic.BasicJideTabbedPaneUI.DropListener createDropListener() -
uninstallListeners
protected void uninstallListeners() -
createChangeListener
-
createFocusListener
-
createPropertyChangeListener
-
installKeyboardActions
protected void installKeyboardActions() -
uninstallKeyboardActions
protected void uninstallKeyboardActions() -
updateMnemonics
protected void updateMnemonics()Reloads the mnemonics. This should be invoked when a mnemonic changes, when the title of a mnemonic changes, or when tabs are added/removed. -
getPreferredSize
- Overrides:
getPreferredSizein classComponentUI
-
getMinimumSize
- Overrides:
getMinimumSizein classComponentUI
-
getMaximumSize
- Overrides:
getMaximumSizein classComponentUI
-
paint
- Overrides:
paintin classComponentUI
-
paintBackground
-
paintTabArea
Paints the tabs in the tab area. Invoked by paint(). The graphics parameter must be a validGraphicsobject. Tab placement may be either:JTabbedPane.TOP,JTabbedPane.BOTTOM,JTabbedPane.LEFT, orJTabbedPane.RIGHT. The selected index must be a valid tabbed pane tab index (0 to tab count - 1, inclusive) or -1 if no tab is currently selected. The handling of invalid parameters is unspecified.- Parameters:
g- the graphics object to use for renderingtabPlacement- the placement for the tabs within the JTabbedPaneselectedIndex- the tab index of the selected componentc- the component
-
paintTabAreaBackground
-
paintTab
-
layoutLabel
-
paintIcon
-
paintText
protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, 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- Parameters:
g- the Graphics instancetabPlacement- the tab placementtabIndex- the tab indexx- xy- yw- widthh- heightisSelected- if the tab is selected
-
paintOffice2003TabBorder
protected void paintOffice2003TabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintExcelTabBorder
protected void paintExcelTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintWindowsTabBorder
protected void paintWindowsTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintTabBorderMouseOver
protected void paintTabBorderMouseOver(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintVsnetTabBorder
protected void paintVsnetTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintRoundedVsnetTabBorder
protected void paintRoundedVsnetTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintFlatTabBorder
protected void paintFlatTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintRoundedFlatTabBorder
protected void paintRoundedFlatTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintBoxTabBorder
protected void paintBoxTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintTabBackground
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintOffice2003TabBackground
protected void paintOffice2003TabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintExcelTabBackground
protected void paintExcelTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintDefaultTabBackground
protected void paintDefaultTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintTabBackgroundMouseOver
-
paintVsnetTabBackground
protected void paintVsnetTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintFlatTabBackground
protected void paintFlatTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintButtonTabBackground
protected void paintButtonTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) -
paintContentBorder
Paints the border of the conten pane which should reflect the tabs as well.- Parameters:
g- the Graphics instancetabPlacement- the tab placementselectedIndex- the selected tab index
-
paintContentBorderLeftEdge
protected void paintContentBorderLeftEdge(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) -
paintContentBorder
-
getBorderEdgeColor
-
paintContentBorderTopEdge
protected void paintContentBorderTopEdge(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) -
ensureCurrentLayout
protected void ensureCurrentLayout() -
getTabBounds
Returns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate space.- Specified by:
getTabBoundsin classTabbedPaneUI
-
getTabRunCount
- Specified by:
getTabRunCountin classTabbedPaneUI
-
tabForCoordinate
Returns the tab index which intersects the specified point in the JTabbedPane's coordinate space.- Specified by:
tabForCoordinatein classTabbedPaneUI
-
getTabBounds
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 validRectangleinstance. 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
-
getTabAtLocation
public int getTabAtLocation(int x, int y) Returns the tab index which intersects the specified point in the coordinate space of the component where the tabs are actually rendered, which could be the JTabbedPane (for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT).- Parameters:
x- x value of the pointy- y value of the point- Returns:
- the tab index in the point (x, y). -1 if no tab could be found.
-
isEmptyTabArea
public boolean isEmptyTabArea(int x, int y) Returns if the point resides in the empty tab area, which means it is in the tab area however no real tab contains that point.- Parameters:
x- x value of the pointy- y value of the point- Returns:
- true if the point is in empty tab area. Otherwise false.
-
getVisibleComponent
-
setVisibleComponent
-
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) -
getTextViewForTab
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
-
calculateTabHeight
-
calculateMaxTabHeight
protected int calculateMaxTabHeight(int tabPlacement) -
calculateTabWidth
-
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
-
getSelectedTabPadInsets
-
getTabAreaInsets
-
getContentBorderInsets
-
getFontMetrics
-
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) -
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) -
rotateInsets
-
requestFocusForVisibleComponent
public boolean requestFocusForVisibleComponent() -
createNoFocusButton
Deprecated.replaced byJideTabbedPane.createNoFocusButton(int)Creates a button.- Parameters:
type- the button type- Returns:
- the button
-
stopOrCancelEditing
protected void stopOrCancelEditing() -
ensureCurrentRects
protected void ensureCurrentRects(int leftMargin, int tabCount) -
getTabListCellRenderer
-
updateCloseAction
protected void updateCloseAction() -
getTabPanel
Description copied from class:JideTabbedPaneUIGets the tab panel for the JideTabbedPane. The tab panel contains all the tabs and the tabbed pane buttons (close, scroll left/right, list buttons). Sometimes you have to use this tab panel. For example, if you want to add a mouse listener to get double click event on tabs, you must use this tab panel to add mouse listener. In addition, as the tab panel is part of the TabbedPaneUI which is recreated when updateUI is called (which usually happens after switching Linvalid input: '&F'), you should override updateUI method in JideTabbedPane to add mouse listener so that it will get added again after updateUI.- Specified by:
getTabPanelin classJideTabbedPaneUI- Returns:
- the tab panel.
-
ensureActiveTabIsVisible
public void ensureActiveTabIsVisible(boolean scrollLeft) Description copied from class:JideTabbedPaneUIScroll the selected tab visible in case the tab is outside of the viewport. This method is called byJideTabbedPane.scrollSelectedTabToVisible(boolean)method.- Specified by:
ensureActiveTabIsVisiblein classJideTabbedPaneUI- Parameters:
scrollLeft- true to scroll the first tab visible first then scroll left to make the selected tab visible. This will get a more consistent result. If false, it will simple scroll the selected tab visible. Sometimes the tab will appear as the first visible tab or the last visible tab depending on the previous viewport position.
-
isShowCloseButtonOnTab
protected boolean isShowCloseButtonOnTab() -
isShowCloseButton
protected boolean isShowCloseButton() -
ensureCloseButtonCreated
public void ensureCloseButtonCreated() -
isShowTabButtons
protected boolean isShowTabButtons() -
isShrinkTabs
protected boolean isShrinkTabs() -
isTabEditing
public boolean isTabEditing()Description copied from class:JideTabbedPaneUIChecks if the tab is being edited.- Specified by:
isTabEditingin classJideTabbedPaneUI- Returns:
- true or false.
-
createDefaultTabEditor
-
stopTabEditing
public void stopTabEditing()Description copied from class:JideTabbedPaneUIStops the editing and commits the change.- Specified by:
stopTabEditingin classJideTabbedPaneUI
-
cancelTabEditing
public void cancelTabEditing()Description copied from class:JideTabbedPaneUICancels the editing and discards the change.- Specified by:
cancelTabEditingin classJideTabbedPaneUI
-
editTabAt
public boolean editTabAt(int tabIndex) Description copied from class:JideTabbedPaneUIEdits the tab at the index.- Specified by:
editTabAtin classJideTabbedPaneUI- Parameters:
tabIndex- the tab index.- Returns:
- true if editing started. Otherwise false if the tab is already in editing mode when this method is called.
-
getEditingTabIndex
public int getEditingTabIndex()Description copied from class:JideTabbedPaneUIGets the tab index that is editing, if any. -1 if no tab is being edited.- Specified by:
getEditingTabIndexin classJideTabbedPaneUI- Returns:
- the tab index or -1.
-
prepareEditor
-
getTabsTextBoundsAt
-
insertUpdate
- Specified by:
insertUpdatein interfaceDocumentListener
-
removeUpdate
- Specified by:
removeUpdatein interfaceDocumentListener
-
changedUpdate
- Specified by:
changedUpdatein interfaceDocumentListener
-
resizeEditor
protected void resizeEditor(int tabIndex) -
getCurrentDisplayTitleAt
-
startEditing
-
getPainter
-
getTabLabelShiftX
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) -
getTabLabelShiftY
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) -
paintFocusIndicator
-
isRoundedCorner
protected boolean isRoundedCorner() -
getTabShape
protected int getTabShape() -
getTabResizeMode
protected int getTabResizeMode() -
getColorTheme
protected int getColorTheme() -
getLeftMargin
protected int getLeftMargin() -
getTabGap
protected int getTabGap() -
getLayoutSize
protected int getLayoutSize() -
getTabRightPadding
protected int getTabRightPadding() -
createMouseListener
-
createMouseWheelListener
-
createMouseMotionListener
-
isTabLeadingComponentVisible
protected boolean isTabLeadingComponentVisible() -
isTabTrailingComponentVisible
protected boolean isTabTrailingComponentVisible() -
isTabTopVisible
protected boolean isTabTopVisible(int tabPlacement) -
showFocusIndicator
protected boolean showFocusIndicator() -
getResourceString
Gets the resource string used in JideTabbedPane. Subclass can override it to provide their own strings.- Parameters:
key- the resource key- Returns:
- the localized string.
-
JideTabbedPane.NoFocusButton