Package org.jdesktop.swingx.plaf
Class TextUIWrapper.DefaultWrapper
java.lang.Object
org.jdesktop.swingx.plaf.TextUIWrapper<PromptTextUI>
org.jdesktop.swingx.plaf.TextUIWrapper.DefaultWrapper
- Enclosing class:
- TextUIWrapper<UI extends TextUI>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdesktop.swingx.plaf.TextUIWrapper
TextUIWrapper.DefaultWrapper -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanreplaceUIIfNeeded(JTextComponent textComponent) Every time the UI needs to be replaced we also need to make sure, that all buddy components are also in the component hierarchy.wrapUI(JTextComponent textComponent) Creates a newPromptTextUI, which wraps the giventextComponents UI.Methods inherited from class org.jdesktop.swingx.plaf.TextUIWrapper
getDefaultWrapper, getWrapperClass, install, uninstall
-
Method Details
-
wrapUI
Creates a new
PromptTextUI, which wraps the giventextComponents UI.If the UI is already of type
PromptTextUI, it will be returned. IftextComponentis of typeJXSearchFielda newSearchFieldUIobject will be returned. IftextComponentis of typeJTextFieldorJTextAreaaBuddyTextFieldUIorPromptTextAreaUIwill be returned, respectively. If the UI is of any other type, aIllegalArgumentExceptionwill be thrown.- Specified by:
wrapUIin classTextUIWrapper<PromptTextUI>- Parameters:
textComponent- wrap this components UI- Returns:
- a
PromptTextUIwhich wraps thetextComponents UI.
-
replaceUIIfNeeded
Every time the UI needs to be replaced we also need to make sure, that all buddy components are also in the component hierarchy. (That's becauseBasicTextUIremoves all our buddies upon UI changes).- Overrides:
replaceUIIfNeededin classTextUIWrapper<PromptTextUI>- Returns:
trueif the UI has been replaced
-