JavaTM Platform
Standard Ed. 6

javax.swing.plaf.basic
クラス BasicTabbedPaneUI

java.lang.Object
  上位を拡張 javax.swing.plaf.ComponentUI
      上位を拡張 javax.swing.plaf.TabbedPaneUI
          上位を拡張 javax.swing.plaf.basic.BasicTabbedPaneUI
すべての実装されたインタフェース:
SwingConstants
直系の既知のサブクラス:
MetalTabbedPaneUI

public class BasicTabbedPaneUI
extends TabbedPaneUI
implements SwingConstants

TabbedPaneUI の基本 Look & Feel による実装です。


入れ子のクラスの概要
 class BasicTabbedPaneUI.FocusHandler
          このクラスは、「protected」内部クラスとして扱うことをお勧めします。
 class BasicTabbedPaneUI.MouseHandler
          このクラスは、「protected」内部クラスとして扱うことをお勧めします。
 class BasicTabbedPaneUI.PropertyChangeHandler
          このクラスは、「protected」内部クラスとして扱うことをお勧めします。
 class BasicTabbedPaneUI.TabbedPaneLayout
          このクラスは、「protected」内部クラスとして扱うことをお勧めします。
 class BasicTabbedPaneUI.TabSelectionHandler
          このクラスは、「protected」内部クラスとして扱うことをお勧めします。
 
フィールドの概要
protected  Rectangle calcRect
          実行中に多くの新規 Rectangle が構築されるのを防ぐため、一般のレイアウト計算に使用される矩形です。
protected  Insets contentBorderInsets
           
protected  Color darkShadow
           
protected  KeyStroke downKey
          推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
protected  Color focus
           
protected  FocusListener focusListener
           
protected  Color highlight
           
protected  KeyStroke leftKey
          推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
protected  Color lightHighlight
           
protected  int maxTabHeight
           
protected  int maxTabWidth
           
protected  MouseListener mouseListener
           
protected  PropertyChangeListener propertyChangeListener
           
protected  Rectangle[] rects
           
protected  KeyStroke rightKey
          推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
protected  int runCount
           
protected  int selectedRun
           
protected  Insets selectedTabPadInsets
           
protected  Color shadow
           
protected  Insets tabAreaInsets
           
protected  ChangeListener tabChangeListener
           
protected  Insets tabInsets
           
protected  JTabbedPane tabPane
           
protected  int tabRunOverlay
           
protected  int[] tabRuns
           
protected  int textIconGap
           
protected  KeyStroke upKey
          推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
 
インタフェース 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
 
コンストラクタの概要
BasicTabbedPaneUI()
           
 
メソッドの概要
protected  void assureRectsCreated(int tabCount)
           
protected  int calculateMaxTabHeight(int tabPlacement)
           
protected  int calculateMaxTabWidth(int tabPlacement)
           
protected  int calculateTabAreaHeight(int tabPlacement, int horizRunCount, int maxTabHeight)
           
protected  int calculateTabAreaWidth(int tabPlacement, int vertRunCount, int maxTabWidth)
           
protected  int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight)
           
protected  int calculateTabWidth(int tabPlacement, int tabIndex, FontMetrics metrics)
           
protected  ChangeListener createChangeListener()
           
protected  FocusListener createFocusListener()
           
protected  LayoutManager createLayoutManager()
          installUI により起動され、JTabbedPane を管理するためのレイアウトマネージャーオブジェクトを作成します。
protected  MouseListener createMouseListener()
           
protected  PropertyChangeListener createPropertyChangeListener()
           
protected  JButton createScrollButton(int direction)
          特定の方向にタブをスクロールできるようにする JButton を生成し、それを返します。
static ComponentUI createUI(JComponent c)
           
protected  void expandTabRunsArray()
           
protected  int getBaseline(int tab)
          指定されたタブのベースラインを返します。
 int getBaseline(JComponent c, int width, int height)
          ベースラインを返します。
protected  int getBaselineOffset()
          ベースラインのオフセット量を返します。
 Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
          サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。
protected  Insets getContentBorderInsets(int tabPlacement)
           
protected  int getFocusIndex()
          フォーカスのあるタブのインデックスを返します。
protected  FontMetrics getFontMetrics()
           
protected  Icon getIconForTab(int tabIndex)
           
 Dimension getMaximumSize(JComponent c)
          Look & Feel に適した、指定されたコンポーネントの最大サイズを返します。
 Dimension getMinimumSize(JComponent c)
          Look & Feel に適した、指定されたコンポーネントの最小サイズを返します。
protected  int getNextTabIndex(int base)
           
protected  int getNextTabIndexInRun(int tabCount, int base)
           
protected  int getNextTabRun(int baseRun)
           
protected  int getPreviousTabIndex(int base)
           
protected  int getPreviousTabIndexInRun(int tabCount, int base)
           
protected  int getPreviousTabRun(int baseRun)
           
protected  int getRolloverTab()
          マウスが現在置かれているタブを返し、マウスがタブの上にない場合は -1 を返します。
protected  int getRunForTab(int tabCount, int tabIndex)
           
protected  Insets getSelectedTabPadInsets(int tabPlacement)
           
protected  Insets getTabAreaInsets(int tabPlacement)
           
protected  Rectangle getTabBounds(int tabIndex, Rectangle dest)
          JTabbedPane コンポーネントの座標空間内の、指定されたタブの境界を返します。
 Rectangle getTabBounds(JTabbedPane pane, int i)
          指定されたタブインデックスの境界を返します。
protected  Insets getTabInsets(int tabPlacement, int tabIndex)
           
protected  int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected)
           
protected  int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected)
           
 int getTabRunCount(JTabbedPane pane)
           
protected  int getTabRunIndent(int tabPlacement, int run)
           
protected  int getTabRunOffset(int tabPlacement, int tabCount, int tabIndex, boolean forward)
           
protected  int getTabRunOverlay(int tabPlacement)
           
protected  View getTextViewForTab(int tabIndex)
          指定されたタブのために様式化されたテキスト (HTML) を描画するのに必要な、テキスト View オブジェクトを返します。
protected  Component getVisibleComponent()
           
protected  void installComponents()
          JTabbedPane に必要な任意のサブコンポーネントを作成およびインストールします。
protected  void installDefaults()
           
protected  void installKeyboardActions()
           
protected  void installListeners()
           
 void installUI(JComponent c)
          Look & Feel に適した、指定されたコンポーネントを構成します。
protected  int lastTabInRun(int tabCount, int run)
           
protected  void layoutLabel(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
           
protected  void navigateSelectedTab(int direction)
           
 void paint(Graphics g, JComponent c)
          Look &Feel に適した、指定されたコンポーネントをペイントします。
protected  void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex)
           
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 paintIcon(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
           
protected  void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect)
           
protected  void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
          タブ領域のタブをペイントします。
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 paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected)
           
protected static void rotateInsets(Insets topInsets, Insets targetInsets, int targetPlacement)
           
protected  void selectAdjacentRunTab(int tabPlacement, int tabIndex, int offset)
           
protected  void selectNextTab(int current)
           
protected  void selectNextTabInRun(int current)
           
protected  void selectPreviousTab(int current)
           
protected  void selectPreviousTabInRun(int current)
           
protected  void setRolloverTab(int index)
          マウスが現在置かれているタブを index に設定します。
protected  void setVisibleComponent(Component component)
           
protected  boolean shouldPadTabRun(int tabPlacement, int run)
           
protected  boolean shouldRotateTabRuns(int tabPlacement)
           
 int tabForCoordinate(JTabbedPane pane, int x, int y)
          JTabbedPane 座標空間内の指定された点と交差するタブインデックスを返します。
protected  void uninstallComponents()
          インストールされた任意のサブコンポーネントを、JTabbedPane から削除します。
protected  void uninstallDefaults()
           
protected  void uninstallKeyboardActions()
           
protected  void uninstallListeners()
           
 void uninstallUI(JComponent c)
          installUI 時に、指定されたコンポーネントで構成された内容を取り消します。
 
クラス javax.swing.plaf.ComponentUI から継承されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, update
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

tabPane

protected JTabbedPane tabPane

highlight

protected Color highlight

lightHighlight

protected Color lightHighlight

shadow

protected Color shadow

darkShadow

protected Color darkShadow

focus

protected Color focus

textIconGap

protected int textIconGap

