|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
上一個類別 下一個類別 | 框架 無框架 | |||||||||
摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.TabbedPaneUI javax.swing.plaf.basic.BasicTabbedPaneUI javax.swing.plaf.metal.MetalTabbedPaneUI
public class MetalTabbedPaneUI
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 int |
getBaselineOffset()
返回基線偏移的距離。 |
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.ComponentUI 繼承的方法 |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize |
從類別 java.lang.Object 繼承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
欄位詳細資訊 |
---|
protected int minTabWidth
protected Color tabAreaBackground
protected Color selectColor
protected Color selectHighlight
建構子詳細資訊 |
---|
public MetalTabbedPaneUI()
方法詳細資訊 |
---|
public static ComponentUI createUI(JComponent x)
protected LayoutManager createLayoutManager()
BasicTabbedPaneUI
複製的描述installUI
調用,用於創建佈局管理器物件以管理 JTabbedPane
。
BasicTabbedPaneUI
中的 createLayoutManager
BasicTabbedPaneUI.TabbedPaneLayout
,
JTabbedPane.getTabLayoutPolicy()
protected void installDefaults()
BasicTabbedPaneUI
中的 installDefaults
protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected)
BasicTabbedPaneUI
複製的描述
BasicTabbedPaneUI
中的 paintTabBorder
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)
ComponentUI
複製的描述JComponent
調用此方法。預設情況下,此方法將使用其背景色填充指定元件(如果其 opaque
屬性為 true
),然後立刻調用 paint
。通常無需由子類別覆寫此方法;所有呈現程式碼的外觀都應位於 paint
方法中。
ComponentUI
中的 update
g
- 將在其中進行繪製的 Graphics
上下文c
- 將繪製的元件;此參數常被忽略,但如果 UI 物件是無狀態的並由多個元件共享,則可以使用該參數ComponentUI.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)
BasicTabbedPaneUI
中的 paintTabBackground
protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
BasicTabbedPaneUI
中的 getTabLabelShiftX
protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
BasicTabbedPaneUI
中的 getTabLabelShiftY
protected int getBaselineOffset()
getTabLabelShiftY
相同。
BasicTabbedPaneUI
中的 getBaselineOffset
public void paint(Graphics g, JComponent c)
ComponentUI
複製的描述ComponentUI.update
方法中調用此方法。子類別應該覆寫此方法並使用指定 Graphics
物件來呈現元件的內容。
BasicTabbedPaneUI
中的 paint
g
- 將在其中進行繪製的 Graphics
上下文c
- 將繪製的元件;此參數常被忽略,但如果 UI 物件是無狀態的並由多個元件共享,則可以使用該參數ComponentUI.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)
BasicTabbedPaneUI
中的 paintFocusIndicator
protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
BasicTabbedPaneUI
中的 paintContentBorderTopEdge
protected void paintContentBorderBottomEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
BasicTabbedPaneUI
中的 paintContentBorderBottomEdge
protected void paintContentBorderLeftEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
BasicTabbedPaneUI
中的 paintContentBorderLeftEdge
protected void paintContentBorderRightEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h)
BasicTabbedPaneUI
中的 paintContentBorderRightEdge
protected int calculateMaxTabHeight(int tabPlacement)
BasicTabbedPaneUI
中的 calculateMaxTabHeight
protected int getTabRunOverlay(int tabPlacement)
BasicTabbedPaneUI
中的 getTabRunOverlay
protected boolean shouldRotateTabRuns(int tabPlacement, int selectedRun)
protected boolean shouldPadTabRun(int tabPlacement, int run)
BasicTabbedPaneUI
中的 shouldPadTabRun
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
上一個類別 下一個類別 | 框架 無框架 | |||||||||
摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 |
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。