模块 java.desktop

类 BasicTabbedPaneUI.TabbedPaneLayout

java.lang.Object
javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout
所有已实现的接口:
LayoutManager
已知子类:
MetalTabbedPaneUI.TabbedPaneLayout
封闭类:
BasicTabbedPaneUI

public class BasicTabbedPaneUI.TabbedPaneLayout extends Object implements LayoutManager
此类应被视为“受保护”的内部类。仅在 BasicTabbedPaneUI 的子类中对其进行实例化。
  • 构造方法详细信息

    • TabbedPaneLayout

      public TabbedPaneLayout()
      构造一个 TabbedPaneLayout
  • 方法详情

    • addLayoutComponent

      public void addLayoutComponent(String  name, Component  comp)
      从接口 LayoutManager 复制的描述
      如果布局管理器使用每个组件字符串,则将组件 comp 添加到布局中,将其与 name 指定的字符串相关联。
      指定者:
      addLayoutComponent 在接口 LayoutManager
      参数:
      name - 要与组件关联的字符串
      comp - 要添加的组件
    • removeLayoutComponent

      public void removeLayoutComponent(Component  comp)
      从接口 LayoutManager 复制的描述
      从布局中移除指定的组件。
      指定者:
      removeLayoutComponent 在接口 LayoutManager
      参数:
      comp - 要删除的组件
    • preferredLayoutSize

      public Dimension  preferredLayoutSize(Container  parent)
      从接口 LayoutManager 复制的描述
      给定容器包含的组件,计算指定容器的首选尺寸。
      指定者:
      preferredLayoutSize 在接口 LayoutManager
      参数:
      parent - 要布置的容器
      返回:
      容器的首选尺寸
      参见:
    • minimumLayoutSize

      public Dimension  minimumLayoutSize(Container  parent)
      从接口 LayoutManager 复制的描述
      给定容器包含的组件,计算指定容器的最小尺寸。
      指定者:
      minimumLayoutSize 在接口 LayoutManager
      参数:
      parent - 要布局的组件
      返回:
      容器的最小尺寸
      参见:
    • calculateSize

      protected Dimension  calculateSize(boolean minimum)
      返回计算的大小。
      参数:
      minimum - 使用最小尺寸或首选尺寸
      返回:
      计算出的尺寸
    • preferredTabAreaHeight

      protected int preferredTabAreaHeight(int tabPlacement, int width)
      返回首选的选项卡区域高度。
      参数:
      tabPlacement - 选项卡放置
      width - 宽度
      返回:
      首选标签区域高度
    • preferredTabAreaWidth

      protected int preferredTabAreaWidth(int tabPlacement, int height)
      返回首选的选项卡区域宽度。
      参数:
      tabPlacement - 选项卡放置
      height - 高度
      返回:
      首选标签区域宽度
    • layoutContainer

      public void layoutContainer(Container  parent)
      布置指定的容器。
      指定者:
      layoutContainer 在接口 LayoutManager
      参数:
      parent - 要布置的容器
    • calculateLayoutInfo

      public void calculateLayoutInfo()
      计算布局信息。
    • calculateTabRects

      protected void calculateTabRects(int tabPlacement, int tabCount)
      计算选项卡矩形。
      参数:
      tabPlacement - 选项卡放置
      tabCount - 选项卡计数
    • rotateTabRuns

      protected void rotateTabRuns(int tabPlacement, int selectedRun)
      旋转运行索引数组,以便选定的运行是运行 [0]。
      参数:
      tabPlacement - 选项卡放置
      selectedRun - 选定的运行
    • normalizeTabRuns

      protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max)
      标准化选项卡运行。
      参数:
      tabPlacement - 选项卡放置
      tabCount - 选项卡计数
      start - 开始
      max - 最大值
    • padTabRun

      protected void padTabRun(int tabPlacement, int start, int end, int max)
      填充选项卡运行。
      参数:
      tabPlacement - 选项卡放置
      start - 开始
      end - 结束
      max - 最大值
    • padSelectedTab

      protected void padSelectedTab(int tabPlacement, int selectedIndex)
      垫选择标签。
      参数:
      tabPlacement - 选项卡放置
      selectedIndex - 选定的索引