tabRunOverlay

protected int tabRunOverlay

tabInsets

protected Insets tabInsets

selectedTabPadInsets

protected Insets selectedTabPadInsets

tabAreaInsets

protected Insets tabAreaInsets

contentBorderInsets

protected Insets contentBorderInsets

upKey

@Deprecated
protected KeyStroke upKey
推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
ドキュメントから削除済みのこのフィールドは、Java 2 プラットフォーム 1.3 では使用されません。キーバインディングは LookAndFeel によって定義されます。 詳細はキーバインディングの仕様を参照してください。


downKey

@Deprecated
protected KeyStroke downKey
推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
ドキュメントから削除済みのこのフィールドは、Java 2 プラットフォーム 1.3 では使用されません。キーバインディングは LookAndFeel によって定義されます。 詳細はキーバインディングの仕様を参照してください。


leftKey

@Deprecated
protected KeyStroke leftKey
推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
ドキュメントから削除済みのこのフィールドは、Java 2 プラットフォーム 1.3 では使用されません。キーバインディングは LookAndFeel によって定義されます。 詳細はキーバインディングの仕様を参照してください。


rightKey

@Deprecated
protected KeyStroke rightKey
推奨されていません。 Java 2 プラットフォーム 1.3 以降使われていません。
ドキュメントから削除済みのこのフィールドは、Java 2 プラットフォーム 1.3 では使用されません。キーバインディングは LookAndFeel によって定義されます。 詳細はキーバインディングの仕様を参照してください。


tabRuns

protected int[] tabRuns

runCount

protected int runCount

selectedRun

protected int selectedRun

rects

protected Rectangle[] rects

maxTabHeight

protected int maxTabHeight

maxTabWidth

protected int maxTabWidth

tabChangeListener

protected ChangeListener tabChangeListener

propertyChangeListener

protected PropertyChangeListener propertyChangeListener

mouseListener

protected MouseListener mouseListener

focusListener

protected FocusListener focusListener

calcRect

protected transient Rectangle calcRect
実行中に多くの新規 Rectangle が構築されるのを防ぐため、一般のレイアウト計算に使用される矩形です。

コンストラクタの詳細

BasicTabbedPaneUI

public BasicTabbedPaneUI()
メソッドの詳細

createUI

public static ComponentUI createUI(JComponent c)

installUI

public void installUI(JComponent c)
クラス ComponentUI の記述:
Look & Feel に適した、指定されたコンポーネントを構成します。このメソッドは、ComponentUI インスタンスが、指定されたコンポーネントの UI 委譲としてインストールされているときに呼び出されます。このメソッドは、以下を含む Look & Feel 用のコンポーネントを完全に構成する必要があります。
  1. カラー、フォント、ボーダー、アイコン、不透明さなどすべてのデフォルトプロパティーの値をコンポーネントにインストールする。可能な場合は、クライアントプログラムによって初期化されたプロパティーの値をオーバーライドしてはならない
  2. 必要に応じて、コンポーネントに LayoutManager をインストールする
  3. 必要なサブコンポーネントを、コンポーネントに作成または追加する
  4. イベントリスナーを、コンポーネントに作成またはインストールする
  5. コンポーネントのプロパティーの変更を適切に検出し、応答するために、PropertyChangeListener をコンポーネントに作成またはインストールする
  6. キーボード UI (ニーモニック、トラバーサルなど) を、コンポーネントにインストールする
  7. 適切なインスタンスのデータを初期化する

オーバーライド:
クラス ComponentUI 内の installUI
パラメータ:
c - UI 委譲がインストールされているコンポーネント
関連項目:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
クラス ComponentUI の記述:
installUI 時に、指定されたコンポーネントで構成された内容を取り消します。このメソッドは、指定されたコンポーネントの UI 委譲としての UIComponent インスタンスが削除されているときに呼び出されます。このメソッドは、installUI によって実行された構成を元に戻す必要があります。この場合、JComponent インスタンスをクリーンな状態 (余分なリスナーや、Look & Feel 固有のプロパティーオブジェクトが残らないように) にするよう十分注意してください。手順には次のものがあります。
  1. UI として設定されたすべてのボーダーを、コンポーネントから削除する
  2. UI として設定されたすべてのレイアウトマネージャーを、コンポーネントから削除する
  3. UI として追加されたすべてのサブコンポーネントを、コンポーネントから削除する
  4. UI として追加されたすべてのイベント/リスナーを、コンポーネントから削除する
  5. UI としてインストールされたすべてのキーボード UI を、コンポーネントから削除する
  6. GC 用に割り当てられたすべてのインスタンスのデータオブジェクトを無効にする

