Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.gopas.rt.gui.table
Class GenericCellEditor  view GenericCellEditor download GenericCellEditor.java

java.lang.Object
  extended bycom.gopas.rt.gui.table.AbstractCellEditor
      extended bycom.gopas.rt.gui.table.GenericCellEditor
All Implemented Interfaces:
java.awt.event.ActionListener, javax.swing.CellEditor, java.util.EventListener, java.awt.event.ItemListener, com.gopas.rt.util.RT, com.gopas.rt.gui.RtGui, java.io.Serializable, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
Direct Known Subclasses:
CheckBoxCellEditor, EnumCellEditor, SelectCellEditor, TextCellEditor

public abstract class GenericCellEditor
extends AbstractCellEditor
implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor, java.awt.event.ActionListener, java.awt.event.ItemListener, java.io.Serializable, com.gopas.rt.util.RT, com.gopas.rt.gui.RtGui

The generic editor class for all table and tree cells editors.

Version:
$Revision: 1.1.1.1 $

Field Summary
protected  com.gopas.rt.gui.Appearance appear
           
protected  int clickCountToStart
           
protected  javax.swing.JComponent editorComponent
           
protected  com.gopas.rt.model.UIFormat format
           
protected  boolean isEditing
          HACK: flag for monitoring the editing process
 int row
          public as an implementation artifact - do not use
 javax.swing.JTable table
          public as an implementation artifact - do not use
protected  java.lang.Object value
           
 
Fields inherited from class com.gopas.rt.gui.table.AbstractCellEditor
listenerList
 
Fields inherited from interface com.gopas.rt.util.RT
ACTIVATED_STATUS, ALL, CREATED_STATUS, DEBUG, DEBUG_MSG, DEBUG_ON, DEFAULT_DEBUG_LEVEL, DEFAULT_ERROR_LEVEL, DEFAULT_VERBOSE_LEVEL, DEFAULT_WARNING_LEVEL, DELETED_STATUS, EASY_ERR, ERROR_MSG, FORCE, GENERAL, MODIFIED_STATUS, nl, NORMAL_ERR, NOTE, NOTE1, NOTE2, NOTE3, NOTE4, NOTE5, OFF, PROGRESS, SEVERE_ERR, VERBOSE_MSG, WARNING, WARNING_MSG
 
Fields inherited from interface com.gopas.rt.gui.RtGui
calculatedFG, centerAppearance, defaultBG, defaultFG, emptyBorder, errorBG, focusBorder, focusColor, FORM_BUTTON, FORM_CHECKBOX, FORM_DATUM, FORM_DEFAULT, FORM_ENUM, FORM_INT, FORM_MONEY, FORM_NUMBER, FORM_PASSWORD, FORM_PATH, FORM_PROZENT, FORM_REF, FORM_SELECT, FORM_TYPES, invalidBG, invalidFG, isValidGuiFG, leftAppearance, readonlyBG, readonlyFG, rightAppearance, selectedBG, selectedFG, unconnectedBG
 
Constructor Summary
GenericCellEditor()
          Standard constructor, NOOP
GenericCellEditor(javax.swing.JComponent comp)
          Constructor with parameter for editor component.
GenericCellEditor(javax.swing.JComponent comp, com.gopas.rt.model.UIFormat format, com.gopas.rt.gui.Appearance appear)
          Constructor with parameter for editor component.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is invoked when an action occurs.
 void cancelCellEditing()
          implements javax.swing.CellEditor
 java.lang.Object getCellEditorValue()
          Get the current value hold in the cell editor.
 int getClickCountToStart()
          clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent.
 javax.swing.JComponent getComponent()
          Returns the a reference to the editor component.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          implements javax.swing.table.TableCellEditor
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
          implements javax.swing.tree.TreeCellEditor
 boolean isCellEditable(java.util.EventObject anEvent)
          implements javax.swing.CellEditor
 void itemStateChanged(java.awt.event.ItemEvent e)
          This method is called when an item's state is changed.
 void setClickCountToStart(int count)
          Specifies the number of clicks needed to start editing.
 void setEditorComponent(javax.swing.JComponent comp)
          Set the editor component used for editing.
 void setValue(java.lang.Object value)
          set the editor value
 boolean shouldSelectCell(java.util.EventObject anEvent)
          implements javax.swing.CellEditor
 boolean stopCellEditing()
          implements javax.swing.CellEditor
 
Methods inherited from class com.gopas.rt.gui.table.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, 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
 

Field Detail

format

protected com.gopas.rt.model.UIFormat format

appear

protected com.gopas.rt.gui.Appearance appear

value

protected java.lang.Object value

editorComponent

protected javax.swing.JComponent editorComponent

clickCountToStart

protected int clickCountToStart

table

public javax.swing.JTable table
public as an implementation artifact - do not use


row

public int row
public as an implementation artifact - do not use


isEditing

protected boolean isEditing
HACK: flag for monitoring the editing process

Constructor Detail

GenericCellEditor

public GenericCellEditor()
Standard constructor, NOOP


GenericCellEditor

public GenericCellEditor(javax.swing.JComponent comp)
Constructor with parameter for editor component.


GenericCellEditor

public GenericCellEditor(javax.swing.JComponent comp,
                         com.gopas.rt.model.UIFormat format,
                         com.gopas.rt.gui.Appearance appear)
Constructor with parameter for editor component.

Method Detail

setEditorComponent

public void setEditorComponent(javax.swing.JComponent comp)
Set the editor component used for editing.


getComponent

public javax.swing.JComponent getComponent()
Returns the a reference to the editor component.


setClickCountToStart

public void setClickCountToStart(int count)
Specifies the number of clicks needed to start editing.


getClickCountToStart

public int getClickCountToStart()
clickCountToStart controls the number of clicks required to start editing if the event passed to isCellEditable() or startCellEditing() is a MouseEvent.


getCellEditorValue

public java.lang.Object getCellEditorValue()
Get the current value hold in the cell editor. (implements javax.swing.CellEditor)

Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Overrides:
getCellEditorValue in class AbstractCellEditor

setValue

public void setValue(java.lang.Object value)
set the editor value


isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
implements javax.swing.CellEditor

Specified by:
isCellEditable in interface javax.swing.CellEditor
Overrides:
isCellEditable in class AbstractCellEditor

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
implements javax.swing.CellEditor

Specified by:
shouldSelectCell in interface javax.swing.CellEditor
Overrides:
shouldSelectCell in class AbstractCellEditor

stopCellEditing

public boolean stopCellEditing()
implements javax.swing.CellEditor

Specified by:
stopCellEditing in interface javax.swing.CellEditor
Overrides:
stopCellEditing in class AbstractCellEditor

cancelCellEditing

public void cancelCellEditing()
implements javax.swing.CellEditor

Specified by:
cancelCellEditing in interface javax.swing.CellEditor
Overrides:
cancelCellEditing in class AbstractCellEditor

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)
implements javax.swing.tree.TreeCellEditor

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

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
implements javax.swing.table.TableCellEditor

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

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from interface: java.awt.event.ActionListener
This method is invoked when an action occurs.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Description copied from interface: java.awt.event.ItemListener
This method is called when an item's state is changed.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener