pt.moredata.widgets.table
Class WidgetDelegate

java.lang.Object
  extended bypt.moredata.widgets.table.WidgetDelegate
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CheckBoxDelegate, ComboBoxDelegate, DataDelegate, FieldDelegate, TextAreaDelegate, TextFieldDelegate

public abstract class WidgetDelegate
extends java.lang.Object
implements java.io.Serializable

Description of the Class

Author:
aricardo
See Also:
Serialized Form

Field Summary
protected  CellProperties cellPropertiesEditor
          Description of the Field
protected  CellProperties cellPropertiesRenderer
          Description of the Field
protected  javax.swing.JComponent editorComponent
          Description of the Field
protected  boolean validated
          Description of the Field
 
Constructor Summary
WidgetDelegate()
          Constructor for the Delegate object
WidgetDelegate(javax.swing.JComponent _editorComponent, javax.swing.JComponent _rendererComponent)
          Constructor for the Delegate object
 
Method Summary
 void addAfterEditListener(AfterEditListener l)
          Adds a feature to the AfterEditListener attribute of the Delegate object
 void addCellChangeListener(CellChangeListener l)
          Adds a feature to the CellChangeListener attribute of the Delegate object
 void addFocusListener(java.awt.event.FocusListener l)
          Adds a feature to the FocusListener attribute of the Delegate object
 void addKeyListener(java.awt.event.KeyListener l)
          Adds a feature to the KeyListener attribute of the Delegate object
 void addTableListener(TableListener l)
          Adds a feature to the TableListener attribute of the Delegate object
 boolean afterCheckIt()
          Aqui pode-se aproveitar para por outras coisas após as validações
 void cancelCellEditing()
          Description of the Method
 java.lang.String checkIt(int row, int column)
          Este método deve ser aproveitado para correr as rotinas de validaçoes devolvendo uma mensagem se houver erros ou null senão houver erros
