VdexReload 1.1.3 API

uk.ac.reload.editor.gui
Class ReloadAttributeEditor.AttributeCellEditor

java.lang.Object
  extended byjavax.swing.AbstractCellEditor
      extended byuk.ac.reload.editor.gui.ReloadAttributeEditor.AttributeCellEditor
All Implemented Interfaces:
javax.swing.CellEditor, java.util.EventListener, java.awt.event.ItemListener, java.io.Serializable, javax.swing.table.TableCellEditor
Enclosing class:
ReloadAttributeEditor

protected class ReloadAttributeEditor.AttributeCellEditor
extends javax.swing.AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.ItemListener

A Cell Editor Wrapper that delegates to two default Cell Editors

See Also:
Serialized Form

Field Summary
protected  javax.swing.JComboBox comboBox
           
protected  javax.swing.DefaultCellEditor comboEditor
           
protected  javax.swing.DefaultCellEditor editor
           
protected  javax.swing.DefaultCellEditor textEditor
           
protected  javax.swing.JTextField textField
           
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
Constructor Summary
ReloadAttributeEditor.AttributeCellEditor()
          Default constructor
 
Method Summary
 java.lang.Object getCellEditorValue()
          Get the value contained in the editor.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Sets an initial value for the editor.
 void itemStateChanged(java.awt.event.ItemEvent ie)
          Invoked when a ComboBox item has been selected or deselected by the user.
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 
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, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Field Detail

comboBox

protected javax.swing.JComboBox comboBox

textField

protected javax.swing.JTextField textField

editor

protected javax.swing.DefaultCellEditor editor

textEditor

protected javax.swing.DefaultCellEditor textEditor

comboEditor

protected javax.swing.DefaultCellEditor comboEditor
Constructor Detail

ReloadAttributeEditor.AttributeCellEditor

public ReloadAttributeEditor.AttributeCellEditor()
Default constructor

Method Detail

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent ie)
Invoked when a ComboBox item has been selected or deselected by the user.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
ie - a semantic event which indicates that an item was selected or deselected

getCellEditorValue

public java.lang.Object getCellEditorValue()
Get the value contained in the editor.

Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Returns:
the value contained in the editor

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called. Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor
Parameters:
table - the JTable that is asking the editor to edit; can be null
value - the value of the cell to be edited; it is up to the specific editor to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
isSelected - true if the cell is to be rendered with highlighting
row - the row of the cell being edited
column - the column of the cell being edited

VdexReload 1.1.3 API