java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.TabbedPaneUI javax.swing.plaf.basic.BasicTabbedPaneUI javax.swing.plaf.metal.MetalTabbedPaneUI
public class MetalTabbedPaneUI
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 TM has been added to the java.beans package. Please see XMLEncoder .
Nested Class Summary | |
---|---|
class |
MetalTabbedPaneUI.TabbedPaneLayout
This inner class is marked "public" due to a compiler bug. |
Nested classes/interfaces inherited from class javax.swing.plaf.basic. BasicTabbedPaneUI |
---|
BasicTabbedPaneUI.FocusHandler , BasicTabbedPaneUI.MouseHandler , BasicTabbedPaneUI.PropertyChangeHandler , BasicTabbedPaneUI.TabSelectionHandler |
Field Summary | |
---|---|
protected int |
minTabWidth
|
protected Color |
selectColor
|
protected Color |
selectHighlight
|
protected Color |
tabAreaBackground
|
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 | |
---|---|
MetalTabbedPaneUI
() |
Method Summary | |
---|---|
protected int |
calculateMaxTabHeight
(int tabPlacement) |
protected LayoutManager |
createLayoutManager
() Invoked by installUI to create a layout manager object to manage the JTabbedPane. |
static ComponentUI |
createUI
(
JComponent
x) |
protected int |
getBaselineOffset
()
|
protected Color |
getColorForGap
(int currentRun, int x, int y) |
protected int |
getTabLabelShiftX
(int tabPlacement, int tabIndex, boolean isSelected) Overridden to do nothing for the Java L&F. |
protected int |
getTabLabelShiftY
(int tabPlacement, int tabIndex, boolean isSelected) Overridden to do nothing for the Java L&F. |
protected int |
getTabRunOverlay
(int tabPlacement) |
protected void |
installDefaults
() |
void |
paint
(
Graphics
g,
JComponent
c) Paints the specified component appropriate for the look and feel. |
protected void |
paintBottomTabBorder
(int tabIndex,
Graphics
g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) |
protected void |
paintContentBorderBottomEdge
(
Graphics
g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintContentBorderLeftEdge
(
Graphics
g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintContentBorderRightEdge
(
Graphics
g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintContentBorderTopEdge
(
Graphics
g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) |
protected void |
paintFocusIndicator
(
Graphics
g, int tabPlacement,
Rectangle
[] rects, int tabIndex,
Rectangle
iconRect,
Rectangle
textRect, boolean isSelected) |
protected void |
paintHighlightBelowTab
() |
protected void |
paintLeftTabBorder
(int tabIndex,
Graphics
g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) |
protected void |
paintRightTabBorder
(int tabIndex,
Graphics
g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) |
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) this function draws the border around each tab note that this function does now draw the background of the tab. |
protected void |
paintTopTabBorder
(int tabIndex,
Graphics
g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) |
protected boolean |
shouldFillGap
(int currentRun, int tabIndex, int x, int y) |
protected boolean |
shouldPadTabRun
(int tabPlacement, int run) |
protected boolean |
shouldRotateTabRuns
(int tabPlacement, int selectedRun) |
void |
update
(
Graphics
g,
JComponent
c) Notifies this UI delegate that it's time to paint the specified component. |
Methods inherited from class javax.swing.plaf. ComponentUI |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , getPreferredSize |
Methods inherited from class java.lang. Object |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Field Detail |
---|
protected int minTabWidth
protected Color tabAreaBackground
protected Color selectColor
protected Color selectHighlight
Constructor Detail |
---|
public MetalTabbedPaneUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent x)
protected LayoutManager createLayoutManager()
protected void installDefaults()
protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected void paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y)
protected Color getColorForGap(int currentRun, int x, int y)
protected void paintLeftTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
protected void paintRightTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
public void update(Graphics g, JComponent c)
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
protected int getBaselineOffset ()
public void paint(Graphics g, JComponent c)
protected void paintHighlightBelowTab()
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected int calculateMaxTabHeight(int tabPlacement)
protected int getTabRunOverlay(int tabPlacement)
protected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)
protected boolean shouldPadTabRun(int tabPlacement, int run)