- java.lang.Object
- 
- javax.swing.plaf.ComponentUI
- 
- javax.swing.plaf.TabbedPaneUI
- 
- javax.swing.plaf.basic.BasicTabbedPaneUI
- 
- javax.swing.plaf.metal.MetalTabbedPaneUI
 
 
 
 
- 
- All Implemented Interfaces:
- SwingConstants
 
 public class MetalTabbedPaneUI extends BasicTabbedPaneUI The Metal subclass of BasicTabbedPaneUI.Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beanspackage. Please seeXMLEncoder.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classMetalTabbedPaneUI.TabbedPaneLayoutThis class should be treated as a "protected" inner class.- 
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicTabbedPaneUIBasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabSelectionHandler
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected intminTabWidthThe minimum width of a pane.protected ColorselectColorThe color of the selected pane.protected ColorselectHighlightThe color of the highlight.protected ColortabAreaBackgroundThe color of tab's background.- 
Fields declared in class javax.swing.plaf.basic.BasicTabbedPaneUIcalcRect, 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 declared in interface javax.swing.SwingConstantsBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
- 
 - 
Constructor SummaryConstructors Constructor Description MetalTabbedPaneUI()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentUIcreateUI(JComponent x)ConstructsMetalTabbedPaneUI.protected intgetBaselineOffset()Returns the amount the baseline is offset by.protected ColorgetColorForGap(int currentRun, int x, int y)Returns the color of the gap.protected intgetTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)Overridden to do nothing for the Java L&F.protected intgetTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)Overridden to do nothing for the Java L&F.protected voidpaintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the bottom tab border.protected voidpaintHighlightBelowTab()Paints highlights below tab.protected voidpaintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the left tab border.protected voidpaintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the right tab border.protected voidpaintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the top tab border.protected booleanshouldFillGap(int currentRun, int tabIndex, int x, int y)Returnstrueif the gap should be filled.protected booleanshouldRotateTabRuns(int tabPlacement, int selectedRun)Returnstrueif tab runs should be rotated.- 
Methods declared in class javax.swing.plaf.basic.BasicTabbedPaneUIassureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installListeners, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorder, paintContentBorderBottomEdge, paintContentBorderLeftEdge, paintContentBorderRightEdge, paintContentBorderTopEdge, paintFocusIndicator, paintIcon, paintTab, paintTabArea, paintTabBackground, paintTabBorder, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldPadTabRun, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
 - 
Methods declared in class javax.swing.plaf.TabbedPaneUIgetTabRunCount
 - 
Methods declared in class javax.swing.plaf.ComponentUIcontains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
- 
 
- 
- 
- 
Field Detail- 
minTabWidthprotected int minTabWidth The minimum width of a pane.
 - 
tabAreaBackgroundprotected Color tabAreaBackground The color of tab's background.
 - 
selectColorprotected Color selectColor The color of the selected pane.
 - 
selectHighlightprotected Color selectHighlight The color of the highlight.
 
- 
 - 
Method Detail- 
createUIpublic static ComponentUI createUI(JComponent x) ConstructsMetalTabbedPaneUI.- Parameters:
- x- a component
- Returns:
- an instance of MetalTabbedPaneUI
 
 - 
paintTopTabBorderprotected void paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the top tab border.- Parameters:
- tabIndex- a tab index
- g- an instance of- Graphics
- x- an X coordinate
- y- an Y coordinate
- w- a width
- h- a height
- btm- bottom
- rght- right
- isSelected- a selection
 
 - 
shouldFillGapprotected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y)Returnstrueif the gap should be filled.- Parameters:
- currentRun- the current run
- tabIndex- the tab index
- x- an X coordinate
- y- an Y coordinate
- Returns:
- trueif the gap should be filled
 
 - 
getColorForGapprotected Color getColorForGap(int currentRun, int x, int y) Returns the color of the gap.- Parameters:
- currentRun- the current run
- x- an X coordinate
- y- an Y coordinate
- Returns:
- the color of the gap
 
 - 
paintLeftTabBorderprotected void paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the left tab border.- Parameters:
- tabIndex- a tab index
- g- an instance of- Graphics
- x- an X coordinate
- y- an Y coordinate
- w- a width
- h- a height
- btm- bottom
- rght- right
- isSelected- a selection
 
 - 
paintBottomTabBorderprotected void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the bottom tab border.- Parameters:
- tabIndex- a tab index
- g- an instance of- Graphics
- x- an X coordinate
- y- an Y coordinate
- w- a width
- h- a height
- btm- bottom
- rght- right
- isSelected- a selection
 
 - 
paintRightTabBorderprotected void paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)Paints the right tab border.- Parameters:
- tabIndex- a tab index
- g- an instance of- Graphics
- x- an X coordinate
- y- an Y coordinate
- w- a width
- h- a height
- btm- bottom
- rght- right
- isSelected- a selection
 
 - 
getTabLabelShiftXprotected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)Overridden to do nothing for the Java L&F.- Overrides:
- getTabLabelShiftXin class- BasicTabbedPaneUI
- Parameters:
- tabPlacement- the tab placement
- tabIndex- the tab index
- isSelected- selection status
- Returns:
- the tab label shift x
 
 - 
getTabLabelShiftYprotected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)Overridden to do nothing for the Java L&F.- Overrides:
- getTabLabelShiftYin class- BasicTabbedPaneUI
- Parameters:
- tabPlacement- the tab placement
- tabIndex- the tab index
- isSelected- selection status
- Returns:
- the tab label shift y
 
 - 
getBaselineOffsetprotected int getBaselineOffset() Returns the amount the baseline is offset by. This is typically the same asgetTabLabelShiftY.- Overrides:
- getBaselineOffsetin class- BasicTabbedPaneUI
- Returns:
- amount to offset the baseline by
- Since:
- 1.6
 
 - 
paintHighlightBelowTabprotected void paintHighlightBelowTab() Paints highlights below tab.
 - 
shouldRotateTabRunsprotected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)Returnstrueif tab runs should be rotated.- Parameters:
- tabPlacement- a tab placement
- selectedRun- a selected run
- Returns:
- trueif tab runs should be rotated.
 
 
- 
 
-