オーバーライド:
クラス ComponentUI 内の uninstallUI
パラメータ:
c - この UI 委譲を削除するコンポーネント。 この引数は通常無視されるが、 UI オブジェクトに状態がなく、複数のコンポーネントに共有されている場合は 使用されることがある
関連項目:
ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()

createLayoutManager

protected LayoutManager createLayoutManager()
installUI により起動され、JTabbedPane を管理するためのレイアウトマネージャーオブジェクトを作成します。

戻り値:
レイアウトマネージャーオブジェクト
関連項目:
BasicTabbedPaneUI.TabbedPaneLayout, JTabbedPane.getTabLayoutPolicy()

installComponents

protected void installComponents()
JTabbedPane に必要な任意のサブコンポーネントを作成およびインストールします。installUI によって呼び出されます。

導入されたバージョン:
1.4

createScrollButton

protected JButton createScrollButton(int direction)
特定の方向にタブをスクロールできるようにする JButton を生成し、それを返します。返された JButton は UIResource のインスタンスでなければなりません。

パラメータ:
direction - SwingConstants 定数、 SOUTH、NORTH、EAST、または WEST のいずれか
戻り値:
ユーザーのためのウィジェット
例外:
IllegalArgumentException - direction が NORTH、SOUTH、EAST、または WEST のどれでもない場合
導入されたバージョン:
1.5
関連項目:
JTabbedPane.setTabPlacement(int), SwingConstants

uninstallComponents

protected void uninstallComponents()
インストールされた任意のサブコンポーネントを、JTabbedPane から削除します。uninstallUI によって呼び出されます。

導入されたバージョン:
1.4

installDefaults

protected void installDefaults()

uninstallDefaults

protected void uninstallDefaults()

installListeners

protected void installListeners()

uninstallListeners

protected void uninstallListeners()

createMouseListener

protected MouseListener createMouseListener()

createFocusListener

protected FocusListener createFocusListener()

createChangeListener

protected ChangeListener createChangeListener()

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()

installKeyboardActions

protected void installKeyboardActions()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

setRolloverTab

protected void setRolloverTab(int index)
マウスが現在置かれているタブを index に設定します。マウスをこれ以上タブの上に置かない場合は、index を -1 にします。渡されたインデックスが有効なタブを識別するかどうかの確認は行われません。

パラメータ:
index - マウスが置かれているタブのインデックス
導入されたバージョン:
1.5

getRolloverTab

protected int getRolloverTab()
マウスが現在置かれているタブを返し、マウスがタブの上にない場合は -1 を返します。

戻り値:
マウスが現在置かれているタブ。マウスがタブの上にない場合は -1
導入されたバージョン:
1.5

getMinimumSize

public Dimension getMinimumSize(JComponent c)
クラス ComponentUI の記述:
Look & Feel に適した、指定されたコンポーネントの最小サイズを返します。null が返される場合、最小サイズは代わりにコンポーネントのレイアウトマネージャーによって計算されます (これは、特定のレイアウトマネージャーをインストールしてあるコンポーネントの場合に推奨する方法です)。このメソッドのデフォルト実装は getPreferredSize を呼び出して、その値を返します。

オーバーライド:
クラス ComponentUI 内の getMinimumSize
パラメータ:
c - 最小サイズを照会されるコンポーネント。 この引数は通常無視されるが、 UI オブジェクトに状態がなく、複数のコンポーネントに共有されている場合は 使用されることがある
戻り値:
Dimension オブジェクト、または null
関連項目:
JComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)

getMaximumSize

public Dimension getMaximumSize(JComponent c)
クラス ComponentUI の記述:
Look & Feel に適した、指定されたコンポーネントの最大サイズを返します。null が返される場合、最大サイズは代わりにコンポーネントのレイアウトマネージャーによって計算されます (これは、特定のレイアウトマネージャーをインストールしてあるコンポーネントの場合に推奨する方法です)。このメソッドのデフォルト実装は getPreferredSize を呼び出して、その値を返します。

