public class DefaultCellEditor extends AbstractCellEditor implements TableCellEditor, TreeCellEditor
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。1.4以降、すべてのJavaBeans(tm)用の長期間の格納サポートがjava.beansパッケージに追加されています。XMLEncoderを参照してください。
| 修飾子と型 | クラスと説明 |
|---|---|
protected class |
DefaultCellEditor.EditorDelegate
protected
EditorDelegateクラス。 |
| 修飾子と型 | フィールドと説明 |
|---|---|
protected int |
clickCountToStart
編集開始に必要なクリック数を指定する整数です。
|
protected DefaultCellEditor.EditorDelegate |
delegate
CellEditorから送信されるすべてのメソッドを処理する委譲クラスです。 |
protected JComponent |
editorComponent
編集中のSwingコンポーネントです。
|
changeEvent, listenerList| コンストラクタと説明 |
|---|
DefaultCellEditor(JCheckBox checkBox)
チェックボックスを使う
DefaultCellEditorオブジェクトを構築します。 |
DefaultCellEditor(JComboBox comboBox)
コンボボックスを使う
DefaultCellEditorオブジェクトを構築します。 |
DefaultCellEditor(JTextField textField)
テキスト・フィールドを使う
DefaultCellEditorを構築します。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
void |
cancelCellEditing()
CellEditorからのメッセージをdelegateに転送します。 |
Object |
getCellEditorValue()
CellEditorからのメッセージをdelegateに転送します。 |
int |
getClickCountToStart()
編集を開始するために必要なクリック数を返します。
|
Component |
getComponent()
エディタ・コンポーネントへの参照を返します。
|
Component |
getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
TableCellEditorインタフェースを実装します。 |
Component |
getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
TreeCellEditorインタフェースを実装します。 |
boolean |
isCellEditable(EventObject anEvent)
CellEditorからのメッセージをdelegateに転送します。 |
void |
setClickCountToStart(int count)
編集を開始するために必要なクリック数を指定します。
|
boolean |
shouldSelectCell(EventObject anEvent)
CellEditorからのメッセージをdelegateに転送します。 |
boolean |
stopCellEditing()
CellEditorからのメッセージをdelegateに転送します。 |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCellEditorListener, removeCellEditorListenerprotected JComponent editorComponent
protected DefaultCellEditor.EditorDelegate delegate
CellEditorから送信されるすべてのメソッドを処理する委譲クラスです。protected int clickCountToStart
clickCountToStartがゼロとして定義されている場合でも、クリックが発生するまでは開始されません。@ConstructorProperties(value="component") public DefaultCellEditor(JTextField textField)
DefaultCellEditorを構築します。textField - JTextFieldオブジェクトpublic DefaultCellEditor(JCheckBox checkBox)
DefaultCellEditorオブジェクトを構築します。checkBox - JCheckBoxオブジェクトpublic DefaultCellEditor(JComboBox comboBox)
DefaultCellEditorオブジェクトを構築します。comboBox - JComboBoxオブジェクトpublic Component getComponent()
Componentpublic void setClickCountToStart(int count)
count - 編集を開始するために必要なクリック数を指定する整数値getClickCountToStart()public int getClickCountToStart()
public Object getCellEditorValue()
CellEditorからのメッセージをdelegateに転送します。getCellEditorValue、インタフェース: CellEditorDefaultCellEditor.EditorDelegate.getCellEditorValue()public boolean isCellEditable(EventObject anEvent)
CellEditorからのメッセージをdelegateに転送します。isCellEditable、インタフェース: CellEditorisCellEditable、クラス: AbstractCellEditoranEvent - イベント・オブジェクトDefaultCellEditor.EditorDelegate.isCellEditable(EventObject)public boolean shouldSelectCell(EventObject anEvent)
CellEditorからのメッセージをdelegateに転送します。shouldSelectCell、インタフェース: CellEditorshouldSelectCell、クラス: AbstractCellEditoranEvent - イベント・オブジェクトDefaultCellEditor.EditorDelegate.shouldSelectCell(EventObject)public boolean stopCellEditing()
CellEditorからのメッセージをdelegateに転送します。stopCellEditing、インタフェース: CellEditorstopCellEditing、クラス: AbstractCellEditorDefaultCellEditor.EditorDelegate.stopCellEditing()public void cancelCellEditing()
CellEditorからのメッセージをdelegateに転送します。cancelCellEditing、インタフェース: CellEditorcancelCellEditing、クラス: AbstractCellEditorDefaultCellEditor.EditorDelegate.cancelCellEditing()public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
TreeCellEditorインタフェースを実装します。getTreeCellEditorComponent、インタフェース: TreeCellEditortree - エディタに編集を要求しているJTree。このパラメータはnullも可value - 編集されるセル値isSelected - セルをハイライトで描画する場合はtrueexpanded - ノードが展開されている場合はtrueleaf - ノードが葉ノードの場合はtruerow - 編集中のノードの行インデックスpublic Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
TableCellEditorインタフェースを実装します。getTableCellEditorComponent、インタフェース: TableCellEditortable - エディタに編集を要求しているJTable。nullも可value - 編集されるセル値。値を解釈および描画する方法はエディタによって異なる。たとえば、値が文字列「true」の場合は、文字列として描画されるか、チェック済のチェック・ボックスとして描画される。nullも有効な値isSelected - セルがハイライトで描画されている場合はtruerow - 編集されるセルの行column - 編集されるセルの列 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright© 1993, 2014, Oracle and/or its affiliates. All rights reserved.