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 javax.swing.plaf.TextUI>
public static final class TextUIWrapper.DefaultWrapper extends TextUIWrapper<PromptTextUI>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jdesktop.swingx.plaf.TextUIWrapper
TextUIWrapper.DefaultWrapper
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanreplaceUIIfNeeded(javax.swing.text.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.PromptTextUIwrapUI(javax.swing.text.JTextComponent textComponent)Creates a newPromptTextUI, which wraps the giventextComponents UI.-
Methods inherited from class org.jdesktop.swingx.plaf.TextUIWrapper
getDefaultWrapper, getWrapperClass, install, uninstall
-
-
-
-
Method Detail
-
wrapUI
public PromptTextUI wrapUI(javax.swing.text.JTextComponent textComponent)
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
protected boolean replaceUIIfNeeded(javax.swing.text.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. (That's becauseBasicTextUIremoves all our buddies upon UI changes).- Overrides:
replaceUIIfNeededin classTextUIWrapper<PromptTextUI>- Returns:
trueif the UI has been replaced
-
-