|
Last
revision of this document: |
This
is document contains the code for Class
JS_ProjAssist_CommandCenter__ActionHandler.
This class contains
methods that can be called when an action (button-click, mouse-click,
change of text, etc) occurs.
For easy 'cut and paste' ;-)
package
js_projassist.clientframes;
import
java.awt.event.*;
import
js_projassist.clientframes.*;
/**
*
* @author kurt@javascout.biz
*
@date 2006-09-01
*
* @description
*
Methods to process 'events' that occur in
* the
Command Center for the Fat-Client-Application.
* Methods
in this class are all defined as 'static' as there are no persistant
variables.
* Defining the methods as 'static' has the
advantage,
* that the class does not have to be
'constructed'.
*
* @change-log
* when who why
*
--------------------------------------------------------
*
*/
public
class JS_ProjAssist_CommandCenter__ActionHandler
{
/*
*
-------------------------------
* Method to handle Actions
that were triggered by clicking onto JButtons. */
protected
static void handleEvent(JS_ProjAssist_CommandCenter parmCC,
ActionEvent
parmActionEvent){
/*
*
Get the ActionCommand that was attached to the JButton.
*/
String
cmd = parmActionEvent.getActionCommand();
/* Check
which button was clicked and call the appropriate method. */
if
(cmd.equals("btn_Continue"))
{
openBusinessTask(parmCC);
}
}
/*
*
-------------------------------
* Method to get the selected
code for the Business Task out of the entry-field
* and
call the frame with the chosen Business Task. */
private
static void
openBusinessTask(JS_ProjAssist_CommandCenter parmCC){
/*
* Get
the internal code using a combined method that also fills the
parameter-fields.
* Instead of the parameter-fields,
'null'-values are passed to signal the method
* just to
return the internal code. */
String
strInternalCode =
parmCC.structJSBS_XML_Tasks.processParameterFields(parmCC.get_txt_Code(),
null,
null,
null,
null,
null,
null);
/* Check
which button was clicked and call the appropriate method. */
if
(strInternalCode.equals("P"))
{
JS_ProjAssist_Project
frm_JS_ProjAssist_Project
= new
JS_ProjAssist_Project(parmCC);
frm_JS_ProjAssist_Project.setVisible(true);
}
}
}