Package org.jdesktop.swingx.plaf
Class TextUIWrapper<UI extends TextUI>
java.lang.Object
org.jdesktop.swingx.plaf.TextUIWrapper<UI>
- Type Parameters:
UI
-
- Direct Known Subclasses:
TextUIWrapper.DefaultWrapper
TODO:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
private final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TextUIWrapper.DefaultWrapper
private final TextUIWrapper<UI>.TextUIChangeHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final TextUIWrapper
<? extends PromptTextUI> Returns the wrapper class.final void
install
(JTextComponent textComponent, boolean stayOnUIChange) Wraps and replaces the current UI of the giventextComponent
, by callingwrapUI(JTextComponent)
if necessary.protected boolean
replaceUIIfNeeded
(JTextComponent textComponent) Wraps and replaces the text components current UI by callinginvalid reference
#wrapUI(TextUI)
final void
uninstall
(JTextComponent textComponent) Removes thePropertyChangeListener
, which listens for "UI" property changes (if installed) and then callsJComponent.updateUI()
on thetextComponent
to set the UI object provided by the currentUIDefaults
.abstract UI
wrapUI
(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
, aPropertyChangeListener
is registered, which listens for UI changes and wraps any new UI object.
-
replaceUIIfNeeded
Wraps and replaces the text components current UI by callinginvalid reference
#wrapUI(TextUI)
- Parameters:
textComponent
-- Returns:
true
if the UI has been replaced
-
wrapUI
Override to return the appropriate UI wrapper object for the givenTextUI
.- Parameters:
textUI
-- Returns:
- the wrapping UI
-
getWrapperClass
Returns the wrapper class.- Returns:
- the wrapper class
-
uninstall
Removes the
PropertyChangeListener
, which listens for "UI" property changes (if installed) and then callsJComponent.updateUI()
on thetextComponent
to set the UI object provided by the currentUIDefaults
.- Parameters:
textComponent
-
-