オーバーライド:
クラス ComponentUI 内の getMaximumSize
パラメータ:
c - 最大サイズを照会されるコンポーネント。 この引数は通常無視されるが、 UI オブジェクトに状態がなく、複数のコンポーネントに共有されている場合は 使用されることがある
戻り値:
Dimension オブジェクト、または null
関連項目:
JComponent.getMaximumSize(), LayoutManager2.maximumLayoutSize(java.awt.Container)

getBaseline

public int getBaseline(JComponent c,
                       int width,
                       int height)
ベースラインを返します。

オーバーライド:
クラス ComponentUI 内の getBaseline
パラメータ:
c - 要求される JComponent ベースライン
width - ベースラインを取得する幅
height - ベースラインを取得する高さ
戻り値:
ベースラインまたは 0 より小さい値 (適切なベースラインが 存在しない)
例外:
NullPointerException - cnull の場合
IllegalArgumentException - 幅または高さが 0 より小さい場合
導入されたバージョン:
1.6
関連項目:
JComponent.getBaseline(int, int)

getBaselineResizeBehavior

public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。

オーバーライド:
クラス ComponentUI 内の getBaselineResizeBehavior
パラメータ:
c - ベースラインのサイズ変更の動作を返す JComponent
戻り値:
コンポーネントのサイズ変更に伴うベースラインの変化を示す 列挙型の値
例外:
NullPointerException - cnull の場合
導入されたバージョン:
1.6
関連項目:
JComponent.getBaseline(int, int)

getBaseline

protected int getBaseline(int tab)
指定されたタブのベースラインを返します。

パラメータ:
tab - ベースラインを取得するタブのインデックス
戻り値:
ベースラインまたは 0 より小さい値 (適切なベースラインが 存在しない)
例外:
IndexOutOfBoundsException - index が範囲外にある場合 (インデックスが 0 より小さい || インデックスがタブの総数以上)
導入されたバージョン:
1.6

getBaselineOffset

protected int getBaselineOffset()
ベースラインのオフセット量を返します。これは、一般に、getTabLabelShiftY と同じです。

戻り値:
ベースラインのオフセット量
導入されたバージョン:
1.6

paint

public void paint(Graphics g,
                  JComponent c)
クラス ComponentUI の記述:
Look &Feel に適した、指定されたコンポーネントをペイントします。このメソッドは ComponentUI.update メソッドから、指定されたコンポーネントがペイントされるときに呼び出されます。サブクラスは、このメソッドをオーバーライドして、指定された Graphics オブジェクトを使ってコンポーネントの内容を描画する必要があります。

オーバーライド:
クラス ComponentUI 内の paint
パラメータ:
g - ペイント対象の Graphics コンテキスト
c - ペイントされるコンポーネント。 この引数は通常無視されるが、 UI オブジェクトに状態がなく、複数のコンポーネントに共有されている場合は 使用されることがある
関連項目:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

paintTabArea

protected void paintTabArea(Graphics g,
                            int tabPlacement,
                            int selectedIndex)
タブ領域のタブをペイントします。paint() により起動されます。グラフィックスパラメータは、有効な Graphics オブジェクトである必要があります。タブ配置は、JTabbedPane.TOPJTabbedPane.BOTTOMJTabbedPane.LEFT、または JTabbedPane.RIGHT のいずれかです。選択されたインデックスは、有効なタブ区画タブインデックス (0 以上、タブ数マイナス 1 以下) になるか、現在タブが選択されていない場合、-1 になる必要があります。無効なパラメータの処理は指定されていません。

パラメータ:
g - レンダリングに使用するグラフィックスオブジェクト
tabPlacement - JTabbedPane 内のタブの配置方法
selectedIndex - 選択されたコンポーネントのタブインデックス
導入されたバージョン:
1.4

paintTab

protected void paintTab(Graphics g,
                        int tabPlacement,
                        Rectangle[] rects,
                        int tabIndex,
                        Rectangle iconRect,
                        Rectangle textRect)

layoutLabel

