org.opensubsystems.patterns.thickclient.application.swt
Class TextModificationSelectionAdapter

java.lang.Object
  extended by org.eclipse.swt.events.SelectionAdapter
      extended by org.opensubsystems.patterns.thickclient.application.swt.DelegatingSelectionAdapter
          extended by org.opensubsystems.patterns.thickclient.application.swt.TextModificationSelectionAdapter
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class TextModificationSelectionAdapter
extends DelegatingSelectionAdapter

Adapter used to process selection events that result in text modification.

Version:
$Id: TextModificationSelectionAdapter.java,v 1.3 2007/01/07 06:14:15 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.1 2006/02/16 14:41:03 bastafidli

Field Summary
static java.lang.String FUNCTION_CLEAR
          Clear last character from the text.
static java.lang.String FUNCTION_CLEAR_ALL
          Clear all characters from the text.
protected  org.eclipse.swt.widgets.Text m_destination
          Text control being monitored and possibly modified by this adapter.
protected  ModificationListener m_listener
          Listener, which will be notified when the content is changed.
protected  TextProcessor m_processor
          Text processor, which should be utilized to preprocess text when the text is modified.
protected  java.lang.String m_strFunction
          What function to perform, either a character to add or one of the FUNCTION_XXX controls.
 
Constructor Summary
TextModificationSelectionAdapter(TextProcessor processor, ModificationListener listener, java.lang.String strFunction, org.eclipse.swt.widgets.Text destination)
          Construct new adapter processing events from the control.
 
Method Summary
 void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
          
 
Methods inherited from class org.opensubsystems.patterns.thickclient.application.swt.DelegatingSelectionAdapter
widgetDefaultSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNCTION_CLEAR

public static final java.lang.String FUNCTION_CLEAR
Clear last character from the text.

See Also:
Constant Field Values

FUNCTION_CLEAR_ALL

public static final java.lang.String FUNCTION_CLEAR_ALL
Clear all characters from the text.

See Also:
Constant Field Values

m_processor

protected TextProcessor m_processor
Text processor, which should be utilized to preprocess text when the text is modified.


m_listener

protected ModificationListener m_listener
Listener, which will be notified when the content is changed.


m_strFunction

protected java.lang.String m_strFunction
What function to perform, either a character to add or one of the FUNCTION_XXX controls.


m_destination

protected org.eclipse.swt.widgets.Text m_destination
Text control being monitored and possibly modified by this adapter.

Constructor Detail

TextModificationSelectionAdapter

public TextModificationSelectionAdapter(TextProcessor processor,
                                        ModificationListener listener,
                                        java.lang.String strFunction,
                                        org.eclipse.swt.widgets.Text destination)
Construct new adapter processing events from the control.

Parameters:
processor - - text processor, which should be utilized to preprocess text when the text is modified.
listener - - listener to call when some modification has happened
strFunction - - what function to perform, either a character to add or one of the FUNCTION_XXX controls.
destination - - text control being monitored and possibly modified by this adapter.
Method Detail

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener
Overrides:
widgetSelected in class org.eclipse.swt.events.SelectionAdapter


Copyright © 2003 - 2006 OpenSubsystems s.r.o.