public class MetalTabbedPaneUI extends 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.beans package. Please see XMLEncoder.
| Modifier and Type | Class and Description |
|---|---|
class |
MetalTabbedPaneUI
This class should be treated as a "protected" inner class.
|
BasicTabbedPaneUI.FocusHandler , BasicTabbedPaneUI.MouseHandler , BasicTabbedPaneUI.PropertyChangeHandler , BasicTabbedPaneUI.TabSelectionHandler | Modifier and Type | Field and Description |
|---|---|
protected int |
minTabWidth
|
protected Color |
selectColor
|
protected Color |
selectHighlight
|
protected Color |
tabAreaBackground
|
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, upKeyBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
MetalTabbedPaneUI()
|
| Modifier and Type | Method and Description |
|---|---|
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
|
protected int |
getBaselineOffset()
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 |
installDefaults()
|
void |
paint(Graphics
Paints the specified component appropriately for the look and feel.
|
protected void |
paintBottomTabBorder(int tabIndex, Graphics
|
protected void |
paintContentBorderBottomEdge(Graphics
|
protected void |
paintContentBorderLeftEdge(Graphics
|
protected void |
paintContentBorderRightEdge(Graphics
|
protected void |
paintContentBorderTopEdge(Graphics
|
protected void |
paintFocusIndicator(Graphics
|
protected void |
paintHighlightBelowTab()
|
protected void |
paintLeftTabBorder(int tabIndex, Graphics
|
protected void |
paintRightTabBorder(int tabIndex, Graphics
|
protected void |
paintTabBackground(Graphics
|
protected void |
paintTabBorder(Graphics
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
|
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
Notifies this UI delegate that it is time to paint the specified component.
|
assureRectsCreated, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createMouseListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, getBaseline, getBaseline, getBaselineResizeBehavior, getContentBorderInsets, getFocusIndex, getFontMetrics, getIconForTab, getMaximumSize, getMinimumSize, getNextTabIndex, getNextTabIndexInRun, getNextTabRun, getPreviousTabIndex, getPreviousTabIndexInRun, getPreviousTabRun, getRolloverTab, getRunForTab, getSelectedTabPadInsets, getTabAreaInsets, getTabBounds, getTabBounds, getTabInsets, getTabRunCount, getTabRunIndent, getTabRunOffset, getTextViewForTab, getVisibleComponent, installComponents, installKeyboardActions, installListeners, installUI, lastTabInRun, layoutLabel, navigateSelectedTab, paintContentBorder, paintIcon, paintTab, paintTabArea, paintText, rotateInsets, selectAdjacentRunTab, selectNextTab, selectNextTabInRun, selectPreviousTab, selectPreviousTabInRun, setRolloverTab, setVisibleComponent, shouldRotateTabRuns, tabForCoordinate, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSizeprotected int minTabWidth
protected ColortabAreaBackground
protected ColorselectColor
protected ColorselectHighlight
public static ComponentUIcreateUI(JComponent x)
protected LayoutManagercreateLayoutManager()
BasicTabbedPaneUI
installUI to create a layout manager object to manage the
JTabbedPane.
createLayoutManager in class
BasicTabbedPaneUI
BasicTabbedPaneUI.TabbedPaneLayout,
JTabbedPane.getTabLayoutPolicy()
protected void installDefaults()
protected void paintTabBorder(Graphicsg, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
BasicTabbedPaneUI
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 ColorgetColorForGap(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(Graphicsg, JComponent c)
ComponentUI
JComponent when the specified component is being painted.
By default this method fills the specified component with its background color if its opaque property is true, and then immediately calls paint. In general this method need not be overridden by subclasses; all look-and-feel rendering code should reside in the paint method.
update in class
ComponentUI
g - the
Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) ,
JComponent.paintComponent(java.awt.Graphics)
protected void paintTabBackground(Graphicsg, 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()
getTabLabelShiftY.
getBaselineOffset in class
BasicTabbedPaneUI
public void paint(Graphicsg, JComponent c)
ComponentUI
ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified
Graphics object to render the content of the component.
paint in class
BasicTabbedPaneUI
g - the
Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void paintHighlightBelowTab()
protected void paintFocusIndicator(Graphicsg, int tabPlacement, Rectangle [] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
protected void paintContentBorderTopEdge(Graphicsg, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void paintContentBorderBottomEdge(Graphicsg, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void paintContentBorderLeftEdge(Graphicsg, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
protected void paintContentBorderRightEdge(Graphicsg, 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)