pt.moredata.dataentry.action
Class AbstractAction

java.lang.Object
  extended bypt.moredata.dataentry.action.AbstractAction
All Implemented Interfaces:
Action
Direct Known Subclasses:
CreateNewRecordAction, DefaultCancelAction, DeleteAllRecordsAction, DeleteRecordAction, ExportToCSVFileAction, InsertSingleRecordAction, NavigateAction, PrintSwingReportAction, SaveSingleRecordAction, SimpleQueryAction, UpdateDataSourceAction, UpdateSingleRecordAction

public abstract class AbstractAction
extends java.lang.Object
implements Action

Company MoreData

Version:
$Revision: 1.3 $
Author:
pcarmo

Field Summary
protected  DataEntry _dataEntry
          Entrada de dados.
protected  boolean _enable
          Indica se a acao esta activada ou não.
protected  ActionEvent _event
          Evento associado a accao.
protected  RequestMessage _request
          Pedido efectuadao a classe que implementa a acção.
 
Constructor Summary
AbstractAction()
           
 
Method Summary
abstract  ResponseMessage actionPerformed()
          Invoked when an action occurs.
 ResponseMessage actionPerformed(ActionEvent event)
          Invoked when an action occurs.
protected  void init(ActionEvent event)
          Description of the Method
 boolean isEnabled()
          Returns the enabled state of the Action.
 void setEnabled(boolean b)
          Sets the enabled state of the Action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_enable

protected boolean _enable
Indica se a acao esta activada ou não.


_request

protected RequestMessage _request
Pedido efectuadao a classe que implementa a acção.


_dataEntry

protected DataEntry _dataEntry
Entrada de dados.


_event

protected ActionEvent _event
Evento associado a accao.

Constructor Detail

AbstractAction

public AbstractAction()
Method Detail

init

protected void init(ActionEvent event)
Description of the Method

Parameters:
event - Description of the Parameter

actionPerformed

public ResponseMessage actionPerformed(ActionEvent event)
Invoked when an action occurs.

Specified by:
actionPerformed in interface Action
Parameters:
event - Description of the Parameter
Returns:
Description of the Return Value

actionPerformed

public abstract ResponseMessage actionPerformed()
Invoked when an action occurs.

Returns:
A menssagem de resposta contendo o resultado da accao executada.

isEnabled

public boolean isEnabled()
Returns the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method.

Specified by:
isEnabled in interface Action
Returns:
true if this Action is enabled

setEnabled

public void setEnabled(boolean b)
Sets the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method. If the value has changed, a PropertyChangeEvent is sent to listeners.

Specified by:
setEnabled in interface Action
Parameters:
b - true to enable this Action, false to disable it