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リスナーを登録解除します。クラスjavax.swing.plaf.ComponentUIで宣言されたメソッド
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
-
フィールド詳細
-
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
- 関連項目:
-