pt.moredata.widgets.table
Class CellEditor

java.lang.Object
  extended bypt.moredata.widgets.table.CellEditor
All Implemented Interfaces:
javax.swing.CellEditor, java.io.Serializable, javax.swing.table.TableCellEditor

public class CellEditor
extends java.lang.Object
implements javax.swing.table.TableCellEditor, java.io.Serializable

Version:
1.1 18/05/00
Author:
Luis Medalhas, Sergio Ferreira
See Also:
Serialized Form

Field Summary
protected  java.util.Vector afterFieldListenerList
           
protected  java.util.Vector cellChangeListenerList
           
 boolean cellEditable
           
protected  java.util.Vector cellListenerList
           
protected  javax.swing.event.ChangeEvent changeEvent
           
protected  int clickCountToStart
           
protected  int currentColumn
           
protected  int currentRow
           
protected  WidgetDelegate delegate
           
protected  javax.swing.JComponent editorComponent
           
protected  boolean focusGained
           
protected  java.util.Vector keyListenerList
           
protected  javax.swing.event.EventListenerList listenerList
          Event listeners
protected  long maxValue
           
protected  long minValue
           
protected  java.lang.Object oldValue
           
protected  boolean validated
           
 
Constructor Summary
CellEditor()
           
CellEditor(WidgetDelegate _delegate)
          Aceita um delegate
CellEditor(WidgetDelegate _delegate, CellProperties _properties)
           
 
Method Summary
 void addAfterEditListener(AfterEditListener l)
           
 void addAllListeners()
          Adiciona listeners ao delegate
 void addCellChangeListener(CellChangeListener l)
           
 void addCellEditorListener(javax.swing.event.CellEditorListener l)
           
 void addKeyListener(java.awt.event.KeyListener l)
           
 void addTableListener(TableListener l)
           
 void cancelCellEditing()
           
protected  void fireEditingCanceled()
           
protected  void fireEditingStopped()
           
 java.lang.Object getCellEditorValue()
          Devolve o valor da celula
 int getClickCountToStart()
          Apresenta-nos o numeros de cliques que é necessário para a edição
 java.awt.Component getComponent()
          Devolve a referencia ao componente de edição
 WidgetDelegate getDelegate()
           
 boolean getEditable()
           
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
 boolean isCellEditable(java.util.EventObject anEvent)
          Verifica se é editável
 void removeAfterEditListener(AfterEditListener l)
           
 void removeCellChangeListener(CellChangeListener l)
           
 void removeCellEditorListener(javax.swing.event.CellEditorListener l)
           
 void removeKeyListener(java.awt.event.KeyListener l)
           
 void removeTableListener(TableListener l)
           
 void setCellEditorProperties(WidgetDelegate _delegate, CellProperties _properties)
           
 void setClickCountToStart(int count)
          Numero de cliques que é necessário para começar a edição
 void setEditable(boolean editable)
           
 boolean shouldSelectCell(java.util.EventObject anEvent)
           
 boolean stopCellEditing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerList

protected javax.swing.event.EventListenerList listenerList
Event listeners


changeEvent

protected transient javax.swing.event.ChangeEvent changeEvent

oldValue

protected java.lang.Object oldValue

currentColumn

protected int currentColumn

currentRow

protected int currentRow

maxValue

protected long maxValue

minValue

protected long minValue

afterFieldListenerList

protected java.util.Vector afterFieldListenerList

keyListenerList

protected java.util.Vector keyListenerList

cellListenerList

protected java.util.Vector cellListenerList

cellChangeListenerList

protected java.util.Vector cellChangeListenerList

cellEditable

public boolean cellEditable

focusGained

protected boolean focusGained

editorComponent

protected javax.swing.JComponent editorComponent

delegate

protected WidgetDelegate delegate

clickCountToStart

protected int clickCountToStart

validated

protected boolean validated
Constructor Detail

CellEditor

public CellEditor()

CellEditor

public CellEditor(WidgetDelegate _delegate)
Aceita um delegate


CellEditor

public CellEditor(WidgetDelegate _delegate,
                  CellProperties _properties)
Method Detail

setCellEditorProperties

public void setCellEditorProperties(WidgetDelegate _delegate,
                                    CellProperties _properties)

setEditable

public void setEditable(boolean editable)

getEditable

public boolean getEditable()

addAllListeners

public void addAllListeners()
Adiciona listeners ao delegate


getComponent

public java.awt.Component getComponent()
Devolve a referencia ao componente de edição

Returns:
the editor Component

setClickCountToStart

public void setClickCountToStart(int count)
Numero de cliques que é necessário para começar a edição

Parameters:
count - an int especifica o nº de cliques
See Also:
getClickCountToStart()

getClickCountToStart

public int getClickCountToStart()
Apresenta-nos o numeros de cliques que é necessário para a edição


getCellEditorValue

public java.lang.Object getCellEditorValue()
Devolve o valor da celula

Specified by:
getCellEditorValue in interface javax.swing.CellEditor

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Verifica se é editável

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

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()

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor

addAfterEditListener

public void addAfterEditListener(AfterEditListener l)

removeAfterEditListener

public void removeAfterEditListener(AfterEditListener l)

addKeyListener

public void addKeyListener(java.awt.event.KeyListener l)

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener l)

addTableListener

public void addTableListener(TableListener l)

removeTableListener

public void removeTableListener(TableListener l)

addCellChangeListener

public void addCellChangeListener(CellChangeListener l)

removeCellChangeListener

public void removeCellChangeListener(CellChangeListener l)

getDelegate

public WidgetDelegate getDelegate()