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 JavaBeans™ has been added to the java.beans
package. Please see XMLEncoder
.
Modifier and Type | Class and Description |
---|---|
class |
MetalTabbedPaneUI.TabbedPaneLayout This class should be treated as a "protected" inner class. |
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabSelectionHandler
protected int minTabWidth
protected Color tabAreaBackground
protected Color selectColor
protected Color selectHighlight
public MetalTabbedPaneUI()
public static ComponentUI createUI(JComponent x)
protected LayoutManager createLayoutManager()
Description copied from class: BasicTabbedPaneUI
Invoked by installUI
to create a layout manager object to manage the JTabbedPane
.
createLayoutManager
in class BasicTabbedPaneUI
BasicTabbedPaneUI.TabbedPaneLayout
, JTabbedPane.getTabLayoutPolicy()
protected void installDefaults()
installDefaults
in class BasicTabbedPaneUI
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
paintTabBorder
in class 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 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)
Description copied from class: ComponentUI
Notifies this UI delegate that it is time to paint the specified component. This method is invoked by 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 paintc
- the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
, JComponent.paintComponent(java.awt.Graphics)
protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
paintTabBackground
in class BasicTabbedPaneUI
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
Overridden to do nothing for the Java L&F.
getTabLabelShiftX
in class BasicTabbedPaneUI
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
Overridden to do nothing for the Java L&F.
getTabLabelShiftY
in class BasicTabbedPaneUI
protected int getBaselineOffset()
Returns the amount the baseline is offset by. This is typically the same as getTabLabelShiftY
.
getBaselineOffset
in class BasicTabbedPaneUI
public void paint(Graphics g, JComponent c)
Description copied from class: ComponentUI
Paints the specified component appropriately for the look and feel. This method is invoked from the 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 paintc
- the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void paintHighlightBelowTab()
protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
paintFocusIndicator
in class BasicTabbedPaneUI
protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderTopEdge
in class BasicTabbedPaneUI
protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderBottomEdge
in class BasicTabbedPaneUI
protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderLeftEdge
in class BasicTabbedPaneUI
protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
paintContentBorderRightEdge
in class BasicTabbedPaneUI
protected int calculateMaxTabHeight(int tabPlacement)
calculateMaxTabHeight
in class BasicTabbedPaneUI
protected int getTabRunOverlay(int tabPlacement)
getTabRunOverlay
in class BasicTabbedPaneUI
protected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)
protected boolean shouldPadTabRun(int tabPlacement, int run)
shouldPadTabRun
in class BasicTabbedPaneUI
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.