com.las2witsml
Class JComponentCellEditor

java.lang.Object
  |
  +--com.las2witsml.JComponentCellEditor
All Implemented Interfaces:
javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor

public class JComponentCellEditor
extends java.lang.Object
implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor, java.io.Serializable

Title: JComponentCellEditor.java Description: A class for displaying combo boxes in a table Copyright: Copyright (c) 2006 Company: Satyam Computer Services Ltd.

See Also:
Serialized Form

Field Summary
protected  javax.swing.event.ChangeEvent ceChangeEvent
           
protected  javax.swing.event.EventListenerList elListenerList
           
protected  javax.swing.JComponent jcContainer
           
protected  javax.swing.JComponent jcEditorComponent
           
 
Constructor Summary
JComponentCellEditor()
           
 
Method Summary
 void addCellEditorListener(javax.swing.event.CellEditorListener l)
          Method addCellEditorListener This method Adds a listener to the list that's notified when the editor stops, or cancels editing.
 void cancelCellEditing()
          Method cancelCellEditing This method Tells the editor to cancel editing and not accept any partially edited value
protected  void fireEditingCanceled()
          Method fireEditingStopped This method cancels the editing of a cell
protected  void fireEditingStopped()
          Method fireEditingStopped This method stops the editing of a cell
 java.lang.Object getCellEditorValue()
          Method getCellEditorValue This method Returns the value contained in the editor
 java.awt.Component getComponent()
          Method getComponent This method returns the component
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Method fireEditingStopped This method Sets an initial value for the editor
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
          Method fireEditingStopped This method Sets an initial value for the editor
 boolean isCellEditable(java.util.EventObject anEvent)
          Method isCellEditable This method asks the editor if it can start editing using anEvent
 void removeCellEditorListener(javax.swing.event.CellEditorListener l)
          Method removeCellEditorListener This method Removes a listener from the list that's notified
 boolean shouldSelectCell(java.util.EventObject anEvent)
          Method shouldSelectCell This method returns true if the editing cell should be selected, false otherwise
 boolean stopCellEditing()
          Method stopCellEditing This method tells the editor to stop editing and accept any partially edited value as the value of the editor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elListenerList

protected javax.swing.event.EventListenerList elListenerList

ceChangeEvent

protected transient javax.swing.event.ChangeEvent ceChangeEvent

jcEditorComponent

protected javax.swing.JComponent jcEditorComponent

jcContainer

protected javax.swing.JComponent jcContainer
Constructor Detail

JComponentCellEditor

public JComponentCellEditor()
Method Detail

getComponent

public java.awt.Component getComponent()
Method getComponent This method returns the component

Returns:
jcEditorComponent

getCellEditorValue

public java.lang.Object getCellEditorValue()
Method getCellEditorValue This method Returns the value contained in the editor

Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Returns:
jcEditorComponent

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Method isCellEditable This method asks the editor if it can start editing using anEvent

Specified by:
isCellEditable in interface javax.swing.CellEditor
Returns:
jcEditorComponent

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
Method shouldSelectCell This method returns true if the editing cell should be selected, false otherwise

Specified by:
shouldSelectCell in interface javax.swing.CellEditor
Returns:
true

stopCellEditing

public boolean stopCellEditing()
Method stopCellEditing This method tells the editor to stop editing and accept any partially edited value as the value of the editor

Specified by:
stopCellEditing in interface javax.swing.CellEditor
Returns:
true

cancelCellEditing

public void cancelCellEditing()
Method cancelCellEditing This method Tells the editor to cancel editing and not accept any partially edited value

Specified by:
cancelCellEditing in interface javax.swing.CellEditor
Returns:
true

addCellEditorListener

public void addCellEditorListener(javax.swing.event.CellEditorListener l)
Method addCellEditorListener This method Adds a listener to the list that's notified when the editor stops, or cancels editing.

Specified by:
addCellEditorListener in interface javax.swing.CellEditor
Returns:
void

removeCellEditorListener

public void removeCellEditorListener(javax.swing.event.CellEditorListener l)
Method removeCellEditorListener This method Removes a listener from the list that's notified

Specified by:
removeCellEditorListener in interface javax.swing.CellEditor
Returns:
void

fireEditingStopped

protected void fireEditingStopped()
Method fireEditingStopped This method stops the editing of a cell

Returns:
void

fireEditingCanceled

protected void fireEditingCanceled()
Method fireEditingStopped This method cancels the editing of a cell

Returns:
void

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
Method fireEditingStopped This method Sets an initial value for the editor

Specified by:
getTreeCellEditorComponent in interface javax.swing.tree.TreeCellEditor
Returns:
void

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Method fireEditingStopped This method Sets an initial value for the editor

Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor
Returns:
void