com.partnersoft.modules.inspection.listener
Class BaseListener

java.lang.Object
  extended by com.partnersoft.modules.inspection.listener.BaseListener
Direct Known Subclasses:
CheckBoxScriptListener, PicklistScriptListener, TextFieldScriptListener

public class BaseListener
extends java.lang.Object

Base class for all other Inspection listeners to extend. Contains method to locate field script and fire it. fireScript() should be called from extending listener's event specific method.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Constructor Summary
protected BaseListener(InspectionKit kit, com.partnersoft.gui.GUIForm parent, java.lang.String scriptName)
          Creates a BaseListener object.
 
Method Summary
 void fireScript(java.lang.Object event)
          Checks kit.getModule()'s resources/FieldListeners folder for a script matching the name .bsh.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseListener

protected BaseListener(InspectionKit kit,
                       com.partnersoft.gui.GUIForm parent,
                       java.lang.String scriptName)
Creates a BaseListener object. Entire purpose of object is to populate variables within the fireScript method.

Method Detail

fireScript

public void fireScript(java.lang.Object event)
Checks kit.getModule()'s resources/FieldListeners folder for a script matching the name .bsh. If one is found, it is run with kit, app, module, form, and event variables set within it. form being the com.partnersoft.gui.GUIForm the field this listener is attached to is in, and event being the java.awt.Event that was fired to cause this script to run.

If the a script for this listener cannot be run, it is logged as a warning.

Parameters:
event - - The Event that caused this script to be run. Either a java.awt.event.Event or a javax.swing.event.* type.