This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.metal
class MetalTabbedPaneUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.TabbedPaneUI extended by javax.swing.plaf.basic.BasicTabbedPaneUI extended by 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 JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.


Nested Class Summary
 class

           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.TabbedPaneLayout, 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
 
Constructor Summary

          
 
Method Summary
protected int
calculateMaxTabHeight(int tabPlacement)

          
protected LayoutManager

          Invoked by installUI to create a layout manager object to manage the JTabbedPane.
static ComponentUI

          
protected int

          Returns the amount the baseline is offset by.
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

          
 void

          
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

          
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

          Notifies this UI delegate that it's time to paint the specified component.
 
Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI
assureRectsCreated, calculateMaxTabHeight, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createLayoutManager, createMouseListener, createPropertyChangeListener, createScrollButton, createUI, expandTabRunsArray, getBaseline, getBaseline, getBaselineOffset, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabLabelShiftX, getTabLabelShiftY, getTabRunCount, getTabRunIndent, getTabRunOffset, getTabRunOverlay, getTextViewForTab, getVisibleComponent, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paint, 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, uninstallUI
 
Methods inherited from class javax.swing.plaf.TabbedPaneUI
getTabBounds, getTabRunCount, tabForCoordinate
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minTabWidth

protected int minTabWidth

selectColor

protected Color selectColor

selectHighlight

protected Color selectHighlight

tabAreaBackground

protected Color tabAreaBackground
Constructor Detail

MetalTabbedPaneUI

public MetalTabbedPaneUI()
Method Detail

calculateMaxTabHeight

protected int calculateMaxTabHeight(int tabPlacement)
Overrides:
calculateMaxTabHeight in class BasicTabbedPaneUI
Parameters:
tabPlacement

createLayoutManager

protected LayoutManager createLayoutManager()
Overrides:
createLayoutManager in class BasicTabbedPaneUI

createUI

public static ComponentUI createUI(JComponent x)
Parameters:
x

getBaselineOffset

protected int getBaselineOffset()
{@inheritDoc}

Overrides:
getBaselineOffset in class BasicTabbedPaneUI

getColorForGap

protected Color getColorForGap(int currentRun,
                               int x,
                               int y)
Parameters:
currentRun
x
y

getTabLabelShiftX

protected int getTabLabelShiftX(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)
Overridden to do nothing for the Java L&F.

Overrides:
getTabLabelShiftX in class BasicTabbedPaneUI
Parameters:
tabPlacement
tabIndex
isSelected

getTabLabelShiftY

protected int getTabLabelShiftY(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)
Overridden to do nothing for the Java L&F.

Overrides:
getTabLabelShiftY in class BasicTabbedPaneUI
Parameters:
tabPlacement
tabIndex
isSelected

getTabRunOverlay

protected int getTabRunOverlay(int tabPlacement)
Overrides:
getTabRunOverlay in class BasicTabbedPaneUI
Parameters:
tabPlacement

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class BasicTabbedPaneUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicTabbedPaneUI
Parameters:
g
c

paintBottomTabBorder

protected void paintBottomTabBorder(int tabIndex,
                                    Graphics g,
                                    int x,
                                    int y,
                                    int w,
                                    int h,
                                    int btm,
                                    int rght,
                                    boolean isSelected)
Parameters:
tabIndex
g
x
y
w
h
btm
rght
isSelected

paintContentBorderBottomEdge

protected void paintContentBorderBottomEdge(Graphics g,
                                            int tabPlacement,
                                            int selectedIndex,
                                            int x,
                                            int y,
                                            int w,
                                            int h)
Overrides:
paintContentBorderBottomEdge in class BasicTabbedPaneUI
Parameters:
g
tabPlacement
selectedIndex
x
y
w
h

paintContentBorderLeftEdge

protected void paintContentBorderLeftEdge(Graphics g,
                                          int tabPlacement,
                                          int selectedIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h)
Overrides:
paintContentBorderLeftEdge in class BasicTabbedPaneUI
Parameters:
g
tabPlacement
selectedIndex
x
y
w
h

paintContentBorderRightEdge

protected void paintContentBorderRightEdge(Graphics g,
                                           int tabPlacement,
                                           int selectedIndex,
                                           int x,
                                           int y,
                                           int w,
                                           int h)
Overrides:
paintContentBorderRightEdge in class BasicTabbedPaneUI
Parameters:
g
tabPlacement
selectedIndex
x
y
w
h

paintContentBorderTopEdge

protected void paintContentBorderTopEdge(Graphics g,
                                         int tabPlacement,
                                         int selectedIndex,
                                         int x,
                                         int y,
                                         int w,
                                         int h)
Overrides:
paintContentBorderTopEdge in class BasicTabbedPaneUI
Parameters:
g
tabPlacement
selectedIndex
x
y
w
h

paintFocusIndicator

protected void paintFocusIndicator(Graphics g,
                                   int tabPlacement,
                                   Rectangle[] rects,
                                   int tabIndex,
                                   Rectangle iconRect,
                                   Rectangle textRect,
                                   boolean isSelected)
Overrides:
paintFocusIndicator in class BasicTabbedPaneUI
Parameters:
g
tabPlacement
rects
tabIndex
iconRect
textRect
isSelected

paintHighlightBelowTab

protected void paintHighlightBelowTab()

paintLeftTabBorder

protected void paintLeftTabBorder(int tabIndex,
                                  Graphics g,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  int btm,
                                  int rght,
                                  boolean isSelected)
Parameters:
tabIndex
g
x
y
w
h
btm
rght
isSelected

paintRightTabBorder

protected void paintRightTabBorder(int tabIndex,
                                   Graphics g,
                                   int x,
                                   int y,
                                   int w,
                                   int h,
                                   int btm,
                                   int rght,
                                   boolean isSelected)
Parameters:
tabIndex
g
x
y
w
h
btm
rght
isSelected

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
Parameters:
g
tabPlacement
tabIndex
x
y
w
h
isSelected

paintTabBorder

protected void paintTabBorder(Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
Overrides:
paintTabBorder in class BasicTabbedPaneUI
Parameters:
g
tabPlacement
tabIndex
x
y
w
h
isSelected

paintTopTabBorder

protected void paintTopTabBorder(int tabIndex,
                                 Graphics g,
                                 int x,
                                 int y,
                                 int w,
                                 int h,
                                 int btm,
                                 int rght,
                                 boolean isSelected)
Parameters:
tabIndex
g
x
y
w
h
btm
rght
isSelected

shouldFillGap

protected boolean shouldFillGap(int currentRun,
                                int tabIndex,
                                int x,
                                int y)
Parameters:
currentRun
tabIndex
x
y

shouldPadTabRun

protected boolean shouldPadTabRun(int tabPlacement,
                                  int run)
Overrides:
shouldPadTabRun in class BasicTabbedPaneUI
Parameters:
tabPlacement
run

shouldRotateTabRuns

protected boolean shouldRotateTabRuns(int tabPlacement,
                                      int selectedRun)
Parameters:
tabPlacement
selectedRun

update

public void update(Graphics g,
                   JComponent c)
Overrides:
update in class ComponentUI
Parameters:
g
c


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.