public class SynthButtonUI extends BasicButtonUI implements PropertyChangeListener, SynthUI
JButton の Synth L&F UI の委譲を提供します。defaultTextIconGap, defaultTextShiftOffsetDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| コンストラクタと説明 |
|---|
SynthButtonUI() |
| 修飾子と型 | メソッドと説明 |
|---|---|
static ComponentUI |
createUI(JComponent c)
指定されたコンポーネントの新しい UI オブジェクトを作成します。
|
int |
getBaseline(JComponent c, int width, int height)
ベースラインを返します。
|
SynthContext |
getContext(JComponent c)
指定されたコンポーネントのコンテキストを返します。
|
protected Icon |
getDefaultIcon(AbstractButton b)
デフォルトのアイコンを返します。
|
protected Icon |
getIcon(AbstractButton b)
ボタンのペイントに使用するアイコンを返します。
|
Dimension |
getMaximumSize(JComponent c)
指定されたコンポーネントの、Look & Feel に適した最大サイズを返します。
|
Dimension |
getMinimumSize(JComponent c)
指定されたコンポーネントの、Look & Feel に適した最小サイズを返します。
|
Dimension |
getPreferredSize(JComponent c)
指定されたコンポーネントの、Look & Feel に適した推奨サイズを返します。
|
protected Icon |
getSizingIcon(AbstractButton b)
推奨/最小/最大サイズの計算に使われるアイコンを返します。
|
protected void |
installDefaults(AbstractButton b) |
protected void |
installListeners(AbstractButton b) |
void |
paint(Graphics g, JComponent c)
Look & Feel に従って、指定されたコンポーネントをペイントします。
|
protected void |
paint(SynthContext context, Graphics g)
指定されたコンポーネントをペイントします。
|
void |
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
ボーダーをペイントします。
|
void |
propertyChange(PropertyChangeEvent e)
バウンドプロパティーの変更時に呼び出されます。
|
protected void |
uninstallDefaults(AbstractButton b) |
protected void |
uninstallListeners(AbstractButton b) |
void |
update(Graphics g, JComponent c)
この UI 委譲に、指定されたコンポーネントを再ペイントするよう通知します。
|
clearTextShiftOffset, createButtonListener, getBaselineResizeBehavior, getDefaultTextIconGap, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCountpublic static ComponentUI createUI(JComponent c)
c - UI オブジェクトを作成するコンポーネントprotected void installDefaults(AbstractButton b)
installDefaults、クラス: BasicButtonUIprotected void installListeners(AbstractButton b)
installListeners、クラス: BasicButtonUIprotected void uninstallListeners(AbstractButton b)
uninstallListeners、クラス: BasicButtonUIprotected void uninstallDefaults(AbstractButton b)
uninstallDefaults、クラス: BasicButtonUIpublic SynthContext getContext(JComponent c)
SynthUIgetContext、インタフェース: SynthUIc - SynthContext を要求するコンポーネント。public int getBaseline(JComponent c, int width, int height)
BasicButtonUIgetBaseline、クラス: BasicButtonUIc - ベースラインが要求される JComponentwidth - ベースラインを取得する幅height - ベースラインを取得する高さJComponent.getBaseline(int, int)public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics) メソッドを呼び出します。
一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。すべての Look & Feel の描画コードを paint メソッドに入れるようにしてください。
update、クラス: ComponentUIg - ペイントに使用される Graphics オブジェクトc - ペイントされるコンポーネントpaint(SynthContext,Graphics)public void paint(Graphics g, JComponent c)
このメソッドは、Synth Look & Feel で使用されません。ペイントは paint(SynthContext,Graphics) メソッドによって処理されます。
paint、クラス: BasicButtonUIg - ペイントに使用される Graphics オブジェクトc - ペイントされるコンポーネントpaint(SynthContext,Graphics)protected void paint(SynthContext context, Graphics g)
context - ペイントされるコンポーネントのコンテキストg - ペイントに使用される Graphics オブジェクトupdate(Graphics,JComponent)public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
SynthUIpaintBorder、インタフェース: SynthUIcontext - コンポーネントコンテキストg - ペイントされる Graphicsx - X 座標y - Y 座標w - ボーダーの幅h - ボーダーの高さprotected Icon getDefaultIcon(AbstractButton b)
b - アイコンを関連付けるボタンprotected Icon getIcon(AbstractButton b)
b - アイコンを関連付けるボタンpublic Dimension getMinimumSize(JComponent c)
ComponentUInull が返された場合、最小サイズは代わりにコンポーネントのレイアウトマネージャーによって計算されます (これは、特定のレイアウトマネージャーをインストールしてあるコンポーネントの場合に推奨する方法です)。このメソッドのデフォルト実装は getPreferredSize を呼び出して、その値を返します。getMinimumSize、クラス: BasicButtonUIc - 最小サイズが照会されるコンポーネント。この引数は通常無視されるが、UI オブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるDimension オブジェクトまたは nullJComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)public Dimension getPreferredSize(JComponent c)
ComponentUInull が返された場合、適切なサイズは代わりにコンポーネントのレイアウトマネージャーによって計算されます (これは、特定のレイアウトマネージャーをインストールしてあるコンポーネントの場合に推奨する方法です)。このメソッドのデフォルト実装は null を返します。getPreferredSize、クラス: BasicButtonUIc - 適切なサイズが照会されるコンポーネント。この引数は通常無視されるが、UI オブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるJComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)public Dimension getMaximumSize(JComponent c)
ComponentUInull が返された場合、最大サイズは代わりにコンポーネントのレイアウトマネージャーによって計算されます (これは、特定のレイアウトマネージャーをインストールしてあるコンポーネントの場合に推奨する方法です)。このメソッドのデフォルト実装は getPreferredSize を呼び出して、その値を返します。getMaximumSize、クラス: BasicButtonUIc - 最大サイズが照会されるコンポーネント。この引数は通常無視されるが、UI オブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるDimension オブジェクトまたは nullJComponent.getMaximumSize(), LayoutManager2.maximumLayoutSize(java.awt.Container)protected Icon getSizingIcon(AbstractButton b)
public void propertyChange(PropertyChangeEvent e)
PropertyChangeListenerpropertyChange、インタフェース: PropertyChangeListenere - イベントソースと変更されたプロパティーを記述した PropertyChangeEvent オブジェクト。 バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.