edu.columbia.coms6901.pingtel.pingim
Class ActionListener

java.lang.Object
  |
  +--edu.columbia.coms6901.pingtel.pingim.ActionListener
All Implemented Interfaces:
com.pingtel.xpressa.awt.event.PActionListener

public class ActionListener
extends java.lang.Object
implements com.pingtel.xpressa.awt.event.PActionListener

Listens for form actions. Includes methods for returning action codes.

Author:
Micah Sherr

Field Summary
private  com.pingtel.xpressa.awt.form.SimpleListForm formList
          used if form is a SimpleListForm
private  com.pingtel.xpressa.awt.form.SimpleTextForm formText
          used if form is a SimpleTextForm
private  int iFormType
          the form type for this form
private static int SIMPLELISTFORM
          form is of type SimpleListForm
private static int SIMPLETEXTFORM
          form is of type SimpleTextForm
private  java.lang.String sState
          the state of the form (e.g., text or list)
 
Constructor Summary
ActionListener(com.pingtel.xpressa.awt.form.SimpleListForm form)
          Instantiates new ActionListener
ActionListener(com.pingtel.xpressa.awt.form.SimpleTextForm form)
          Instantiates new ActionListener
 
Method Summary
 void actionEvent(com.pingtel.xpressa.awt.event.PActionEvent event)
          Called whenever a form action is performed
 java.lang.String getLastAction()
          Gets the action code of the last action performed
 int getSelectedIndex()
          Gets selection index for list forms.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

SIMPLETEXTFORM

private static final int SIMPLETEXTFORM
form is of type SimpleTextForm

SIMPLELISTFORM

private static final int SIMPLELISTFORM
form is of type SimpleListForm

sState

private java.lang.String sState
the state of the form (e.g., text or list)

formText

private com.pingtel.xpressa.awt.form.SimpleTextForm formText
used if form is a SimpleTextForm

formList

private com.pingtel.xpressa.awt.form.SimpleListForm formList
used if form is a SimpleListForm

iFormType

private int iFormType
the form type for this form
Constructor Detail

ActionListener

public ActionListener(com.pingtel.xpressa.awt.form.SimpleTextForm form)
Instantiates new ActionListener
Parameters:
form - A PingTel SimpleTextForm

ActionListener

public ActionListener(com.pingtel.xpressa.awt.form.SimpleListForm form)
Instantiates new ActionListener
Parameters:
form - A PingTel SimpleListForm
Method Detail

actionEvent

public void actionEvent(com.pingtel.xpressa.awt.event.PActionEvent event)
Called whenever a form action is performed
Specified by:
actionEvent in interface com.pingtel.xpressa.awt.event.PActionListener
Parameters:
PActionEvent - The event

getLastAction

public java.lang.String getLastAction()
Gets the action code of the last action performed
Returns:
The action code of the last action performed

getSelectedIndex

public int getSelectedIndex()
Gets selection index for list forms. That is, retrieves the option number (starting with 0 and going down) of the option chosen.
Returns:
The selected index