Package Summary  Overview Summary

class:MetalTabbedPaneUI [NONE]

  • 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 JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

field:minTabWidth [NONE]

  • minTabWidth

    protected int minTabWidth
    The minimum width of a pane.

field:tabAreaBackground [NONE]

  • tabAreaBackground

    protected Color tabAreaBackground
    The color of tab's background.

field:selectColor [NONE]

  • selectColor

    protected Color selectColor
    The color of the selected pane.

field:selectHighlight [NONE]

  • selectHighlight

    protected Color selectHighlight
    The color of the highlight.

constructor:<init>() [NONE]

  • MetalTabbedPaneUI

    public MetalTabbedPaneUI()

method:createUI(javax.swing.JComponent) [NONE]

  • createUI

    public static ComponentUI createUI​(JComponent x)
    Constructs MetalTabbedPaneUI.
    Parameters:
    x - a component
    Returns:
    an instance of MetalTabbedPaneUI

method:createLayoutManager() [NONE]

method:installDefaults() [NONE]

method:paintTabBorder(java.awt.Graphics,int,int,int,int,int,int,boolean) [NONE]

  • 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
    Parameters:
    g - the graphics context in which to paint
    tabPlacement - the placement (left, right, bottom, top) of the tab
    tabIndex - the index of the tab with respect to other tabs
    x - the x coordinate of tab
    y - the y coordinate of tab
    w - the width of the tab
    h - the height of the tab
    isSelected - a boolean which determines whether or not the tab is selected

method:paintTopTabBorder(int,java.awt.Graphics,int,int,int,int,int,int,boolean) [NONE]

  • paintTopTabBorder

    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.
    Parameters:
    tabIndex - a tab index
    g - an instance of Graphics
    x - an X coordinate
    y - an Y coordinate
    w - a width
    h - a height
    btm - bottom
    rght - right
    isSelected - a selection

method:shouldFillGap(int,int,int,int) [NONE]

  • shouldFillGap

    protected boolean shouldFillGap​(int currentRun,
                                    int tabIndex,
                                    int x,
                                    int y)
    Returns true if the gap should be filled.
    Parameters:
    currentRun - the current run
    tabIndex - the tab index
    x - an X coordinate
    y - an Y coordinate
    Returns:
    true if the gap should be filled

method:getColorForGap(int,int,int) [NONE]

  • getColorForGap

    protected Color getColorForGap​(int currentRun,
                                   int x,
                                   int y)
    Returns the color of the gap.
    Parameters:
    currentRun - the current run
    x - an X coordinate
    y - an Y coordinate
    Returns:
    the color of the gap

method:paintLeftTabBorder(int,java.awt.Graphics,int,int,int,int,int,int,boolean) [NONE]

  • paintLeftTabBorder

    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.
    Parameters:
    tabIndex - a tab index
    g - an instance of Graphics
    x - an X coordinate
    y - an Y coordinate
    w - a width
    h - a height
    btm - bottom
    rght - right
    isSelected - a selection

method:paintBottomTabBorder(int,java.awt.Graphics,int,int,int,int,int,int,boolean) [NONE]

  • paintBottomTabBorder

    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.
    Parameters:
    tabIndex - a tab index
    g - an instance of Graphics
    x - an X coordinate
    y - an Y coordinate
    w - a width
    h - a height
    btm - bottom
    rght - right
    isSelected - a selection

method:paintRightTabBorder(int,java.awt.Graphics,int,int,int,int,int,int,boolean) [NONE]

  • paintRightTabBorder

    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.
    Parameters:
    tabIndex - a tab index
    g - an instance of Graphics
    x - an X coordinate
    y - an Y coordinate
    w - a width
    h - a height
    btm - bottom
    rght - right
    isSelected - a selection

method:update(java.awt.Graphics,javax.swing.JComponent) [NONE]

  • update

    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.

    Overrides:
    update in class ComponentUI
    Parameters:
    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
    See Also:
    ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) , JComponent.paintComponent(java.awt.Graphics)

