org.gcn.plinguaplugin.wizardCommonComponents
Class AbstractTextListener

java.lang.Object
  extended by org.gcn.plinguaplugin.wizardCommonComponents.AbstractTextListener
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.ModifyListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
AbstractFileListener, ExistingResourceListener

public abstract class AbstractTextListener
extends java.lang.Object
implements org.eclipse.swt.events.ModifyListener

This class checks if the text in a text field matches the expected pattern and updates its specific WizardPage instance wizard field

Author:
Manuel Garcia-Quismondo-Fernandez

Constructor Summary
AbstractTextListener(org.eclipse.jface.wizard.WizardPage paramPage, org.eclipse.swt.widgets.Text textField)
          Creates a new AbstractTextListener instance which contains the text field given as parameter
 
Method Summary
abstract  java.lang.String getFieldName()
          Gets the text field name
protected  org.eclipse.jface.wizard.WizardPage getParamPage()
           
 void modifyText(org.eclipse.swt.events.ModifyEvent e)
          Reads the text field, checks it and updates the instance page
abstract  void setField(java.lang.String field)
          Sets the text field content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTextListener

public AbstractTextListener(org.eclipse.jface.wizard.WizardPage paramPage,
                            org.eclipse.swt.widgets.Text textField)
Creates a new AbstractTextListener instance which contains the text field given as parameter

Parameters:
paramPage - the page which the text field belongs to
textField - the text field to listen for changes
Method Detail

getParamPage

protected org.eclipse.jface.wizard.WizardPage getParamPage()

modifyText

public void modifyText(org.eclipse.swt.events.ModifyEvent e)
Reads the text field, checks it and updates the instance page

Specified by:
modifyText in interface org.eclipse.swt.events.ModifyListener
Parameters:
e - the event which triggered the listener

getFieldName

public abstract java.lang.String getFieldName()
Gets the text field name

Returns:
the text field name

setField

public abstract void setField(java.lang.String field)
Sets the text field content

Parameters:
field - the text field content to set