クラスSynthListUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ListUI
javax.swing.plaf.basic.BasicListUI
javax.swing.plaf.synth.SynthListUI
- すべての実装されたインタフェース:
PropertyChangeListener, EventListener, SynthConstants, SynthUI
public class SynthListUI extends BasicListUI implements PropertyChangeListener, SynthUI
JListのSynth L&F UIの委譲を提供します。- 導入されたバージョン:
- 1.7
-
ネストされたクラスのサマリー
クラスBasicListUIで宣言されたネストされたクラス/インタフェース
BasicListUI.FocusHandler, BasicListUI.ListDataHandler, BasicListUI.ListSelectionHandler, BasicListUI.MouseInputHandler, BasicListUI.PropertyChangeHandler修飾子と型クラス説明classこのクラスは、「protected」内部クラスとして扱うようにしてください。classinstallUI timeのJListsモデルに追加され、JList.modelプロパティが変更されるたびに追加されるListDataListener。classinstallUI時およびJList.selectionModelプロパティ変更時にJLists選択モデルに追加されるListSelectionListenerです。classJListのためのマウス入力およびフォーカス処理です。classinstallUI時にJListに追加されるPropertyChangeListenerです。 -
フィールドのサマリー
クラスで宣言されたフィールド BasicListUI
cellHeight, cellHeights, cellRendererChanged, cellWidth, fixedCellHeightChanged, fixedCellWidthChanged, focusListener, fontChanged, list, listDataListener, listSelectionListener, modelChanged, mouseInputListener, propertyChangeListener, prototypeCellValueChanged, rendererPane, selectionModelChanged, updateLayoutStateNeeded修飾子と型フィールド説明protected intセルの高さ。protected int[]セルの高さの配列protected static final intこのビットは、セル・レンダラ変更プロパティに関連しています。protected intセルの幅。protected static final intこのビットは、固定セル高さ変更プロパティに関連しています。protected static final intこのビットは、固定セル幅変更プロパティに関連しています。protected FocusListenerJListに添付されたFocusListener。protected static final intビットは、フォント変更プロパティに関連しています。JListのインスタンス。protected ListDataListenerJListに添付されたListDataListener。protected ListSelectionListenerJListに添付されたListSelectionListener。protected static final intこのビットは、モデル変更プロパティに関連しています。protected MouseInputListenerJListに添付されたMouseInputListener。protected PropertyChangeListenerJListに添付されたPropertyChangeListener。protected static final intこのビットは、プロトタイプ・セル値変更プロパティに関連しています。protected CellRendererPaneCellRendererPaneのインスタンス。protected static final intビットは、選択モデルの変更されたプロパティに関連しています。protected intこの値は、JListモデルの変更を表します。インタフェースで宣言されたフィールド SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED修飾子と型フィールド説明static final int領域がデフォルトであることを示します。static final int領域が有効でないことを示すプライマリ状態です。static final intコンポーネントが有効であることを示すプライマリ状態です。static final int領域にフォーカスがあることを示します。static final intマウスが領域上にあることを示すプライマリ状態です。static final int領域が押された状態であることを示すプライマリ状態です。static final int領域が選択されていることを示します。 -
コンストラクタのサマリー
コンストラクタ -
メソッドのサマリー
修飾子と型メソッド説明static ComponentUIcreateUI(JComponent list) 指定されたコンポーネントの新しいUIオブジェクトを作成します。指定されたコンポーネントのコンテキストを返します。voidpaintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) ボーダーをペイントします。voidバウンド・プロパティの変更時に呼び出されます。voidupdate(Graphics g, JComponent c) このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。クラスで宣言されたメソッド BasicListUI
convertRowToY, convertYToRow, createFocusListener, createListDataListener, createListSelectionListener, createMouseInputListener, createPropertyChangeListener, getBaseline, getBaselineResizeBehavior, getCellBounds, getPreferredSize, getRowHeight, indexToLocation, installDefaults, installKeyboardActions, installListeners, installUI, locationToIndex, maybeUpdateLayoutState, paint, paintCell, selectNextIndex, selectPreviousIndex, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateLayoutState修飾子と型メソッド説明protected intconvertRowToY(int row) 指定された行の原点のJList相対Y座標、または行が無効な場合は -1を返します。protected intconvertYToRow(int y0) JListの相対座標を、現在のレイアウトに基づいて、それを含む行に変換します。protected FocusListenerFocusListenerのインスタンスを返します。protected ListDataListener必要に応じて、モデルによってJListsに追加されるListDataListenerのインスタンスを作成します。protected ListSelectionListener必要に応じてselectionModelによってJListsに追加されるListSelectionHandlerのインスタンスを作成します。protected MouseInputListenerMouseInputListenerを実装するデリゲートを作成します。protected PropertyChangeListenerinstallUI()によってJListに追加されるPropertyChangeHandlerのインスタンスを作成します。intgetBaseline(JComponent c, int width, int height) ベースラインを返します。サイズの変化に合わせてコンポーネントのベースラインがどのように変化するかを示す列挙を返します。getCellBounds(JList<?> list, int index1, int index2) 2つのインデックスで指定されたセルの範囲を示す、指定されたリストの座標系内の境界矩形を返します。リストのpreferredSizeはレイアウト方向によって決まります。protected intgetRowHeight(int row) 現在のレイアウトに基づいて、指定された行の高さを返します。indexToLocation(JList<?> list, int index) リストの座標系内の、指定された項目の特定のJList内の原点を返します。protected voidリストのプロパティ(フォント、フォアグラウンド、およびバックグラウンドなど)を初期化して、CellRendererPaneを追加します。protected voidBasicListUIが関連付けられているJList上のキーボード・バインディングを登録します。protected voidJList、そのモデル、およびそのselectionModelのリスナーを作成およびインストールします。voidinstallDefaults()、installListeners()、およびinstallKeyboardActions()を順番に呼び出して、this.listを初期化します。intlocationToIndex(JList<?> list, Point location) リストの座標系内の特定の位置にもっとも近い、指定されたJList内のセル・インデックスを返します。protected voidupdateLayoutStateNeededがゼロでなければ、updateLayoutState()を呼び出してupdateLayoutStateNeededをリセットします。voidpaint(Graphics g, JComponent c) GraphicsオブジェクトclipRectと交差する行をペイントします。protected voidpaintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer<Object> cellRenderer, ListModel<Object> dataModel, ListSelectionModel selModel, int leadIndex) リスト・セルをペイント: 関連する状態をコンピュートし、"ラバー・スタンプ"セル・レンダラ・コンポーネントを取得し、CellRendererPaneを使用してペイントします。protected void前の行を選択して、それを強制的に可視にします。protected void前の行を選択して、それを強制的に可視にします。protected void明示的にオーバーライドされていないリスト・プロパティをnullに設定します。protected voidinstallKeyboardActionsからインストールされたキーボード・アクションの登録を解除します。protected voidJList、そのモデル、およびそのselectionModelからリスナーを削除します。voiduninstallListeners()、uninstallKeyboardActions()、およびuninstallDefaults()を順番に呼び出して、this.listの初期化を解除します。protected voidcellHeight (またはcellHeights)およびcellWidthの値を、現在のフォントと、fixedCellWidth、fixedCellHeight、およびprototypeCellValueの現在の値を基にして計算し直します。クラスで宣言されたメソッド ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize修飾子と型メソッド説明booleancontains(JComponent c, int x, int y) 指定された x,yの位置が、指定されたコンポーネントのLook & Feel定義の形状内にある場合は、trueを返します。getAccessibleChild(JComponent c, int i) オブジェクトのi番目のAccessibleの子を返します。intオブジェクト内のアクセシビリティ対応の子の数を返します。指定されたコンポーネントの、Look & Feelに適した最大サイズを返します。指定されたコンポーネントの、Look & Feelに適した最小サイズを返します。クラスオブジェクトで宣言されたメソッド
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であるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
-
コンストラクタの詳細
-
SynthListUI
public SynthListUI()SynthListUIを構築します。
-
-
メソッドの詳細
-
createUI
public static ComponentUI createUI(JComponent list) 指定されたコンポーネントの新しいUIオブジェクトを作成します。- パラメータ:
list- UIオブジェクトを作成するコンポーネント- 戻り値:
- UIオブジェクト
-
update
public void update(Graphics g, JComponent c) このUI委譲に、指定されたコンポーネントを再ペイントするよう通知します。 このメソッドは、コンポーネントの背景をペイントし、BasicListUI.paint(Graphics, JComponent)メソッドを呼び出します。一般に、このメソッドはサブクラスによってオーバーライドする必要はありません。 すべてのLook & Feelの描画コードを
paintメソッドに入れるようにしてください。- オーバーライド:
update、クラスComponentUI- パラメータ:
g- ペイントに使用されるGraphicsオブジェクトc- ペイントされるコンポーネント- 関連項目:
-
paintBorder
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) ボーダーをペイントします。- 定義:
paintBorder、インタフェースSynthUI- パラメータ:
context- コンポーネント・コンテキストg- ペイントされるGraphicsx- X座標y- Y座標w- ボーダーの幅h- ボーダーの高さ
-
propertyChange
public void propertyChange(PropertyChangeEvent e) バウンド・プロパティの変更時に呼び出されます。- 定義:
propertyChange、インタフェースPropertyChangeListener- パラメータ:
e- イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。
-
getContext
public SynthContext getContext(JComponent c) 指定されたコンポーネントのコンテキストを返します。- 定義:
getContext、インタフェースSynthUI- パラメータ:
c- SynthContextを要求するコンポーネント。- 戻り値:
- コンポーネントを記述するSynthContext。
-