|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--javax.swing.plaf.ListUI | +--javax.swing.plaf.basic.BasicListUI
ListUI の Windows Look & Feel による実装です。
内部クラスの概要 | |
class |
BasicListUI.FocusHandler
この内部クラスは public とマークされますが、これはコンパイラのバグが原因です。 |
class |
BasicListUI.ListDataHandler
installUI の実行時、および JList.model プロパティが変更された時に JList モデルに追加される ListDataListener です。 |
class |
BasicListUI.ListSelectionHandler
installUI の実行時、および JList.selectionModel プロパティが変更された時に JLists の選択範囲モデルに追加される ListSelectionListener です。 |
class |
BasicListUI.MouseInputHandler
JList でのマウス入力、およびフォーカス処理を行います。 |
class |
BasicListUI.PropertyChangeHandler
PropertyChangeListener は、installUI の実行時に JList に追加されます。 |
フィールドの概要 | |
protected int |
cellHeight
|
protected int[] |
cellHeights
|
protected static int |
cellRendererChanged
|
protected int |
cellWidth
|
protected static int |
fixedCellHeightChanged
|
protected static int |
fixedCellWidthChanged
|
protected FocusListener |
focusListener
|
protected static int |
fontChanged
|
protected JList |
list
|
protected ListDataListener |
listDataListener
|
protected ListSelectionListener |
listSelectionListener
|
protected static int |
modelChanged
|
protected MouseInputListener |
mouseInputListener
|
protected PropertyChangeListener |
propertyChangeListener
|
protected static int |
prototypeCellValueChanged
|
protected CellRendererPane |
rendererPane
|
protected static int |
selectionModelChanged
|
protected int |
updateLayoutStateNeeded
|
コンストラクタの概要 | |
BasicListUI()
|
メソッドの概要 | |
protected int |
convertRowToY(int row)
指定された行の原点の相対 Y 座標を返します。 |
protected int |
convertYToRow(int y0)
JList の相対座標を、現在のレイアウトを基にして、座標を含む行に変換します。 |
protected FocusListener |
createFocusListener()
|
protected ListDataListener |
createListDataListener()
モデルによって必要に応じて JList に追加される、ListDataListener のインスタンスを生成します。 |
protected ListSelectionListener |
createListSelectionListener()
selectionModel によって必要に応じて JList に追加される、ListSelectionHandler のインスタンスを生成します。 |
protected MouseInputListener |
createMouseInputListener()
MouseInputListener を実装する委譲を作成します。 |
protected PropertyChangeListener |
createPropertyChangeListener()
installUI() によって JList に追加される、PropertyChangeHandler のインスタンスを生成します。 |
static ComponentUI |
createUI(JComponent list)
BasicListUI の新しいインスタンスを返します。 |
Rectangle |
getCellBounds(JList list,
int index1,
int index2)
指定された項目の JList 座標における境界を返します。 |
Dimension |
getMaximumSize(JComponent c)
|
Dimension |
getMinimumSize(JComponent c)
|
Dimension |
getPreferredSize(JComponent c)
リストの最適なサイズは、行の高さの合計と、セルの最大幅です。 |
protected int |
getRowHeight(int row)
現在のレイアウトで、指定された行の高さを返します。 |
Point |
indexToLocation(JList list,
int index)
指定された項目の JList 座標における原点を返します。 |
protected void |
installDefaults()
JList のプロパティ (フォント、フォアグラウンド、およびバックグラウンドなど) を初期化して、CellRendererPane を追加します。 |
protected void |
installKeyboardActions()
上矢印キー、および下矢印キーのキーボードアクションを登録します。 |
protected void |
installListeners()
JList、そのモデル、および selectionModel のリスナーを作成およびインストールします。 |
void |
installUI(JComponent c)
installDefaults() 、installListeners() 、および installKeyboardActions() を順に呼び出して、this.list を初期化します。 |
int |
locationToIndex(JList list,
Point location)
JList の座標上の点をその位置にあるセルのインデックスに変換します。 |
protected void |
maybeUpdateLayoutState()
updateLayoutStateNeeded がゼロでなければ、updateLayoutState() を呼び出して updateLayoutStateNeeded をリセットします。 |
void |
paint(Graphics g,
JComponent c)
Graphics オブジェクトの clipRect と交差する行をペイントします。 |
protected void |
paintCell(Graphics g,
int row,
Rectangle rowBounds,
ListCellRenderer cellRenderer,
ListModel dataModel,
ListSelectionModel selModel,
int leadIndex)
List のセルを 1 つペイントします。 |
protected void |
selectNextIndex()
1 つ後の行を選択して、それを強制的に可視にします。 |
protected void |
selectPreviousIndex()
1 つ前の行を選択して、それを強制的に可視にします。 |
protected void |
uninstallDefaults()
null に明示的にオーバーライドされていない JList のプロパティを設定します。 |
protected void |
uninstallKeyboardActions()
上矢印キー、および下矢印キーのキーボードアクションの登録を解除します。 |
protected void |
uninstallListeners()
JList、そのモデル、および selectionModel のリスナーを削除します。 |
void |
uninstallUI(JComponent c)
uninstallListeners() 、uninstallKeyboardActions() 、および uninstallDefaults() を順に呼び出して、this.list の初期化を解除します。 |
protected void |
updateLayoutState()
cellHeight (または cellHeights) および cellWidth の値を、現在のフォントと、fixedCellWidth、fixedCellHeight、および prototypeCellValue の現在の値を基にして計算し直します。 |
クラス javax.swing.plaf.ComponentUI から継承したメソッド |
contains, getAccessibleChild, getAccessibleChildrenCount, update |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected JList list
protected CellRendererPane rendererPane
protected FocusListener focusListener
protected MouseInputListener mouseInputListener
protected ListSelectionListener listSelectionListener
protected ListDataListener listDataListener
protected PropertyChangeListener propertyChangeListener
protected int[] cellHeights
protected int cellHeight
protected int cellWidth
protected int updateLayoutStateNeeded
protected static final int modelChanged
protected static final int selectionModelChanged
protected static final int fontChanged
protected static final int fixedCellWidthChanged
protected static final int fixedCellHeightChanged
protected static final int prototypeCellValueChanged
protected static final int cellRendererChanged
コンストラクタの詳細 |
public BasicListUI()
メソッドの詳細 |
protected void paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
paint(java.awt.Graphics, javax.swing.JComponent)
public void paint(Graphics g, JComponent c)
ComponentUI
内の paint
paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int)
public Dimension getPreferredSize(JComponent c)
ComponentUI
内の getPreferredSize
c
- JList コンポーネントpublic Dimension getMinimumSize(JComponent c)
ComponentUI
内の getMinimumSize
getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
ComponentUI
内の getMaximumSize
getPreferredSize(javax.swing.JComponent)
protected void selectPreviousIndex()
installKeyboardActions()
,
JList.ensureIndexIsVisible(int)
protected void selectNextIndex()
installKeyboardActions()
,
JList.ensureIndexIsVisible(int)
protected void installKeyboardActions()
selectPreviousIndex()
,
selectNextIndex()
,
installUI(javax.swing.JComponent)
protected void uninstallKeyboardActions()
selectPreviousIndex()
,
selectNextIndex()
,
installUI(javax.swing.JComponent)
protected void installListeners()
installUI(javax.swing.JComponent)
,
uninstallListeners()
protected void uninstallListeners()
uninstallUI(javax.swing.JComponent)
,
installListeners()
protected void installDefaults()
uninstallDefaults()
,
installUI(javax.swing.JComponent)
,
CellRendererPane
protected void uninstallDefaults()
installDefaults()
,
uninstallUI(javax.swing.JComponent)
,
CellRendererPane
public void installUI(JComponent c)
installDefaults()
、installListeners()
、および installKeyboardActions()
を順に呼び出して、this.list
を初期化します。ComponentUI
内の installUI
installDefaults()
,
installListeners()
,
installKeyboardActions()
public void uninstallUI(JComponent c)
uninstallListeners()
、uninstallKeyboardActions()
、および uninstallDefaults()
を順に呼び出して、this.list
の初期化を解除します。this.list は null に設定されます。ComponentUI
内の uninstallUI
uninstallListeners()
,
uninstallKeyboardActions()
,
uninstallDefaults()
public static ComponentUI createUI(JComponent list)
public int locationToIndex(JList list, Point location)
ListUI
の記述: ListUI
内の locationToIndex
ListUI.locationToIndex(javax.swing.JList, java.awt.Point)
public Point indexToLocation(JList list, int index)
ListUI
の記述: ListUI
内の indexToLocation
ListUI.indexToLocation(javax.swing.JList, int)
public Rectangle getCellBounds(JList list, int index1, int index2)
ListUI
の記述: ListUI
内の getCellBounds
ListUI.getCellBounds(javax.swing.JList, int, int)
protected int getRowHeight(int row)
convertYToRow(int)
,
convertRowToY(int)
,
updateLayoutState()
protected int convertYToRow(int y0)
getRowHeight(int)
,
updateLayoutState()
protected int convertRowToY(int row)
getRowHeight(int)
,
updateLayoutState()
protected void maybeUpdateLayoutState()
updateLayoutState()
protected void updateLayoutState()
maybeUpdateLayoutState()
protected MouseInputListener createMouseInputListener()
class MyListUI extends BasicListUI { protected MouseInputListener createMouseInputListener() { return new MyMouseInputHandler(); } public class MyMouseInputHandler extends MouseInputHandler { public void mouseMoved(MouseEvent e) { // do some extra work when the mouse moves super.mouseMoved(e); } } }
BasicListUI.MouseInputHandler
,
installUI(javax.swing.JComponent)
protected FocusListener createFocusListener()
protected ListSelectionListener createListSelectionListener()
class MyListUI extends BasicListUI { protected ListSelectionListener createListSelectionListener() { return new MySelectionListener(); } public class MySelectionListener extends ListSelectionHandler { public void valueChanged(ListSelectionEvent e) { // do some extra work when the selection changes super.valueChange(e); } } }
BasicListUI.ListSelectionHandler
,
installUI(javax.swing.JComponent)
protected ListDataListener createListDataListener()
class MyListUI extends BasicListUI { protected ListDataListener createListDataListener() { return new MyListDataListener(); } public class MyListDataListener extends ListDataHandler { public void contentsChanged(ListDataEvent e) { // do some extra work when the models contents change super.contentsChange(e); } } }
ListDataListener
,
JList.getModel()
,
installUI(javax.swing.JComponent)
protected PropertyChangeListener createPropertyChangeListener()
class MyListUI extends BasicListUI { protected PropertyChangeListener createPropertyChangeListener() { return new MyPropertyChangeListener(); } public class MyPropertyChangeListener extends PropertyChangeHandler { public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { // do some extra work when the model changes } super.propertyChange(e); } } }
PropertyChangeListener
,
installUI(javax.swing.JComponent)
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.