!
! Copyright (c) 2011 Sage Software. All Rights Reserved
! ** @Author fmcguirk
! ** @Date 2011.11.29 49 at 01:19:57 PM EST
!
DEF CLASS "toolWithConfig"
like "AbstractActionListener"
! ** Description to be used for tool in the Contributed Tools list
local theDescription$="Example - With config"
/*
! ** This method will be called when the action is triggered from the contributed
! ** tools menu.
! **
! ** @param inActionEventID This is a reference to %JavaClass(eventmanager/ExtCommand)%
*/
function actionPerformed(inActionEventID) do_ActionPerformed
/*
! ** This method will be called when the 'Configure' action is triggered from
! ** the contributed tools menu. The code required to implement the configuration
! ** action is normally implemented as one or more NOMADS panels that this
! ** method will execute.
! **
! ** @param inActionEventID This is a reference to %JavaClass(eventmanager/ExtCommand)%
*/
function configPerformed(inActionEventID) do_ConfigPerformed
/*
! ** This method is used to check whether a configuration action has been implemented.
! ** @returns True (1) if a configuration action has been implemented
*/
function hasConfigAction() hasConfigAction
end def
do_ActionPerformed:
enter IExtCommand
! write a message to the 'Console' view
aReq=new("pvxrequestclient")
aReq'print("Contributed tool: " + _obj'getDescription$() + " - Action completed.")
drop object aReq
! Finally, use standard ProvideX message box to display message
msgbox "Example contributed tool - my work is complete.","Message" /* *SC-OK* */
return
do_ConfigPerformed:
! write a message to the 'Console' view
aReq=new("pvxrequestclient")
aReq'print("Contributed tool: " + _obj'getDescription$() + " - Configuration completed.")
drop object aReq
msgbox "Example contributed tool - configuration is complete.","Message" /* *SC-OK* */
return
hasConfigAction:
! Return True (1) since the configuration action logic has been implemented
return 1
end