com.infoteria.swing.table
Class ButtonTextCellEditor

java.lang.Object
  |
  +--javax.swing.AbstractCellEditor
        |
        +--com.infoteria.swing.table.ButtonTextCellEditor
All Implemented Interfaces:
CellEditor, FontSupport, PropertyEditor, Serializable, TableCellEditor
Direct Known Subclasses:
DatetimePropertyEditor, com.infoteria.swing.table.FilePathCellEditor, HistoryPropertyEditor

public abstract class ButtonTextCellEditor
extends AbstractCellEditor
implements PropertyEditor, FontSupport

テキストエリアの脇に小さなボタンが付随するPropertyEditorです。

See Also:
Serialized Form

Inner Class Summary
protected static class ButtonTextCellEditor.JTextFieldEx
           
 
Field Summary
protected  ButtonTextCellEditor.JTextFieldEx _text
           
protected  Object _value
           
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
ButtonTextCellEditor()
           
 
Method Summary
 void cancelCellEditing()
           
protected abstract  void doButtonAction(EventObject e)
          オーバーライドしてボタンがクリックされた時の処理を記述します。
 void doClick()
          ボタンをクリックします。
 Object getCellEditorValue()
          CellEditorの値を取得します。
 int getClickCountToStart()
           
protected  String getDialogTitle()
          ダイアログを表示する際のタイトルを返します。 デフォルトでは「<プロパティ表示名>の編集」という文字列を返します。
 Font getFont()
           
 Property getProperty()
          Propertyを取得します。
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 String getValueAsString()
          CellEditorの値を文字列で取得します。
 boolean isCellEditable(EventObject anEvent)
           
protected  void setCellEditorValue(Object o)
          CellEditorの値を設定します。
 void setClickCountToStart(int count)
           
 void setFont(Font f)
           
 void setProperty(Property prop)
          Propertyを設定します。
 boolean stopCellEditing()
           
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener, shouldSelectCell
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, removeCellEditorListener, shouldSelectCell
 

Field Detail

_text

protected ButtonTextCellEditor.JTextFieldEx _text

_value

protected Object _value
Constructor Detail

ButtonTextCellEditor

public ButtonTextCellEditor()
Method Detail

getFont

public Font getFont()
Specified by:
getFont in interface FontSupport

setFont

public void setFont(Font f)
Specified by:
setFont in interface FontSupport

setProperty

public void setProperty(Property prop)
Propertyを設定します。
Specified by:
setProperty in interface PropertyEditor

getProperty

public Property getProperty()
Propertyを取得します。

setClickCountToStart

public void setClickCountToStart(int count)

getClickCountToStart

public int getClickCountToStart()

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Specified by:
isCellEditable in interface CellEditor
Overrides:
isCellEditable in class AbstractCellEditor

doButtonAction

protected abstract void doButtonAction(EventObject e)
オーバーライドしてボタンがクリックされた時の処理を記述します。

getCellEditorValue

public Object getCellEditorValue()
CellEditorの値を取得します。
Specified by:
getCellEditorValue in interface CellEditor

getValueAsString

public String getValueAsString()
CellEditorの値を文字列で取得します。

setCellEditorValue

protected void setCellEditorValue(Object o)
CellEditorの値を設定します。

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Specified by:
getTableCellEditorComponent in interface TableCellEditor

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface CellEditor
Overrides:
stopCellEditing in class AbstractCellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface CellEditor
Overrides:
cancelCellEditing in class AbstractCellEditor

doClick

public void doClick()
ボタンをクリックします。

getDialogTitle

protected String getDialogTitle()
ダイアログを表示する際のタイトルを返します。 デフォルトでは「<プロパティ表示名>の編集」という文字列を返します。