symplik.flower
Class Action

java.lang.Object
  extended by symplik.flower.Action

public abstract class Action
extends java.lang.Object

Abstract class for non-textual action between Questions. To create amn Action, you need to subclass of this class and override necessary method for you needs. Put a classAlias in flower.properties for easy referencing in Answer.instance.getA/putA method or nextAction method. Sequence of method invoking:

Version:
$Revision: 3 $
Author:
$Author: Christopher Ho $

Field Summary
static java.lang.String RCS_ID
           
 
Constructor Summary
Action()
           
 
Method Summary
 Message actionMessage()
           
 boolean enterAction()
           
 void execute()
          Put your main logic in this method
 java.lang.String nextAction()
           
 boolean showSystemOutput()
          Override this method to set whether you want to show System.out to screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID
See Also:
Constant Field Values
Constructor Detail

Action

public Action()
Method Detail

enterAction

public boolean enterAction()
Returns:
True if you want to carry on this Action class; False to skip this Action

execute

public void execute()
Put your main logic in this method


actionMessage

public Message actionMessage()
Returns:
Message object which contain textual message after execute has done.

nextAction

public java.lang.String nextAction()
Returns:
Next Action or Question class, in ClassAlias or full-qualified class name, followed by this class.

showSystemOutput

public boolean showSystemOutput()
Override this method to set whether you want to show System.out to screen. For GUI mode only. (Console mode always show System.out).

Returns:
True if you want to display System.out.print() to the screen. Default is False.


Copyright © 2010 Symplik Tech. Co. Ltd. All Rights Reserved.