クラスMetalButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.metal.MetalButtonUI
public class MetalButtonUI extends BasicButtonUI
MetalButtonUI実装です。
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4では、すべてのJavaBeansの長期ストレージのサポートがjava.beansパッケージに追加されました。 XMLEncoderを参照してください。
-
フィールドのサマリー
フィールドクラスで宣言されたフィールド BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset修飾子と型フィールド説明protected intテキストとアイコンの間のデフォルトのギャップ。protected intテキストのデフォルトのオフセット。 -
コンストラクタのサマリー
コンストラクタ -
メソッドのサマリー
修飾子と型メソッド説明static ComponentUIMetalButtonUIのインスタンスを返します。protected Color無効化されたテキストの色を返します。protected Colorフォーカスされたボタンの色を返します。protected Color選択したボタンの色を返します。voidデフォルトのプロパティをインストールします。void既定のプロパティをアンインストールします。voidupdate(Graphics g, JComponent c) 必要に応じて、コンポーネントのバックグラウンドをペイントしてから、paintを呼び出します。クラスで宣言されたメソッド BasicButtonUI
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners修飾子と型メソッド説明protected voidテキストのオフセットをクリアします。protected BasicButtonListenerBasicButtonListenerの新しいインスタンスを返します。intgetBaseline(JComponent c, int width, int height) ベースラインを返します。サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。intテキストとアイコンの間のデフォルトのギャップを返します。protected Stringプロパティ・プレフィクスを返します。protected intテキストのオフセットを返します。protected voidキーボード操作を登録します。protected voidリスナーを登録します。protected void押されたボタンをペイントします。protected voidpaintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) フォーカスされたボタンをペイントします。protected voidpaintIcon(Graphics g, JComponent c, Rectangle iconRect) 現在のボタンのアイコンをペイントします。protected voidpaintText(Graphics g, AbstractButton b, Rectangle textRect, String text) 現在のボタンのテキストをレンダリングするメソッドです。protected voidpaintText(Graphics g, JComponent c, Rectangle textRect, String text) 現在のボタンのテキストをレンダリングするメソッドです。protected voidテキストのオフセットを設定します。protected voidキーボード操作の登録を解除します。protected voidリスナーを登録解除します。クラスで宣言されたメソッド ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI修飾子と型メソッド説明booleancontains(JComponent c, int x, int y) 指定された x,yの位置が、指定されたコンポーネントのLook & Feel定義の形状内にある場合は、trueを返します。getAccessibleChild(JComponent c, int i) オブジェクトのi番目のAccessibleの子を返します。intオブジェクト内のアクセシビリティ対応の子の数を返します。指定されたコンポーネントの、Look & Feelに適した最大サイズを返します。指定されたコンポーネントの、Look & Feelに適した最小サイズを返します。指定されたコンポーネントの、Look & Feelに適した推奨サイズを返します。void指定されたコンポーネントをLook & Feelに応じて適切に構成します。voidpaint(Graphics g, JComponent c) 指定されたコンポーネントをLook & Feelに合わせてペイントします。voidinstallUI時に、指定されたコンポーネントに対して行われた構成を取り消します。クラスオブジェクトで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait修飾子と型メソッド説明protected Objectclone()このオブジェクトのコピーを作成して、返します。booleanこのオブジェクトと他のオブジェクトが等しいかどうかを示します。protected voidfinalize()削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。最終決定は非推奨であり、将来のリリースで削除される可能性があります。final Class<?> getClass()このObjectの実行時クラスを返します。inthashCode()このオブジェクトに対するハッシュ・コード値を返します。final voidnotify()このオブジェクトのモニターで待機中のスレッドを1つ再開します。final voidこのオブジェクトのモニターで待機中のすべてのスレッドを再開します。toString()オブジェクトの文字列表現を返します。final voidwait()現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。final voidwait(long timeoutMillis) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。final voidwait(long timeoutMillis, int nanos) 現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
フィールド詳細
-
コンストラクタの詳細
-
MetalButtonUI
public MetalButtonUI()MetalButtonUIを構築します。
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent c) MetalButtonUIのインスタンスを返します。- パラメータ:
c- コンポーネント- 戻り値:
MetalButtonUIのインスタンス
-
installDefaults
public void installDefaults(AbstractButton b) クラスからコピーされた説明:BasicButtonUIデフォルトのプロパティをインストールします。- オーバーライド:
installDefaults、クラスBasicButtonUI- パラメータ:
b- 抽象的なボタン
-
uninstallDefaults
public void uninstallDefaults(AbstractButton b) クラスからコピーされた説明:BasicButtonUI既定のプロパティをアンインストールします。- オーバーライド:
uninstallDefaults、クラスBasicButtonUI- パラメータ:
b- 抽象的なボタン
-
getSelectColor
-
getDisabledTextColor
-
getFocusColor
-
update
public void update(Graphics g, JComponent c) 必要に応じて、コンポーネントのバックグラウンドをペイントしてから、paintを呼び出します。- オーバーライド:
update、クラスComponentUI- パラメータ:
g- ペイントされるGraphicsc- ペイントされるJComponent- スロー:
NullPointerException-gまたはcがnullの場合- 導入されたバージョン:
- 1.5
- 関連項目:
-