method:paintTabBackground(java.awt.Graphics,int,int,int,int,int,int,boolean) [NONE]

  • paintTabBackground

    protected void paintTabBackground​(Graphics g,
                                      int tabPlacement,
                                      int tabIndex,
                                      int x,
                                      int y,
                                      int w,
                                      int h,
                                      boolean isSelected)
    Description copied from class: BasicTabbedPaneUI
    Paints the tab background.
    Overrides:
    paintTabBackground in class BasicTabbedPaneUI
    Parameters:
    g - the graphics context in which to paint
    tabPlacement - the placement (left, right, bottom, top) of the tab
    tabIndex - the index of the tab with respect to other tabs
    x - the x coordinate of tab
    y - the y coordinate of tab
    w - the width of the tab
    h - the height of the tab
    isSelected - a boolean which determines whether or not the tab is selected

method:getTabLabelShiftX(int,int,boolean) [NONE]

  • 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 - the tab placement
    tabIndex - the tab index
    isSelected - selection status
    Returns:
    the tab label shift x

method:getTabLabelShiftY(int,int,boolean) [NONE]

  • 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 - the tab placement
    tabIndex - the tab index
    isSelected - selection status
    Returns:
    the tab label shift y

method:getBaselineOffset() [NONE]

  • getBaselineOffset

    protected int getBaselineOffset()
    Returns the amount the baseline is offset by. This is typically the same as getTabLabelShiftY.
    Overrides:
    getBaselineOffset in class BasicTabbedPaneUI
    Returns:
    amount to offset the baseline by
    Since:
    1.6

method:paint(java.awt.Graphics,javax.swing.JComponent) [NONE]

  • paint

    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.
    Overrides:
    paint in class BasicTabbedPaneUI
    Parameters:
    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
    See Also:
    ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

method:paintHighlightBelowTab() [NONE]

  • paintHighlightBelowTab

    protected void paintHighlightBelowTab()
    Paints highlights below tab.

method:paintFocusIndicator(java.awt.Graphics,int,java.awt.Rectangle[],int,java.awt.Rectangle,java.awt.Rectangle,boolean) [NONE]

  • paintFocusIndicator

    protected void paintFocusIndicator​(Graphics g,
                                       int tabPlacement,
                                       Rectangle[] rects,
                                       int tabIndex,
                                       Rectangle iconRect,
                                       Rectangle textRect,
                                       boolean isSelected)
    Description copied from class: BasicTabbedPaneUI
    Paints the focus indicator.
    Overrides:
    paintFocusIndicator in class BasicTabbedPaneUI
    Parameters:
    g - the graphics
    tabPlacement - the tab placement
    rects - rectangles
    tabIndex - the tab index
    iconRect - the icon rectangle
    textRect - the text rectangle
    isSelected - selection status

method:paintContentBorderTopEdge(java.awt.Graphics,int,int,int,int,int,int) [NONE]

  • paintContentBorderTopEdge

    protected void paintContentBorderTopEdge​(Graphics g,
                                             int tabPlacement,
                                             int selectedIndex,
                                             int x,
                                             int y,
                                             int w,
                                             int h)
    Description copied from class: BasicTabbedPaneUI
    Paints the content border top edge.
    Overrides:
    paintContentBorderTopEdge in class BasicTabbedPaneUI
    Parameters:
    g - the graphics context in which to paint
    tabPlacement - the placement (left, right, bottom, top) of the tab
    selectedIndex - the tab index of the selected component
    x - the x coordinate of tab
    y - the y coordinate of tab
    w - the width of the tab
    h - the height of the tab

