java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
javax.swing.plaf.metal.MetalToggleButtonUI
public class MetalToggleButtonUI extends BasicToggleButtonUI
MetalToggleButton実装です。
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beans
パッケージに追加されています。 XMLEncoder
を参照してください。
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected Color
disabledTextColor
無効にされたテキストの色。protected Color
focusColor
フォーカスされたトグル・ボタンの色です。protected Color
selectColor
選択されたボタンの色です。 -
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 MetalToggleButtonUI()
-
メソッドのサマリー
修飾子と型 メソッド 説明 static ComponentUI
createUI(JComponent b)
MetalToogleButtonUI
を構築します。protected Color
getDisabledTextColor()
無効なテキストの色を返します。protected Color
getFocusColor()
フォーカスされたトグル・ボタンの色を返します。protected Color
getSelectColor()
選択されたボタンの色を返します。protected void
paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
ボタンb
の適切なアイコンを領域iconRect
にペイントします。void
update(Graphics g, JComponent c)
必要に応じて、コンポーネントのバックグラウンドをペイントしてから、paint
を呼び出します。クラス javax.swing.plaf.basic.BasicButtonUIで宣言されたメソッド
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getPropertyPrefix, installDefaults, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
クラス javax.swing.plaf.ComponentUIで宣言されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI
-
フィールド詳細
-
focusColor
protected Color focusColorフォーカスされたトグル・ボタンの色です。 -
selectColor
protected Color selectColor選択されたボタンの色です。 -
disabledTextColor
protected Color disabledTextColor無効にされたテキストの色。
-
-
コンストラクタの詳細
-
MetalToggleButtonUI
public MetalToggleButtonUI()
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent b)MetalToogleButtonUI
を構築します。- パラメータ:
b
- コンポーネント- 戻り値:
MetalToogleButtonUI
。
-
getSelectColor
protected Color getSelectColor()選択されたボタンの色を返します。- 戻り値:
- 選択されたボタンの色
-
getDisabledTextColor
protected Color getDisabledTextColor()無効なテキストの色を返します。- 戻り値:
- 無効にされたテキストの色
-
getFocusColor
protected Color getFocusColor()フォーカスされたトグル・ボタンの色を返します。- 戻り値:
- フォーカスされたトグル・ボタンの色
-
update
public void update(Graphics g, JComponent c)必要に応じて、コンポーネントのバックグラウンドをペイントしてから、paint
を呼び出します。- オーバーライド:
update
、クラス:ComponentUI
- パラメータ:
g
- ペイントされるGraphicsc
- ペイントされるJComponent- 例外:
NullPointerException
-g
またはc
がnullの場合- 導入されたバージョン:
- 1.5
- 関連項目:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
,ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
-
paintIcon
protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)ボタンb
の適切なアイコンを領域iconRect
にペイントします。- オーバーライド:
paintIcon
、クラス:BasicToggleButtonUI
- パラメータ:
g
- ペイントされるGraphicsb
- 描画されるボタンiconRect
- 描画される領域- 例外:
NullPointerException
- 引数が1つでもnullの場合。- 導入されたバージョン:
- 1.5
-