ix.iface.ui.table
Class IXDefaultCellEditor
java.lang.Object
ix.iface.ui.table.IXDefaultCellEditor
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.FocusListener, java.util.EventListener, javax.swing.CellEditor, javax.swing.event.CellEditorListener, javax.swing.event.PopupMenuListener, javax.swing.table.TableCellEditor
public class IXDefaultCellEditor
- extends java.lang.Object
- implements java.awt.event.FocusListener, java.awt.event.ActionListener, javax.swing.event.PopupMenuListener, javax.swing.event.CellEditorListener, javax.swing.table.TableCellEditor
A TableCellEditor with a combo box that can re-select the same item.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
editorComponent
protected javax.swing.JComponent editorComponent
clickCountToStart
protected int clickCountToStart
changeEvent
protected transient javax.swing.event.ChangeEvent changeEvent
IXDefaultCellEditor
public IXDefaultCellEditor(IXComboBox comboBox)
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- Overwrite this with your own initialisation if needed, then call this as
the last thing you do.
See HandlerActionEditor for an example.
- Specified by:
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
adjustWidth
public void adjustWidth(IXComboBox jcb,
javax.swing.JTable table,
int col)
getComponent
public java.awt.Component getComponent()
setClickCountToStart
public void setClickCountToStart(int count)
getClickCountToStart
public int getClickCountToStart()
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Specified by:
getCellEditorValue
in interface javax.swing.CellEditor
isCellEditable
public boolean isCellEditable(java.util.EventObject anEvent)
- Specified by:
isCellEditable
in interface javax.swing.CellEditor
shouldSelectCell
public boolean shouldSelectCell(java.util.EventObject anEvent)
- Specified by:
shouldSelectCell
in interface javax.swing.CellEditor
stopCellEditing
public boolean stopCellEditing()
- Specified by:
stopCellEditing
in interface javax.swing.CellEditor
cancelCellEditing
public void cancelCellEditing()
- Specified by:
cancelCellEditing
in interface javax.swing.CellEditor
focusGained
public void focusGained(java.awt.event.FocusEvent fe)
- Specified by:
focusGained
in interface java.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent fe)
- Specified by:
focusLost
in interface java.awt.event.FocusListener
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
popupMenuCanceled
public void popupMenuCanceled(javax.swing.event.PopupMenuEvent pme)
- Specified by:
popupMenuCanceled
in interface javax.swing.event.PopupMenuListener
popupMenuWillBecomeVisible
public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent pme)
- Specified by:
popupMenuWillBecomeVisible
in interface javax.swing.event.PopupMenuListener
popupMenuWillBecomeInvisible
public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent pme)
- Specified by:
popupMenuWillBecomeInvisible
in interface javax.swing.event.PopupMenuListener
editingCanceled
public void editingCanceled(javax.swing.event.ChangeEvent e)
- Specified by:
editingCanceled
in interface javax.swing.event.CellEditorListener
editingStopped
public void editingStopped(javax.swing.event.ChangeEvent e)
- Specified by:
editingStopped
in interface javax.swing.event.CellEditorListener
addCellEditorListener
public void addCellEditorListener(javax.swing.event.CellEditorListener l)
- Specified by:
addCellEditorListener
in interface javax.swing.CellEditor
removeCellEditorListener
public void removeCellEditorListener(javax.swing.event.CellEditorListener l)
- Specified by:
removeCellEditorListener
in interface javax.swing.CellEditor
fireEditingStopped
protected void fireEditingStopped()
fireEditingCanceled
protected void fireEditingCanceled()