所有类


javax.swing.plaf.metal
类 MetalTabbedPaneUI

java.lang.Object
  继承者 javax.swing.plaf.ComponentUI
      继承者 javax.swing.plaf.TabbedPaneUI
          继承者 javax.swing.plaf.basic.BasicTabbedPaneUI
              继承者 javax.swing.plaf.metal.MetalTabbedPaneUI
所有已实现的接口:
SwingConstants

public class MetalTabbedPaneUI
   
   
   
   
extends BasicTabbedPaneUI

BasicTabbedPaneUI 的 Metal 子类。

警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder


嵌套类摘要
 class MetalTabbedPaneUI.TabbedPaneLayout
          此内部类由于编译器故障而被标记为 "public"。
 
从类 javax.swing.plaf.basic.BasicTabbedPaneUI 继承的嵌套类/接口
BasicTabbedPaneUI.FocusHandler, BasicTabbedPaneUI.MouseHandler, BasicTabbedPaneUI.PropertyChangeHandler, BasicTabbedPaneUI.TabSelectionHandler
 
字段摘要
protected  int minTabWidth
           
protected  Color selectColor
           
protected  Color selectHighlight
           
protected  Color tabAreaBackground
           
 
从类 javax.swing.plaf.basic.BasicTabbedPaneUI 继承的字段
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, upKey
 
从接口 javax.swing.SwingConstants 继承的字段
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
构造方法摘要
MetalTabbedPaneUI()
           
 
方法摘要
protected  int calculateMaxTabHeight(int tabPlacement)
           
protected  LayoutManager createLayoutManager()
          由 installUI 调用,用于创建布局管理器对象以管理 JTabbedPane
static ComponentUI createUI(JComponent x)
           
protected  Color getColorForGap(int currentRun, int x, int y)
           
protected  int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
          重写该方法,使其不对 Java L&F 进行任何操作。
protected  int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
          重写该方法,使其不对 Java L&F 进行任何操作。
protected  int getTabRunOverlay(int tabPlacement)
           
protected  void installDefaults()
           
 void paint(Graphics g, JComponent c)
          绘制指定组件,使其适合外观。
protected  void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected)
           
protected  void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
           
protected  void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void paintHighlightBelowTab()
           
protected  void paintLeftTabBorder(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)
           
protected  void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
           
protected  void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
          此方法围绕每个选项卡绘制边框。
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  boolean shouldPadTabRun(int tabPlacement, int run)
           
protected  boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)
           
 void update(Graphics g, JComponent c)
          通知此 UI 委托开始绘制指定的组件。
 
从类 javax.swing.plaf.basic.BasicTabbedPaneUI 继承的方法
assureRectsCreated, calculateMaxTabWidth, calculateTabAreaHeight, calculateTabAreaWidth, calculateTabHeight, calculateTabWidth, createChangeListener, createFocusListener, createMouseListener, createPropertyChangeListener, createScrollButton, expandTabRunsArray, 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, uninstallUI
 
从类 javax.swing.plaf.ComponentUI 继承的方法
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

minTabWidth

protected int minTabWidth

tabAreaBackground

protected Color tabAreaBackground

selectColor

protected Color selectColor

selectHighlight

protected Color selectHighlight
构造方法详细信息

MetalTabbedPaneUI

public MetalTabbedPaneUI()
方法详细信息

createUI

public static ComponentUI createUI(JComponent x)

createLayoutManager

protected LayoutManager createLayoutManager()
从类 BasicTabbedPaneUI 复制的描述
installUI 调用,用于创建布局管理器对象以管理 JTabbedPane

覆盖:
BasicTabbedPaneUI 中的 createLayoutManager
返回:
布局管理器对象
另请参见:
BasicTabbedPaneUI.TabbedPaneLayout, JTabbedPane.getTabLayoutPolicy()

installDefaults

protected void installDefaults()
覆盖:
BasicTabbedPaneUI 中的 installDefaults

paintTabBorder

protected void paintTabBorder(Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
从类 BasicTabbedPaneUI 复制的描述
此方法围绕每个选项卡绘制边框。注意,此方法现在已经能够绘制选项卡的背景,这在其他地方完成。

覆盖:
BasicTabbedPaneUI 中的 paintTabBorder

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部