abstract  java.lang.Object getCellEditorValue()
          Não implementado
 CellProperties[] getCellProperties()
          Gets the cellProperties attribute of the Delegate object
 int getCurrentColumn()
          Gets the currentColumn attribute of the Delegate object
 int getCurrentRow()
          Gets the currentRow attribute of the Delegate object
 javax.swing.JComponent getEditorComponent()
          Devolve o editor usado como editor
 boolean getFirstTime()
          Gets the firstTime attribute of the Delegate object
 boolean getFocusGained()
          Gets the focusGained attribute of the Delegate object
 javax.swing.JComponent getRendererComponent()
          Devolve o editor usado como renderer
 boolean getValidated()
          Gets the validated attribute of the Delegate object
 boolean isCellEditable(java.util.EventObject anEvent)
          Se a Celula é editavel
 void prepareEditor(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Preparação antes de executar o editor
 void prepareRenderer(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
          Preparação antes de devolver o renderer
 void removeAfterEditListener(AfterEditListener l)
          Description of the Method
 void removeCellChangeListener(CellChangeListener l)
          Description of the Method
 void removeFocusListener(java.awt.event.FocusListener l)
          Description of the Method
 void removeKeyListener(java.awt.event.KeyListener l)
          Description of the Method
 void removeTableListener(TableListener l)
          Description of the Method
 void setCellEditorProperties(CellProperties properties)
          Sets the cellEditorProperties attribute of the Delegate object
 void setCellProperties(CellProperties properties)
          Sets the cellProperties attribute of the Delegate object
 void setCellRendererProperties(CellProperties properties)
          Sets the cellRendererProperties attribute of the Delegate object
 void setCurrentColumn(int cc)
          Sets the currentColumn attribute of the Delegate object
 void setCurrentRow(int cr)
          Sets the currentRow attribute of the Delegate object
 void setEditorComponent(javax.swing.JComponent componente)
          Define componente a ser utilizado pelo editor
abstract  void setEditorValue(java.lang.Object x)
          Não implementado.
 void setFirstTime(boolean _firstTime)
          Sets the firstTime attribute of the Delegate object
 void setFocusGained(boolean _focusGained)
          Sets the focusGained attribute of the Delegate object
 void setRendererComponent(javax.swing.JComponent component)
          Define componente a ser utilizado pelo renderer
abstract  void setRendererValue(java.lang.Object x)
          Não implementado.
 void setValidated(boolean _validated)
          Sets the validated attribute of the Delegate object
 boolean startCellEditing(java.util.EventObject anEvent)
          Description of the Method
 boolean stopCellEditing()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editorComponent

protected javax.swing.JComponent editorComponent
Description of the Field


validated

protected boolean validated
Description of the Field


cellPropertiesEditor

protected CellProperties cellPropertiesEditor
Description of the Field


cellPropertiesRenderer

protected CellProperties cellPropertiesRenderer
Description of the Field

Constructor Detail

WidgetDelegate

public WidgetDelegate()
Constructor for the Delegate object


WidgetDelegate

public WidgetDelegate(javax.swing.JComponent _editorComponent,
                      javax.swing.JComponent _rendererComponent)
Constructor for the Delegate object

Parameters:
_editorComponent - Description of the Parameter
_rendererComponent - Description of the Parameter
Method Detail

setCellProperties

public void setCellProperties(CellProperties properties)
Sets the cellProperties attribute of the Delegate object

Parameters:
properties - The new cellProperties value

setCellEditorProperties

public void setCellEditorProperties(CellProperties properties)
Sets the cellEditorProperties attribute of the Delegate object

Parameters:
properties - The new cellEditorProperties value

setCellRendererProperties

public void setCellRendererProperties(CellProperties properties)
Sets the cellRendererProperties attribute of the Delegate object

Parameters:
properties - The new cellRendererProperties value

setFirstTime

public void setFirstTime(boolean _firstTime)
Sets the firstTime attribute of the Delegate object

Parameters:
_firstTime - The new firstTime value

getFirstTime

public boolean getFirstTime()
Gets the firstTime attribute of the Delegate object

Returns:
The firstTime value

setFocusGained

public void setFocusGained(boolean _focusGained)
Sets the focusGained attribute of the Delegate object

Parameters:
_focusGained - The new focusGained value

getFocusGained

public boolean getFocusGained()
Gets the focusGained attribute of the Delegate object

Returns:
The focusGained value

getCellProperties

public CellProperties[] getCellProperties()
Gets the cellProperties attribute of the Delegate object

Returns:
The cellProperties value

setValidated

public void setValidated(boolean _validated)
Sets the validated attribute of the Delegate object

Parameters:
_validated - The new validated value

getValidated

public boolean getValidated()
Gets the validated attribute of the Delegate object

Returns:
The validated value

getCellEditorValue

public abstract java.lang.Object getCellEditorValue()
Não implementado

Returns:
The cellEditorValue value

setEditorValue

public abstract void setEditorValue(java.lang.Object x)
Não implementado.

Parameters:
x - The new editorValue value

setRendererValue

public abstract void setRendererValue(java.lang.Object x)
Não implementado.

Parameters:
x - The new rendererValue value

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Se a Celula é editavel

Parameters:
anEvent - Description of the Parameter
Returns:
The cellEditable value

startCellEditing

public boolean startCellEditing(java.util.EventObject anEvent)
Description of the Method

Parameters:
anEvent - Description of the Parameter
Returns:
Description of the Return Value

stopCellEditing

public boolean stopCellEditing()
Description of the Method

Returns:
Description of the Return Value

checkIt

public java.lang.String checkIt(int row,
                                int column)
Este método deve ser aproveitado para correr as rotinas de validaçoes devolvendo uma mensagem se houver erros ou null senão houver erros

Parameters:
row - Description of the Parameter
column - Description of the Parameter
Returns:
Description of the Return Value

afterCheckIt

public boolean afterCheckIt()
Aqui pode-se aproveitar para por outras coisas após as validações

Returns:
Description of the Return Value

cancelCellEditing

public void cancelCellEditing()
Description of the Method


prepareEditor

public void prepareEditor(javax.swing.JTable table,
                          java.lang.Object value,
                          boolean isSelected,
                          int row,
                          int column)
Preparação antes de executar o editor

Parameters:
table - Description of the Parameter
value - Description of the Parameter
isSelected - Description of the Parameter
row - Description of the Parameter
column - Description of the Parameter

prepareRenderer

public void prepareRenderer(javax.swing.JTable table,
                            java.lang.Object value,
                            boolean isSelected,
                            boolean hasFocus,
                            int row,
                            int column)
Preparação antes de devolver o renderer

Parameters:
table - Description of the Parameter
value - Description of the Parameter
isSelected - Description of the Parameter
hasFocus - Description of the Parameter
row - Description of the Parameter
column - Description of the Parameter

setEditorComponent

public void setEditorComponent(javax.swing.JComponent componente)
Define componente a ser utilizado pelo editor

Parameters:
componente - The new editorComponent value

getEditorComponent

public javax.swing.JComponent getEditorComponent()
Devolve o editor usado como editor

Returns:
The editorComponent value

setRendererComponent

public void setRendererComponent(javax.swing.JComponent component)
Define componente a ser utilizado pelo renderer

Parameters:
component - The new rendererComponent value

getRendererComponent

public javax.swing.JComponent getRendererComponent()
Devolve o editor usado como renderer

Returns:
The rendererComponent value

getCurrentColumn

public int getCurrentColumn()
Gets the currentColumn attribute of the Delegate object

Returns:
The currentColumn value

setCurrentColumn

public void setCurrentColumn(int cc)
Sets the currentColumn attribute of the Delegate object

Parameters:
cc - The new currentColumn value

getCurrentRow

public int getCurrentRow()
Gets the currentRow attribute of the Delegate object

Returns:
The currentRow value

setCurrentRow

public void setCurrentRow(int cr)
Sets the currentRow attribute of the Delegate object

Parameters:
cr - The new currentRow value

addAfterEditListener

public void addAfterEditListener(AfterEditListener l)
Adds a feature to the AfterEditListener attribute of the Delegate object

Parameters:
l - The feature to be added to the AfterEditListener attribute

removeAfterEditListener

public void removeAfterEditListener(AfterEditListener l)
Description of the Method

Parameters:
l - Description of the Parameter

addKeyListener

public void addKeyListener(java.awt.event.KeyListener l)
Adds a feature to the KeyListener attribute of the Delegate object

Parameters:
l - The feature to be added to the KeyListener attribute

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener l)
Description of the Method

Parameters:
l - Description of the Parameter

addTableListener

public void addTableListener(TableListener l)
Adds a feature to the TableListener attribute of the Delegate object

Parameters:
l - The feature to be added to the TableListener attribute

removeTableListener

public void removeTableListener(TableListener l)
Description of the Method

Parameters:
l - Description of the Parameter

addCellChangeListener

public void addCellChangeListener(CellChangeListener l)
Adds a feature to the CellChangeListener attribute of the Delegate object

Parameters:
l - The feature to be added to the CellChangeListener attribute

removeCellChangeListener

public void removeCellChangeListener(CellChangeListener l)
Description of the Method

Parameters:
l - Description of the Parameter

addFocusListener

public void addFocusListener(java.awt.event.FocusListener l)
Adds a feature to the FocusListener attribute of the Delegate object

Parameters:
l - The feature to be added to the FocusListener attribute

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener l)
Description of the Method

Parameters:
l - Description of the Parameter