- 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 ColordisabledTextColor無効にされたテキストの色。protected ColorfocusColorフォーカスされたトグル・ボタンの色です。protected ColorselectColor選択されたボタンの色です。-
クラス javax.swing.plaf.basic.BasicButtonUIから継承されたフィールド
defaultTextIconGap, defaultTextShiftOffset
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 MetalToggleButtonUI()
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 static ComponentUIcreateUI(JComponent b)MetalToogleButtonUIを構築します。protected ColorgetDisabledTextColor()無効なテキストの色を返します。protected ColorgetFocusColor()フォーカスされたトグル・ボタンの色を返します。protected ColorgetSelectColor()選択されたボタンの色を返します。voidinstallDefaults(AbstractButton b)デフォルトのプロパティをインストールします。protected voidpaintButtonPressed(Graphics g, AbstractButton b)押されたボタンをペイントします。protected voidpaintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)フォーカスされたボタンをペイントします。protected voidpaintIcon(Graphics g, AbstractButton b, Rectangle iconRect)ボタンbの適切なアイコンを領域iconRectにペイントします。protected voidpaintText(Graphics g, JComponent c, Rectangle textRect, String text)現在のボタンのテキストをレンダリングするメソッドです。protected voiduninstallDefaults(AbstractButton b)既定のプロパティをアンインストールします。voidupdate(Graphics g, JComponent c)必要に応じて、コンポーネントのバックグラウンドをペイントしてから、paintを呼び出します。-
クラス javax.swing.plaf.basic.BasicButtonUIから継承されたメソッド
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
クラス javax.swing.plaf.basic.BasicToggleButtonUIから継承されたメソッド
getPropertyPrefix, getTextShiftOffset, paint
-
クラス javax.swing.plaf.ComponentUIから継承されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount
-
-
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent b)
MetalToogleButtonUIを構築します。- パラメータ:
b- コンポーネント- 戻り値:
MetalToogleButtonUI。
-
installDefaults
public void installDefaults(AbstractButton b)
クラスからコピーされた説明:BasicButtonUIデフォルトのプロパティをインストールします。- オーバーライド:
installDefaults、クラス:BasicButtonUI- パラメータ:
b- 抽象的なボタン
-
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
クラスからコピーされた説明:BasicButtonUI既定のプロパティをアンインストールします。- オーバーライド:
uninstallDefaults、クラス:BasicButtonUI- パラメータ:
b- 抽象的なボタン
-
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)
-
paintButtonPressed
protected void paintButtonPressed(Graphics g, AbstractButton b)
クラスからコピーされた説明:BasicButtonUI押されたボタンをペイントします。- オーバーライド:
paintButtonPressed、クラス:BasicButtonUI- パラメータ:
g-Graphicsのインスタンスb- 抽象的なボタン
-
paintText
protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text)
クラスからコピーされた説明:BasicButtonUI現在のボタンのテキストをレンダリングするメソッドです。 Java 2プラットフォーム1.4以降では、このメソッドを使用したり、オーバーライドしたりしないようにしてください。 AbstractButton引数をとるpaintTextメソッドを使用します。- オーバーライド:
paintText、クラス:BasicButtonUI- パラメータ:
g-Graphicsのインスタンスc- コンポーネントtextRect- テキストを描画する境界矩形text- レンダリングする文字列
-
paintFocus
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
クラスからコピーされた説明:BasicButtonUIフォーカスされたボタンをペイントします。- オーバーライド:
paintFocus、クラス:BasicButtonUI- パラメータ:
g-Graphicsのインスタンスb- 抽象的なボタンviewRect- ボタンをレンダリングする枠の矩形textRect- テキストを描画する境界矩形iconRect- アイコンをレンダリングする境界の矩形
-
paintIcon
protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
ボタンbの適切なアイコンを領域iconRectにペイントします。- オーバーライド:
paintIcon、クラス:BasicToggleButtonUI- パラメータ:
g- ペイントされるGraphicsb- 描画されるボタンiconRect- 描画される領域- 例外:
NullPointerException- 引数が1つでもnullの場合。- 導入されたバージョン:
- 1.5
-
-