Class TextUIWrapper<UI extends TextUI>
java.lang.Object
org.jdesktop.swingx.plaf.TextUIWrapper<UI>
- Type Parameters:
UI-
- Direct Known Subclasses:
TextUIWrapper.DefaultWrapper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TextUIWrapper.DefaultWrapperprivate final TextUIWrapper<UI>.TextUIChangeHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final TextUIWrapper<? extends PromptTextUI> Returns the wrapper class.final voidinstall(JTextComponent textComponent, boolean stayOnUIChange) Wraps and replaces the current UI of the giventextComponent, by callingwrapUI(JTextComponent)if necessary.protected booleanreplaceUIIfNeeded(JTextComponent textComponent) Wraps and replaces the text components current UI by calling, if the text components current UI is not an instance of the given wrapper class.invalid reference
#wrapUI(TextUI)final voiduninstall(JTextComponent textComponent) Removes thePropertyChangeListener, which listens for "UI" property changes (if installed) and then callsJComponent.updateUI()on thetextComponentto set the UI object provided by the currentUIDefaults.abstract UIwrapUI(JTextComponent textComponent) Override to return the appropriate UI wrapper object for the givenTextUI.
-
Field Details
-
defaultWrapper
-
wrapperClass
-
uiChangeHandler
-
-
Constructor Details
-
TextUIWrapper
-
-
Method Details
-
getDefaultWrapper
-
install
Wraps and replaces the current UI of the given
textComponent, by callingwrapUI(JTextComponent)if necessary.- Parameters:
textComponent-stayOnUIChange- iftrue, aPropertyChangeListeneris registered, which listens for UI changes and wraps any new UI object.
-
replaceUIIfNeeded
Wraps and replaces the text components current UI by calling, if the text components current UI is not an instance of the given wrapper class.invalid reference
#wrapUI(TextUI)- Parameters:
textComponent-- Returns:
trueif the UI has been replaced
-
wrapUI
Override to return the appropriate UI wrapper object for the givenTextUI.- Parameters:
textUI-- Returns:
- the wrapping UI
-
getWrapperClass
-
uninstall
Removes the
PropertyChangeListener, which listens for "UI" property changes (if installed) and then callsJComponent.updateUI()on thetextComponentto set the UI object provided by the currentUIDefaults.- Parameters:
textComponent-
-