method:paintContentBorderBottomEdge(java.awt.Graphics,int,int,int,int,int,int) [NONE]

  • paintContentBorderBottomEdge

    protected void paintContentBorderBottomEdge​(Graphics g,
                                                int tabPlacement,
                                                int selectedIndex,
                                                int x,
                                                int y,
                                                int w,
                                                int h)
    Description copied from class: BasicTabbedPaneUI
    Paints the content border bottom edge.
    Overrides:
    paintContentBorderBottomEdge in class BasicTabbedPaneUI
    Parameters:
    g - the graphics context in which to paint
    tabPlacement - the placement (left, right, bottom, top) of the tab
    selectedIndex - the tab index of the selected component
    x - the x coordinate of tab
    y - the y coordinate of tab
    w - the width of the tab
    h - the height of the tab

method:paintContentBorderLeftEdge(java.awt.Graphics,int,int,int,int,int,int) [NONE]

  • paintContentBorderLeftEdge

    protected void paintContentBorderLeftEdge​(Graphics g,
                                              int tabPlacement,
                                              int selectedIndex,
                                              int x,
                                              int y,
                                              int w,
                                              int h)
    Description copied from class: BasicTabbedPaneUI
    Paints the content border left edge.
    Overrides:
    paintContentBorderLeftEdge in class BasicTabbedPaneUI
    Parameters:
    g - the graphics context in which to paint
    tabPlacement - the placement (left, right, bottom, top) of the tab
    selectedIndex - the tab index of the selected component
    x - the x coordinate of tab
    y - the y coordinate of tab
    w - the width of the tab
    h - the height of the tab

method:paintContentBorderRightEdge(java.awt.Graphics,int,int,int,int,int,int) [NONE]

  • paintContentBorderRightEdge

    protected void paintContentBorderRightEdge​(Graphics g,
                                               int tabPlacement,
                                               int selectedIndex,
                                               int x,
                                               int y,
                                               int w,
                                               int h)
    Description copied from class: BasicTabbedPaneUI
    Paints the content border right edge.
    Overrides:
    paintContentBorderRightEdge in class BasicTabbedPaneUI
    Parameters:
    g - the graphics context in which to paint
    tabPlacement - the placement (left, right, bottom, top) of the tab
    selectedIndex - the tab index of the selected component
    x - the x coordinate of tab
    y - the y coordinate of tab
    w - the width of the tab
    h - the height of the tab

method:calculateMaxTabHeight(int) [NONE]

  • calculateMaxTabHeight

    protected int calculateMaxTabHeight​(int tabPlacement)
    Description copied from class: BasicTabbedPaneUI
    Calculates the maximum tab height.
    Overrides:
    calculateMaxTabHeight in class BasicTabbedPaneUI
    Parameters:
    tabPlacement - the placement (left, right, bottom, top) of the tab
    Returns:
    the maximum tab height

method:getTabRunOverlay(int) [NONE]

  • getTabRunOverlay

    protected int getTabRunOverlay​(int tabPlacement)
    Description copied from class: BasicTabbedPaneUI
    Returns the tab run overlay.
    Overrides:
    getTabRunOverlay in class BasicTabbedPaneUI
    Parameters:
    tabPlacement - the placement (left, right, bottom, top) of the tab
    Returns:
    the tab run overlay

method:shouldRotateTabRuns(int,int) [NONE]

  • shouldRotateTabRuns

    protected boolean shouldRotateTabRuns​(int tabPlacement,
                                          int selectedRun)
    Returns true if tab runs should be rotated.
    Parameters:
    tabPlacement - a tab placement
    selectedRun - a selected run
    Returns:
    true if tab runs should be rotated.

method:shouldPadTabRun(int,int) [NONE]

  • shouldPadTabRun

    protected boolean shouldPadTabRun​(int tabPlacement,
                                      int run)
    Description copied from class: BasicTabbedPaneUI
    Returns whether or not the tab run should be padded.
    Overrides:
    shouldPadTabRun in class BasicTabbedPaneUI
    Parameters:
    tabPlacement - the placement (left, right, bottom, top) of the tab
    run - the tab run
    Returns:
    whether or not the tab run should be padded

© 2019 Oracle Corporation and/or its affiliates