Java プラットフォーム 1.2

javax.swing
クラス DefaultCellEditor

java.lang.Object
  |
  +--javax.swing.DefaultCellEditor

public class DefaultCellEditor
extends Object
implements TableCellEditor, TreeCellEditor, Serializable

テーブルとツリーセルのデフォルトエディタです。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。

関連項目:
直列化された形式

内部クラスの概要
protected  class DefaultCellEditor.EditorDelegate
           
 
フィールドの概要
protected  ChangeEvent changeEvent
           
protected  int clickCountToStart
           
protected  DefaultCellEditor.EditorDelegate delegate
           
protected  JComponent editorComponent
           
protected  EventListenerList listenerList
          イベントリスナーです。
 
コンストラクタの概要
DefaultCellEditor(JCheckBox x)
          チェックボックスを使う DefaultCellEditor オブジェクトを構築します。
DefaultCellEditor(JComboBox x)
          コンボボックスを使う DefaultCellEditor オブジェクトを構築します。
DefaultCellEditor(JTextField x)
          テキストフィールドを使う DefaultCellEditor を構築します。
 
メソッドの概要
 void addCellEditorListener(CellEditorListener l)
           
 void cancelCellEditing()
           
protected  void fireEditingCanceled()
           
protected  void fireEditingStopped()
           
 Object getCellEditorValue()
           
 int getClickCountToStart()
          isCellEditable() または startCellEditing() に渡されるイベントが MouseEvent の場合に、clickCountToStart が編集を開始するのに必要なクリック数を制御します。
 Component getComponent()
          エディタコンポーネントへの参照を返します。
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
 boolean isCellEditable(EventObject anEvent)
           
 void removeCellEditorListener(CellEditorListener l)
           
 void setClickCountToStart(int count)
          編集を開始するために必要なクリック数を指定します。
 boolean shouldSelectCell(EventObject anEvent)
           
 boolean stopCellEditing()
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

listenerList

protected EventListenerList listenerList
イベントリスナーです。

changeEvent

protected transient ChangeEvent changeEvent

editorComponent

protected JComponent editorComponent

delegate

protected DefaultCellEditor.EditorDelegate delegate

clickCountToStart

protected int clickCountToStart
コンストラクタの詳細

DefaultCellEditor

public DefaultCellEditor(JTextField x)
テキストフィールドを使う DefaultCellEditor を構築します。
パラメータ:
x - JTextField オブジェクト

DefaultCellEditor

public DefaultCellEditor(JCheckBox x)
チェックボックスを使う DefaultCellEditor オブジェクトを構築します。
パラメータ:
x - JCheckBox オブジェクト

DefaultCellEditor

public DefaultCellEditor(JComboBox x)
コンボボックスを使う DefaultCellEditor オブジェクトを構築します。
パラメータ:
x - JComboBox オブジェクト
メソッドの詳細

getComponent

public Component getComponent()
エディタコンポーネントへの参照を返します。
戻り値:
エディタコンポーネント

setClickCountToStart

public void setClickCountToStart(int count)
編集を開始するために必要なクリック数を指定します。
パラメータ:
count - 編集を開始するために必要なクリック数を指定する int
関連項目:
getClickCountToStart()

getClickCountToStart

public int getClickCountToStart()
isCellEditable() または startCellEditing() に渡されるイベントが MouseEvent の場合に、clickCountToStart が編集を開始するのに必要なクリック数を制御します。たとえば、JTextField の clickCountToStart はデフォルトで 2 に設定されているので、JTable ではセルの編集を始めるのにユーザはダブルクリックする必要があります。

getCellEditorValue

public Object getCellEditorValue()

isCellEditable

public boolean isCellEditable(EventObject anEvent)

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)

stopCellEditing

public boolean stopCellEditing()

cancelCellEditing

public void cancelCellEditing()

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)

fireEditingStopped

protected void fireEditingStopped()

fireEditingCanceled

protected void fireEditingCanceled()

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
定義:
インタフェース TreeCellEditor 内の getTreeCellEditorComponent

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
定義:
インタフェース TableCellEditor 内の getTableCellEditorComponent

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.