JavaTM Platform
Standard Ed. 6

javax.swing.plaf.metal
クラス MetalToggleButtonUI

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 に適しています。JDK Version 1.4 以降、すべての JavaBeans の長期間の運用サポートは、java.beans パッケージに追加されています。詳細は、XMLEncoder を参照してください。


フィールドの概要
protected  Color disabledTextColor
           
protected  Color focusColor
           
protected  Color selectColor
           
 
クラス javax.swing.plaf.basic.BasicButtonUI から継承されたフィールド
defaultTextIconGap, defaultTextShiftOffset
 
コンストラクタの概要
MetalToggleButtonUI()
           
 
メソッドの概要
static ComponentUI createUI(JComponent b)
           
protected  Color getDisabledTextColor()
           
protected  Color getFocusColor()
           
protected  Color getSelectColor()
           
 void installDefaults(AbstractButton b)
           
protected  void paintButtonPressed(Graphics g, AbstractButton b)
           
protected  void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
protected  void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
          ボタン b の適切なアイコンを領域 iconRect にペイントします。
protected  void paintText(Graphics g, JComponent c, Rectangle textRect, String text)
          Java 2 プラットフォーム 1.4 以降では、このメソッドを使用したり、オーバーライドしたりしないでください。
protected  void uninstallDefaults(AbstractButton b)
           
 void update(Graphics g, JComponent c)
          コンポーネントのバックグラウンドをペイントする必要がある場合に paint を呼び出します。
 
クラス javax.swing.plaf.basic.BasicToggleButtonUI から継承されたメソッド
getPropertyPrefix, getTextShiftOffset, 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.ComponentUI から継承されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

focusColor

protected Color focusColor

selectColor

protected Color selectColor

disabledTextColor

protected Color disabledTextColor
コンストラクタの詳細

MetalToggleButtonUI

public MetalToggleButtonUI()
メソッドの詳細

createUI

public static ComponentUI createUI(JComponent b)

installDefaults

public void installDefaults(AbstractButton b)
オーバーライド:
クラス BasicButtonUI 内の installDefaults

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)
オーバーライド:
クラス BasicButtonUI 内の uninstallDefaults

getSelectColor

protected Color getSelectColor()

getDisabledTextColor

protected Color getDisabledTextColor()

getFocusColor

protected Color getFocusColor()

update

public void update(Graphics g,
                   JComponent c)
コンポーネントのバックグラウンドをペイントする必要がある場合に paint を呼び出します。

オーバーライド:
クラス ComponentUI 内の update
パラメータ:
g - ペイントされる Graphics
c - ペイントされる 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

paintText

protected void paintText(Graphics g,
                         JComponent c,
                         Rectangle textRect,
                         String text)
クラス BasicButtonUI の記述:
Java 2 プラットフォーム 1.4 以降では、このメソッドを使用したり、オーバーライドしたりしないでください。AbstractButton 引数をとる paintText メソッドを使用します。

オーバーライド:
クラス BasicButtonUI 内の paintText

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
オーバーライド:
クラス BasicButtonUI 内の paintFocus

paintIcon

protected void paintIcon(Graphics g,
                         AbstractButton b,
                         Rectangle iconRect)
ボタン b の適切なアイコンを領域 iconRect にペイントします。

オーバーライド:
クラス BasicToggleButtonUI 内の paintIcon
パラメータ:
g - ペイントされる Graphics
b - 描画されるボタン
iconRect - 描画される領域
例外:
NullPointerException - 引数が 1 つでも null の場合
導入されたバージョン:
1.5

JavaTM Platform
Standard Ed. 6

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

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