protected void layoutLabel(int tabPlacement,
                           FontMetrics metrics,
                           int tabIndex,
                           String title,
                           Icon icon,
                           Rectangle tabRect,
                           Rectangle iconRect,
                           Rectangle textRect,
                           boolean isSelected)

paintIcon

protected void paintIcon(Graphics g,
                         int tabPlacement,
                         int tabIndex,
                         Icon icon,
                         Rectangle iconRect,
                         boolean isSelected)

paintText

protected void paintText(Graphics g,
                         int tabPlacement,
                         Font font,
                         FontMetrics metrics,
                         int tabIndex,
                         String title,
                         Rectangle textRect,
                         boolean isSelected)

getTabLabelShiftX

protected int getTabLabelShiftX(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)

getTabLabelShiftY

protected int getTabLabelShiftY(int tabPlacement,
                                int tabIndex,
                                boolean isSelected)

paintFocusIndicator

protected void paintFocusIndicator(Graphics g,
                                   int tabPlacement,
                                   Rectangle[] rects,
                                   int tabIndex,
                                   Rectangle iconRect,
                                   Rectangle textRect,
                                   boolean isSelected)

paintTabBorder

protected void paintTabBorder(Graphics g,
                              int tabPlacement,
                              int tabIndex,
                              int x,
                              int y,
                              int w,
                              int h,
                              boolean isSelected)
各タブの周囲にボーダーを描画します。この関数は、同時にタブのバックグラウンドも描画しますが、それはほかの場所で行われます。


paintTabBackground

protected void paintTabBackground(Graphics g,
                                  int tabPlacement,
                                  int tabIndex,
                                  int x,
                                  int y,
                                  int w,
                                  int h,
                                  boolean isSelected)

paintContentBorder

protected void paintContentBorder(Graphics g,
                                  int tabPlacement,
                                  int selectedIndex)

paintContentBorderTopEdge

protected void paintContentBorderTopEdge(Graphics g,
                                         int tabPlacement,
                                         int selectedIndex,
                                         int x,
                                         int y,
                                         int w,
                                         int h)

paintContentBorderLeftEdge

protected void paintContentBorderLeftEdge(Graphics g,
                                          int tabPlacement,
                                          int selectedIndex,
                                          int x,
                                          int y,
                                          int w,
                                          int h)

paintContentBorderBottomEdge

protected void paintContentBorderBottomEdge(Graphics g,
                                            int tabPlacement,
                                            int selectedIndex,
                                            int x,
                                            int y,
                                            int w,
                                            int h)

paintContentBorderRightEdge

protected void paintContentBorderRightEdge(Graphics g,
                                           int tabPlacement,
                                           int selectedIndex,
                                           int x,
                                           int y,
                                           int w,
                                           int h)

getTabBounds

public Rectangle getTabBounds(JTabbedPane pane,
                              int i)
指定されたタブインデックスの境界を返します。境界は、JTabbedPane の座標空間を基準にします。

定義:
クラス TabbedPaneUI 内の getTabBounds

getTabRunCount

public int getTabRunCount(JTabbedPane pane)
定義:
クラス TabbedPaneUI 内の getTabRunCount

tabForCoordinate

public int tabForCoordinate(JTabbedPane pane,
                            int x,
                            int y)
JTabbedPane 座標空間内の指定された点と交差するタブインデックスを返します。

定義:
クラス TabbedPaneUI 内の tabForCoordinate

getTabBounds

protected Rectangle getTabBounds(int tabIndex,
                                 Rectangle dest)
JTabbedPane コンポーネントの座標空間内の、指定されたタブの境界を返します。タブ rects は、デフォルトでは、描画されるコンポーネントの座標空間内に定義され、(WRAP_TAB_LAYOUT のための) JTabbedPane、または (SCROLL_TAB_LAYOUT のための) ScrollableTabPanel などになるので、このメソッドが必要になります。タブの矩形が JTabbedPane 自体に関連し、(毎回新規の Rectangle をインスタンス化して返すのではなく、) 指定した Rectangle オブジェクト内に結果を置く必要がある場合に、このメソッドは使われます。タブのインデックスパラメータは、有効なタブ区画タブインデックス (0 以上、タブ数マイナス 1 以下) になる必要があります。出力先の矩形パラメータは、有効な Rectangle インスタンスになる必要があります。無効なパラメータの処理は指定されていません。

