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 java..
| Modifier and Type | Class and Description |
|---|---|
| public class | MetalTabbedPaneUI.
This class should be treated as a "protected" inner class. |
| Modifier and Type | Field and Description |
|---|---|
| protected int | minTabWidth
The minimum width of a pane. |
| private boolean | |
| private Color | |
| protected Color | selectColor
The color of the selected pane. |
| protected Color | selectHighlight
The color of the highlight. |
| protected Color | tabAreaBackground
The color of tab's background. |
| private boolean | |
| private Color |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | calculateMaxTabHeight(int tabPlacement)
Overrides javax. Calculates the maximum tab height. |
| protected LayoutManager | createLayoutManager()
Overrides javax. Invoked by |
| public static ComponentUI | Returns: an instance ofMetalTabbedPaneUIa component x)Hides javax. Constructs |
| protected int | getBaselineOffset()
Overrides javax. Returns the amount the baseline is offset by. |
| protected Color | Returns: the color of the gapthe current run currentRun, int an X coordinate x, int an Y coordinate y)Returns the color of the gap. |
| pack-priv int | |
| protected int | getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
Overrides javax. Overridden to do nothing for the Java L&F. |
| protected int | getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
Overrides javax. Overridden to do nothing for the Java L&F. |
| protected int | getTabRunOverlay(int tabPlacement)
Overrides javax. Returns the tab run overlay. |
| private Color | |
| protected void | installDefaults()
Overrides javax. Installs the defaults. |
| private boolean | |
| public void | paint(Graphics g, JComponent c)
Overrides javax. Paints the specified component appropriately for the look and feel. |
| protected void | paintBottomTabBorder(int
a tab index tabIndex, Graphics an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, int bottom btm, int right rght, boolean a selection isSelected)Paints the bottom tab border. |
| protected void | paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Overrides javax. Paints the content border bottom edge. |
| protected void | paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Overrides javax. Paints the content border left edge. |
| protected void | paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Overrides javax. Paints the content border right edge. |
| protected void | paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
Overrides javax. Paints the content border top edge. |
| protected void | paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
Overrides javax. Paints the focus indicator. |
| protected void | |
| protected void | paintLeftTabBorder(int
a tab index tabIndex, Graphics an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, int bottom btm, int right rght, boolean a selection isSelected)Paints the left tab border. |
| protected void | paintRightTabBorder(int
a tab index tabIndex, Graphics an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, int bottom btm, int right rght, boolean a selection isSelected)Paints the right tab border. |
| protected void | paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
Overrides javax. Paints the tab background. |
| protected void | paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
Overrides javax. Paints the border around a tab. |
| protected void | paintTopTabBorder(int
a tab index tabIndex, Graphics an instance of g, int Graphicsan X coordinate x, int an Y coordinate y, int a width w, int a height h, int bottom btm, int right rght, boolean a selection isSelected)Paints the top tab border. |
| protected boolean | Returns: true if the gap should be filledthe current run currentRun, int the tab index tabIndex, int an X coordinate x, int an Y coordinate y)Returns |
| protected boolean | shouldPadTabRun(int tabPlacement, int run)
Overrides javax. Returns whether or not the tab run should be padded. |
| protected boolean | Returns: true if tab runs should be rotated.a tab placement tabPlacement, int a selected run selectedRun)Returns |
| public void | update(Graphics g, JComponent c)
Overrides javax. Notifies this UI delegate that it is time to paint the specified component. |
| minTabWidth | back to summary |
|---|---|
| protected int minTabWidth The minimum width of a pane. | |
| ocean | back to summary |
|---|---|
| private boolean ocean | |
| oceanSelectedBorderColor | back to summary |
|---|---|
| private Color oceanSelectedBorderColor | |
| selectColor | back to summary |
|---|---|
| protected Color selectColor The color of the selected pane. | |
| selectHighlight | back to summary |
|---|---|
| protected Color selectHighlight The color of the highlight. | |
| tabAreaBackground | back to summary |
|---|---|
| protected Color tabAreaBackground The color of tab's background. | |
| tabsOpaque | back to summary |
|---|---|
| private boolean tabsOpaque | |
| unselectedBackground | back to summary |
|---|---|
| private Color unselectedBackground | |
| MetalTabbedPaneUI | back to summary |
|---|---|
| public MetalTabbedPaneUI() Constructs a | |
| calculateMaxTabHeight | back to summary |
|---|---|
| protected int calculateMaxTabHeight(int tabPlacement) Overrides javax. Doc from javax. Calculates the maximum tab height. | |
| createLayoutManager | back to summary |
|---|---|
| protected LayoutManager createLayoutManager() Overrides javax. Doc from javax. Invoked by | |
| createUI | back to summary |
|---|---|
| public static ComponentUI createUI(JComponent x) Hides javax. Constructs
| |
| getBaselineOffset | back to summary |
|---|---|
| protected int getBaselineOffset() Overrides javax. Doc from javax. Returns the amount the baseline is offset by. This is typically
the same as
| |
| getColorForGap | back to summary |
|---|---|
| protected Color getColorForGap(int currentRun, int x, int y) Returns the color of the gap.
| |
| getRolloverTabIndex | back to summary |
|---|---|
| pack-priv int getRolloverTabIndex() Returns the tab index of JTabbedPane the mouse is currently over | |
| getTabLabelShiftX | back to summary |
|---|---|
| protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) Overrides javax. Overridden to do nothing for the Java L&F. | |
| getTabLabelShiftY | back to summary |
|---|---|
| protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) Overrides javax. Overridden to do nothing for the Java L&F. | |
| getTabRunOverlay | back to summary |
|---|---|
| protected int getTabRunOverlay(int tabPlacement) Overrides javax. Doc from javax. Returns the tab run overlay. | |
| getUnselectedBackgroundAt | back to summary |
|---|---|
| private Color getUnselectedBackgroundAt(int index) Returns the color to use for the specified tab. | |
| installDefaults | back to summary |
|---|---|
| protected void installDefaults() Overrides javax. Doc from javax. Installs the defaults. | |
| isLastInRun | back to summary |
|---|---|
| private boolean isLastInRun(int tabIndex) | |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, JComponent c) Overrides javax. Doc from javax. Paints the specified component appropriately for the look and feel.
This method is invoked from the | |
| paintBottomTabBorder | back to summary |
|---|---|
| protected 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.
| |
| paintContentBorderBottomEdge | back to summary |
|---|---|
| protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) Overrides javax. Doc from javax. Paints the content border bottom edge. | |
| paintContentBorderLeftEdge | back to summary |
|---|---|
| protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) Overrides javax. Doc from javax. Paints the content border left edge. | |
| paintContentBorderRightEdge | back to summary |
|---|---|
| protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) Overrides javax. Doc from javax. Paints the content border right edge. | |
| paintContentBorderTopEdge | back to summary |
|---|---|
| protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) Overrides javax. Doc from javax. Paints the content border top edge. | |
| paintFocusIndicator | back to summary |
|---|---|
| protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) Overrides javax. Doc from javax. Paints the focus indicator. | |
| paintHighlightBelowTab | back to summary |
|---|---|
| protected void paintHighlightBelowTab() Paints highlights below tab. | |
| paintLeftTabBorder | back to summary |
|---|---|
| protected 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.
| |
| paintRightTabBorder | back to summary |
|---|---|
| protected 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.
| |
| paintTabBackground | back to summary |
|---|---|
| protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) Overrides javax. Doc from javax. Paints the tab background. | |
| paintTabBorder | back to summary |
|---|---|
| protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) Overrides javax. Doc from javax. Paints the border around a tab. Note that this function does not paint the background of the tab, that is done elsewhere. | |
| paintTopTabBorder | back to summary |
|---|---|
| protected 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.
| |
| shouldFillGap | back to summary |
|---|---|
| protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y) Returns
| |
| shouldPadTabRun | back to summary |
|---|---|
| protected boolean shouldPadTabRun(int tabPlacement, int run) Overrides javax. Doc from javax. Returns whether or not the tab run should be padded. | |
| shouldRotateTabRuns | back to summary |
|---|---|
| protected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun) Returns
| |
| update | back to summary |
|---|---|
| public void update(Graphics g, JComponent c) Overrides javax. Doc from javax. Notifies this UI delegate that it is time to paint the specified
component. This method is invoked by By default this method fills the specified component with
its background color if its | |
MetalTabbedPaneUI.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | normalizeTabRuns(int tabPlacement, int tabCount, int start, int max)
Overrides javax. Normalizes the tab runs. |
| protected void | padSelectedTab(int tabPlacement, int selectedIndex)
Overrides javax. Pads selected tab. |
| protected void | rotateTabRuns(int tabPlacement, int selectedRun)
Overrides javax. Rotates the run-index array so that the selected run is run[0]. |
| TabbedPaneLayout | back to summary |
|---|---|
| public TabbedPaneLayout() Constructs | |
| normalizeTabRuns | back to summary |
|---|---|
| protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max) Overrides javax. Doc from javax. Normalizes the tab runs. | |
| padSelectedTab | back to summary |
|---|---|
| protected void padSelectedTab(int tabPlacement, int selectedIndex) Overrides javax. Doc from javax. Pads selected tab. | |
| rotateTabRuns | back to summary |
|---|---|
| protected void rotateTabRuns(int tabPlacement, int selectedRun) Overrides javax. Doc from javax. Rotates the run-index array so that the selected run is run[0]. | |