クラスBasicButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
- 直系の既知のサブクラス:
BasicToggleButtonUI, MetalButtonUI, SynthButtonUI
public class BasicButtonUI extends ButtonUI
BasicButton実装です
-
フィールドのサマリー
フィールド修飾子と型フィールド説明protected intテキストとアイコンの間のデフォルトのギャップ。protected intテキストのデフォルトのオフセット。 -
コンストラクタのサマリー
コンストラクタ -
メソッドのサマリー
修飾子と型メソッド説明protected voidテキストのオフセットをクリアします。protected BasicButtonListenerBasicButtonListenerの新しいインスタンスを返します。static ComponentUIBasicButtonUIのインスタンスを返します。intgetBaseline(JComponent c, int width, int height) ベースラインを返します。サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。intテキストとアイコンの間のデフォルトのギャップを返します。protected Stringプロパティ・プレフィクスを返します。protected intテキストのオフセットを返します。protected voidデフォルトのプロパティをインストールします。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キーボード操作の登録を解除します。protected voidリスナーを登録解除します。クラスで宣言されたメソッド ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update修飾子と型メソッド説明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時に、指定されたコンポーネントに対して行われた構成を取り消します。voidupdate(Graphics g, JComponent c) 指定されたコンポーネントをペイントする時間になったことを、このUI委譲に通知します。クラスオブジェクトで宣言されたメソッド
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であるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
フィールド詳細
-
defaultTextIconGap
protected int defaultTextIconGapテキストとアイコンの間のデフォルトのギャップ。 -
defaultTextShiftOffset
protected int defaultTextShiftOffsetテキストのデフォルトのオフセット。
-
-
コンストラクタの詳細
-
BasicButtonUI
public BasicButtonUI()BasicButtonUIを構築します。
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent c) BasicButtonUIのインスタンスを返します。- パラメータ:
c- コンポーネント- 戻り値:
BasicButtonUIのインスタンス
-
getPropertyPrefix
-
installDefaults
-
installListeners
-
installKeyboardActions
-
uninstallKeyboardActions
-
uninstallListeners
-
uninstallDefaults
-
createButtonListener
protected BasicButtonListener createButtonListener(AbstractButton b) BasicButtonListenerの新しいインスタンスを返します。- パラメータ:
b- 抽象的なボタン- 戻り値:
BasicButtonListenerの新しいインスタンス
-
getDefaultTextIconGap
public int getDefaultTextIconGap(AbstractButton b) テキストとアイコンの間のデフォルトのギャップを返します。- パラメータ:
b- 抽象的なボタン- 戻り値:
- テキストとアイコンのデフォルトの間隔
-
paintIcon
protected void paintIcon(Graphics g, JComponent c, Rectangle iconRect) 現在のボタンのアイコンをペイントします。- パラメータ:
g-Graphicsのインスタンスc- コンポーネントiconRect- アイコンをレンダリングする境界の矩形
-
paintText
protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text) 現在のボタンのテキストをレンダリングするメソッドです。 Java 2プラットフォームv 1.4では、このメソッドは使用またはオーバーライドしないでください。 AbstractButton引数をとるpaintTextメソッドを使用します。- パラメータ:
g-Graphicsのインスタンスc- コンポーネントtextRect- テキストを描画する境界矩形text- レンダリングする文字列
-
paintText
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) 現在のボタンのテキストをレンダリングするメソッドです。- パラメータ:
g- グラフィックス・コンテキストb- レンダリングする現在のボタンtextRect- テキストを描画する境界の矩形text- レンダリングする文字列- 導入されたバージョン:
- 1.4
-
paintFocus
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) フォーカスされたボタンをペイントします。- パラメータ:
g-Graphicsのインスタンスb- 抽象的なボタンviewRect- ボタンをレンダリングする枠の矩形textRect- テキストを描画する境界矩形iconRect- アイコンをレンダリングする境界の矩形
-
paintButtonPressed
protected void paintButtonPressed(Graphics g, AbstractButton b) 押されたボタンをペイントします。- パラメータ:
g-Graphicsのインスタンスb- 抽象的なボタン
-
clearTextShiftOffset
protected void clearTextShiftOffset()テキストのオフセットをクリアします。 -
setTextShiftOffset
protected void setTextShiftOffset()テキストのオフセットを設定します。 -
getTextShiftOffset
protected int getTextShiftOffset()テキストのオフセットを返します。- 戻り値:
- テキストのオフセット
-
getBaseline
public int getBaseline(JComponent c, int width, int height) ベースラインを返します。- オーバーライド:
getBaseline、クラスComponentUI- パラメータ:
c- ベースラインが要求されるJComponentwidth- ベースラインを取得する幅height- ベースラインを取得する高さ- 戻り値:
- ベースラインまたは0より小さい値(適切なベースラインがないことを示す)
- スロー:
NullPointerException-cがnullである場合IllegalArgumentException- 幅または高さが0より小さい場合- 導入されたバージョン:
- 1.6
- 関連項目:
-
getBaselineResizeBehavior
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c) サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。- オーバーライド:
getBaselineResizeBehavior、クラスComponentUI- パラメータ:
c- ベースラインのサイズ変更の動作を返すJComponent- 戻り値:
- コンポーネント・サイズの変化に合わせてベースラインがどのように変化するかを示す列挙
- スロー:
NullPointerException-cがnullである場合- 導入されたバージョン:
- 1.6
- 関連項目:
-