biz.chitec.quarterback.swing
Class ChatSymbolCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
biz.chitec.quarterback.swing.ChatSymbolCellEditor
- All Implemented Interfaces:
- javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
- public class ChatSymbolCellEditor
- extends javax.swing.DefaultCellEditor
Editor for table cells which uses a JComboBox to select a ChatSymbolHolder entry
The editor works in the same modes as the ChatSymbolTableCellRenderer
- Version:
- $Id: 20df383733969b76916cc6e4219c3fcfd6d48f53 $
- Author:
- cantamen/Dirk Hillbrecht 2005
- See Also:
ChatSymbolTableCellRenderer
,
Serialized Form
Nested classes inherited from class javax.swing.DefaultCellEditor |
javax.swing.DefaultCellEditor.EditorDelegate |
Fields inherited from class javax.swing.DefaultCellEditor |
clickCountToStart, delegate, editorComponent |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Method Summary |
java.lang.Object |
getCellEditorValue()
Returns the selected chat symbol
The symbol is returned either as Integer or as String, depending on how it has been given during invokation
of the editor. |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
Implements the TableCellEditor interface. |
java.awt.Component |
getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
Implements the TreeCellEditor interface. |
void |
setChatSymbolHolder(ChatSymbolHolder cshx,
int[] symbols)
Set the ChatSymbolHolder to use for conversion |
Methods inherited from class javax.swing.DefaultCellEditor |
cancelCellEditing, getClickCountToStart, getComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
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 |
csh
private ChatSymbolHolder csh
mode
private int mode
returnstring
private boolean returnstring
cmb
private javax.swing.JComboBox cmb
cbm
private NumberedStringComboBoxModel cbm
ChatSymbolCellEditor
public ChatSymbolCellEditor(ChatSymbolHolder cshx,
int[] symbols,
int modex)
- Create a table cell editor.
- Parameters:
cshx
- Chat symbols to take as base for representationmodex
- Mode to show chat symbols in.
ChatSymbolCellEditor
public ChatSymbolCellEditor(ChatSymbolHolder cshx,
int[] symbols)
- Create a table cell editor for chat symbols in I18N mode.
- Parameters:
cshx
- Chat symbols to take as base for representation
ChatSymbolCellEditor
public ChatSymbolCellEditor(ChatSymbolHolder cshx)
- Create a table cell editor for chat symbols carrying their own list in I18N mode.
- Parameters:
cshx
- Chat symbols to take as base for representation
setChatSymbolHolder
public void setChatSymbolHolder(ChatSymbolHolder cshx,
int[] symbols)
- Set the ChatSymbolHolder to use for conversion
- Parameters:
cshx
- ChatSymbolHolder for representing data
getTreeCellEditorComponent
public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean isSelected,
boolean expanded,
boolean leaf,
int row)
- Implements the
TreeCellEditor
interface.
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- Implements the
TableCellEditor
interface.
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Returns the selected chat symbol
The symbol is returned either as Integer or as String, depending on how it has been given during invokation
of the editor.