パラメータ:
tabIndex - タブのインデックス
dest - 結果が置かれる矩形
戻り値:
結果として得られる矩形
導入されたバージョン:
1.4

getVisibleComponent

protected Component getVisibleComponent()

setVisibleComponent

protected void setVisibleComponent(Component component)

assureRectsCreated

protected void assureRectsCreated(int tabCount)

expandTabRunsArray

protected void expandTabRunsArray()

getRunForTab

protected int getRunForTab(int tabCount,
                           int tabIndex)

lastTabInRun

protected int lastTabInRun(int tabCount,
                           int run)

getTabRunOverlay

protected int getTabRunOverlay(int tabPlacement)

getTabRunIndent

protected int getTabRunIndent(int tabPlacement,
                              int run)

shouldPadTabRun

protected boolean shouldPadTabRun(int tabPlacement,
                                  int run)

shouldRotateTabRuns

protected boolean shouldRotateTabRuns(int tabPlacement)

getIconForTab

protected Icon getIconForTab(int tabIndex)

getTextViewForTab

protected View getTextViewForTab(int tabIndex)
指定されたタブのために様式化されたテキスト (HTML) を描画するのに必要な、テキスト View オブジェクトを返します。 または、このタブで特別なテキストのレンダリングが必要ない場合、null を返します。タブ内の HTML レンダリングをサポートするために提供されます。

パラメータ:
tabIndex - タブのインデックス
戻り値:
タブのテキストを描画するためのテキスト画面、 または特別なレンダリングが必要でない場合 null
導入されたバージョン:
1.4

calculateTabHeight

protected int calculateTabHeight(int tabPlacement,
                                 int tabIndex,
                                 int fontHeight)

calculateMaxTabHeight

protected int calculateMaxTabHeight(int tabPlacement)

calculateTabWidth

protected int calculateTabWidth(int tabPlacement,
                                int tabIndex,
                                FontMetrics metrics)

calculateMaxTabWidth

protected int calculateMaxTabWidth(int tabPlacement)

calculateTabAreaHeight

protected int calculateTabAreaHeight(int tabPlacement,
                                     int horizRunCount,
                                     int maxTabHeight)

calculateTabAreaWidth

protected int calculateTabAreaWidth(int tabPlacement,
                                    int vertRunCount,
                                    int maxTabWidth)

getTabInsets

protected Insets getTabInsets(int tabPlacement,
                              int tabIndex)

getSelectedTabPadInsets

protected Insets getSelectedTabPadInsets(int tabPlacement)

getTabAreaInsets

protected Insets getTabAreaInsets(int tabPlacement)

getContentBorderInsets

protected Insets getContentBorderInsets(int tabPlacement)

getFontMetrics

protected FontMetrics getFontMetrics()

navigateSelectedTab

protected void navigateSelectedTab(int direction)

selectNextTabInRun

protected void selectNextTabInRun(int current)

selectPreviousTabInRun

protected void selectPreviousTabInRun(int current)

selectNextTab

protected void selectNextTab(int current)

selectPreviousTab

protected void selectPreviousTab(int current)

selectAdjacentRunTab

protected void selectAdjacentRunTab(int tabPlacement,
                                    int tabIndex,
                                    int offset)

getFocusIndex

protected int getFocusIndex()
フォーカスのあるタブのインデックスを返します。

戻り値:
フォーカスのあるタブのインデックス
導入されたバージョン:
1.5

getTabRunOffset

protected int getTabRunOffset(int tabPlacement,
                              int tabCount,
                              int tabIndex,
                              boolean forward)

getPreviousTabIndex

protected int getPreviousTabIndex(int base)

getNextTabIndex

protected int getNextTabIndex(int base)

getNextTabIndexInRun

protected int getNextTabIndexInRun(int tabCount,
                                   int base)

getPreviousTabIndexInRun

protected int getPreviousTabIndexInRun(int tabCount,
                                       int base)

getPreviousTabRun

protected int getPreviousTabRun(int baseRun)

getNextTabRun

protected int getNextTabRun(int baseRun)

rotateInsets

protected static void rotateInsets(Insets topInsets,
                                   Insets targetInsets,
                                   int targetPlacement)

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。