org.springframework.richclient.text
Class TextCaretFormComponentInterceptorFactory
java.lang.Object
org.springframework.richclient.text.TextCaretFormComponentInterceptorFactory
- All Implemented Interfaces:
- FormComponentInterceptorFactory
public class TextCaretFormComponentInterceptorFactory
- extends Object
- implements FormComponentInterceptorFactory
If the text is set in a text component, the caret position is set to the end of the
text.
This means the beginning of the text will not be visible if the text is too long to fit
in the text component.
This FormComponentInterceptor
"fixes" this behaviour by listening to
Document
updates, and setting the caret position to 0 (i.e. the
beginning of the text) if the text is updated when the text component doesn't have the
focus (i.e. the text is not changed by the user).
- Author:
- Peter De Bruycker
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextCaretFormComponentInterceptorFactory
public TextCaretFormComponentInterceptorFactory()
getInterceptor
public FormComponentInterceptor getInterceptor(FormModel formModel)
- Create a new
TextCaretFixerComponentInterceptor
instance
- Specified by:
getInterceptor
in interface FormComponentInterceptorFactory
- Returns:
- the interceptor
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.