org.springframework.richclient.text
Class TextComponentInterceptor

java.lang.Object
  extended by org.springframework.richclient.form.builder.support.AbstractFormComponentInterceptor
      extended by org.springframework.richclient.text.TextComponentInterceptor
All Implemented Interfaces:
FormComponentInterceptor
Direct Known Subclasses:
SelectAllFormComponentInterceptorFactory.SelectAllFormComponentInterceptor, TextCaretFormComponentInterceptorFactory.TextCaretComponentInterceptor

public abstract class TextComponentInterceptor
extends AbstractFormComponentInterceptor

Abstract base class for FormComponentInterceptors that work on JTextComponents.

Author:
Peter De Bruycker

Constructor Summary
TextComponentInterceptor()
           
 
Method Summary
protected  JTextComponent getTextComponent(JComponent component)
          Converts the given component to a JTextComponent.
 void processComponent(String propertyName, JComponent component)
          Perform some kind of processing on the component.
protected abstract  void processComponent(String propertyName, JTextComponent textComponent)
          Process the text component.
 
Methods inherited from class org.springframework.richclient.form.builder.support.AbstractFormComponentInterceptor
getFormModel, getInnerComponent, processLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextComponentInterceptor

public TextComponentInterceptor()
Method Detail

processComponent

public final void processComponent(String propertyName,
                                   JComponent component)
Description copied from interface: FormComponentInterceptor
Perform some kind of processing on the component.

Specified by:
processComponent in interface FormComponentInterceptor
Overrides:
processComponent in class AbstractFormComponentInterceptor
Parameters:
propertyName - the name of the property that the component is for
component - the component to process

processComponent

protected abstract void processComponent(String propertyName,
                                         JTextComponent textComponent)
Process the text component.

Parameters:
propertyName - the name of the property
textComponent - the text component

getTextComponent

protected JTextComponent getTextComponent(JComponent component)
Converts the given component to a JTextComponent. This can be a simple cast if the component is already a text component, or an embedded component (for example a JSpinner).

This method is protected, and can be overridden when necessary.

Parameters:
component - the component
Returns:
a JTextComponent, or null


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.