Package  Use  Tree  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

 

jve.generated
Class SwingDataServiceAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byjve.generated.SwingDataServiceAction

All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, IActionBinder, IDataSourceService, java.io.Serializable


public class SwingDataServiceAction
extends javax.swing.AbstractAction
implements IActionBinder, IDataSourceService

This action will execute a data source service with a single argument. The argument is specified by a ObjectReference.

See Also:
Serialized Form


Nested Class Summary
 

Nested classes inherited from class jve.generated.IActionBinder
IActionBinder.ActionBinderEvent, IActionBinder.ActionBinderListener
 

Field Summary
protected  IActionBinder.ActionBinderEvent actionBinderEvent
           
protected  java.util.List actionBinderListeners
           
protected  int actionType
           
protected  DataSourceService dsData
           
protected  java.lang.String fdebugMsg
           
 

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 

Fields inherited from interface jve.generated.IActionBinder
ENABLE_DISABLE_ACTION, ENABLE_ENABLE_ACTION, ENABLE_NO_ACTION
 

Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 

Constructor Summary
SwingDataServiceAction()
           
 

Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Respond to an action, by invoking the data source service.
 void addActionBinderListener(IActionBinder.ActionBinderListener l)
          Add a new ActionBinderListner to the listener list.
protected  void fireActionPerformed()
          Fire an actionPeformed event.
protected  void fireAfterActionPerformed()
          Send a afterActionPerformed event to all of the registered ActionBinderListeners.
protected  void fireBeforeActionPerformed()
          Send a beforeActionPerformed event to all of the registered ActionBinderListeners.
 int getActionType()
          Get the type of the action
 IDataSource getDataSource()
          Get the Data Source associated with this action.
 ObjectReference getServiceArgument()
          Get the argument used as the parameter for the service call.
 java.lang.String getServiceSignature()
          Get the service signature for this action.
 void removeActionBinderListener(IActionBinder.ActionBinderListener l)
          Remove an existing ActionBinderListener from the listener list.
 void setActionType(int type)
          Set the way the action binder will drive its enable state.
 void setDataSource(IDataSource datasource)
          Set the Data Source associated with this action.
 void setEnabled(boolean newValue)
          Set the enabled state of the action.
 void setServiceArgument(ObjectReference arg)
          Set the argument for the service call, according to the method signature set with the setService method.
 void setServiceSignature(java.lang.String signature)
          This is the service method signature that is to be use.
 java.lang.String toString()
           
 

Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Methods inherited from interface jve.generated.IActionBinder
isEnabled
 

 

Field Detail

 

 

actionType

protected int actionType


 

 

fdebugMsg

protected java.lang.String fdebugMsg


 

 

actionBinderListeners

protected java.util.List actionBinderListeners


 

 

actionBinderEvent

protected IActionBinder.ActionBinderEvent actionBinderEvent


 

 

dsData

protected DataSourceService dsData

Constructor Detail

 

 

SwingDataServiceAction

public SwingDataServiceAction()

Method Detail

 

 

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

Respond to an action, by invoking the data source service. Before the service is invoked, the registered ActionBinderListners will be notified by the beforeActionPerformed event. After the service call is complete, the registered listeners will be notified by the afterActionPerformed event.

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


 

 

fireActionPerformed

protected void fireActionPerformed()

Fire an actionPeformed event. This will call actionPerformed on all of the service method's arguments.


 

 

fireBeforeActionPerformed

protected void fireBeforeActionPerformed()

Send a beforeActionPerformed event to all of the registered ActionBinderListeners.


 

 

fireAfterActionPerformed

protected void fireAfterActionPerformed()

Send a afterActionPerformed event to all of the registered ActionBinderListeners.


 

 

getServiceSignature

public java.lang.String getServiceSignature()

Description copied from interface: IDataSourceService
Get the service signature for this action.

Specified by:
getServiceSignature in interface IDataSourceService

Returns:
service signature


 

 

setServiceSignature

public void setServiceSignature(java.lang.String signature)

Description copied from interface: IDataSourceService
This is the service method signature that is to be use. It has to be complete including parameter types e.g. getUserRecord(Integer id);

Specified by:
setServiceSignature in interface IDataSourceService

Parameters:
signature - signature


 

 

getDataSource

public IDataSource getDataSource()

Description copied from interface: IDataSourceService
Get the Data Source associated with this action.

Specified by:
getDataSource in interface IDataSourceService

Returns:
The Data Source used for this service


 

 

setDataSource

public void setDataSource(IDataSource datasource)

Description copied from interface: IDataSourceService
Set the Data Source associated with this action.

Specified by:
setDataSource in interface IDataSourceService

Parameters:
datasource - DataSource to use for this service


 

 

getActionType

public int getActionType()

Description copied from interface: IActionBinder
Get the type of the action

Specified by:
getActionType in interface IActionBinder

Returns:
the action type. Will be ENABLE_ENABLE_ACTION, ENABLE_DISABLE_ACTION or ENABLE_NO_ACTION


 

 

setActionType

public void setActionType(int type)

Description copied from interface: IActionBinder
Set the way the action binder will drive its enable state. On ENABLE_ENABLE_ACTION it will be enabled when an its argument property has changed, and vice versa when the actionType is ENABLE_DISABLE_ACTION.

Specified by:
setActionType in interface IActionBinder

Parameters:
type - the action type.


 

 

setServiceArgument

public void setServiceArgument(ObjectReference arg)

Description copied from interface: IDataSourceService
Set the argument for the service call, according to the method signature set with the setService method.

Specified by:
setServiceArgument in interface IDataSourceService

Parameters:
arg - the service argument


 

 

getServiceArgument

public ObjectReference getServiceArgument()

Description copied from interface: IDataSourceService
Get the argument used as the parameter for the service call.

Specified by:
getServiceArgument in interface IDataSourceService

Returns:
argument used for the service


 

 

setEnabled

public void setEnabled(boolean newValue)

Description copied from interface: IActionBinder
Set the enabled state of the action.

Specified by:
setEnabled in interface IActionBinder


 

 

addActionBinderListener

public void addActionBinderListener(IActionBinder.ActionBinderListener l)

Description copied from interface: IActionBinder
Add a new ActionBinderListner to the listener list.

Specified by:
addActionBinderListener in interface IActionBinder

Parameters:
l - the new listener


 

 

removeActionBinderListener

public void removeActionBinderListener(IActionBinder.ActionBinderListener l)

Description copied from interface: IActionBinder
Remove an existing ActionBinderListener from the listener list.

Specified by:
removeActionBinderListener in interface IActionBinder

Parameters:
l - the listener to remove


 

 

toString

public java.lang.String toString()


Package  Use  Tree  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD