javax.swing.plaf.metal
Class MetalTabbedPaneUI
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. A future release of Swing will provide support for
long term persistence.
Fields inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
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, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Method Summary |
protected int |
calculateMaxTabHeight(int tabPlacement)
|
protected LayoutManager |
createLayoutManager()
|
static ComponentUI |
createUI(JComponent x)
|
protected Color |
getColorForGap(int currentRun,
int x,
int y)
|
protected int |
getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
Overidden to do nothing for the Java L&F. |
protected int |
getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
Overidden to do nothing for the Java L&F. |
protected int |
getTabRunOverlay(int tabPlacement)
|
protected void |
installDefaults()
|
void |
paint(Graphics g,
JComponent c)
|
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)
|
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI |
assureRectsCreated, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createMouseListener, createPropertyChangeListener, expandTabRunsArray, getContentBorderInsets, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getPreferredSize, getPreviousTabIndex, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getVisibleComponent, installKeyboardActions, installListeners, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorder, paintIcon, paintTab, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectPreviousTab, setVisibleComponent, shouldRotateTabRuns, tabForCoordinate, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
minTabWidth
protected int minTabWidth
tabAreaBackground
protected Color tabAreaBackground
selectColor
protected Color selectColor
selectHighlight
protected Color selectHighlight
MetalTabbedPaneUI
public MetalTabbedPaneUI()
createUI
public static ComponentUI createUI(JComponent x)
createLayoutManager
protected LayoutManager createLayoutManager()
- Overrides:
createLayoutManager
in class BasicTabbedPaneUI
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in class BasicTabbedPaneUI
paintTabBorder
protected void paintTabBorder(Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
- Description copied from class:
BasicTabbedPaneUI
- this function draws the border around each tab
note that this function does now draw the background of the tab.
that is done elsewhere
- Overrides:
paintTabBorder
in class BasicTabbedPaneUI
paintTopTabBorder
protected void paintTopTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
shouldFillGap
protected boolean shouldFillGap(int currentRun,
int tabIndex,
int x,
int y)
getColorForGap
protected Color getColorForGap(int currentRun,
int x,
int y)
paintLeftTabBorder
protected void paintLeftTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
paintBottomTabBorder
protected void paintBottomTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
paintRightTabBorder
protected void paintRightTabBorder(int tabIndex,
Graphics g,
int x,
int y,
int w,
int h,
int btm,
int rght,
boolean isSelected)
update
public void update(Graphics g,
JComponent c)
- Overrides:
update
in class ComponentUI
paintTabBackground
protected void paintTabBackground(Graphics g,
int tabPlacement,
int tabIndex,
int x,
int y,
int w,
int h,
boolean isSelected)
- Overrides:
paintTabBackground
in class BasicTabbedPaneUI
getTabLabelShiftX
protected int getTabLabelShiftX(int tabPlacement,
int tabIndex,
boolean isSelected)
- Overidden to do nothing for the Java L&F.
- Overrides:
getTabLabelShiftX
in class BasicTabbedPaneUI
getTabLabelShiftY
protected int getTabLabelShiftY(int tabPlacement,
int tabIndex,
boolean isSelected)
- Overidden to do nothing for the Java L&F.
- Overrides:
getTabLabelShiftY
in class BasicTabbedPaneUI
paint
public void paint(Graphics g,
JComponent c)
- Overrides:
paint
in class BasicTabbedPaneUI
paintHighlightBelowTab
protected void paintHighlightBelowTab()
paintFocusIndicator
protected void paintFocusIndicator(Graphics g,
int tabPlacement,
Rectangle[] rects,
int tabIndex,
Rectangle iconRect,
Rectangle textRect,
boolean isSelected)
- Overrides:
paintFocusIndicator
in class BasicTabbedPaneUI
paintContentBorderTopEdge
protected void paintContentBorderTopEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
- Overrides:
paintContentBorderTopEdge
in class BasicTabbedPaneUI
paintContentBorderBottomEdge
protected void paintContentBorderBottomEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
- Overrides:
paintContentBorderBottomEdge
in class BasicTabbedPaneUI
paintContentBorderLeftEdge
protected void paintContentBorderLeftEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
- Overrides:
paintContentBorderLeftEdge
in class BasicTabbedPaneUI
paintContentBorderRightEdge
protected void paintContentBorderRightEdge(Graphics g,
int tabPlacement,
int selectedIndex,
int x,
int y,
int w,
int h)
- Overrides:
paintContentBorderRightEdge
in class BasicTabbedPaneUI
calculateMaxTabHeight
protected int calculateMaxTabHeight(int tabPlacement)
- Overrides:
calculateMaxTabHeight
in class BasicTabbedPaneUI
getTabRunOverlay
protected int getTabRunOverlay(int tabPlacement)
- Overrides:
getTabRunOverlay
in class BasicTabbedPaneUI
shouldRotateTabRuns
protected boolean shouldRotateTabRuns(int tabPlacement,
int selectedRun)
shouldPadTabRun
protected boolean shouldPadTabRun(int tabPlacement,
int run)
- Overrides:
shouldPadTabRun
in class BasicTabbedPaneUI
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.