Package org.jdesktop.swingx.plaf
Class BuddyTextFieldUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
org.jdesktop.swingx.plaf.PromptTextUI
org.jdesktop.swingx.plaf.PromptTextFieldUI
org.jdesktop.swingx.plaf.BuddyTextFieldUI
- Direct Known Subclasses:
SearchFieldUI
TODO: queries the text components layout manager for the preferred size.
- Author:
- Peter Weishapl petw@gmx.net
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdesktop.swingx.plaf.PromptTextUI
PromptTextUI.PainterHighlighter
-
Field Summary
FieldsFields inherited from class org.jdesktop.swingx.plaf.PromptTextUI
delegate, promptComponent
-
Constructor Summary
ConstructorsConstructorDescriptionBuddyTextFieldUI
(TextUI delegate) Creates a newBuddyTextFieldUI
which delegates most work to anotherTextUI
. -
Method Summary
Modifier and TypeMethodDescriptionprotected BuddyLayoutAndBorder
TODO docTODO: commentvoid
Calls TextUI#installUI(JComponent) on the delegate and installs a focus listener onc
which repaints the component when it gains or loses the focus.void
paint
(Graphics g, JComponent c) Delegates painting whenPromptTextUI.shouldPaintPrompt(JTextComponent)
returns false.void
Delegates, then uninstalls the focus listener.Methods inherited from class org.jdesktop.swingx.plaf.PromptTextFieldUI
createPromptComponent, getPromptComponent, modelToView, modelToView, viewToModel, viewToModel
Methods inherited from class org.jdesktop.swingx.plaf.PromptTextUI
contains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getRootView, getToolTipText2D, hashCode, modelToView2D, modelToView2D, paintPromptComponent, shouldPaintPrompt, toString, update, viewToModel2D
Methods inherited from class javax.swing.plaf.TextUI
getToolTipText
Methods inherited from class javax.swing.plaf.ComponentUI
createUI, getBaselineResizeBehavior
-
Field Details
-
layoutAndBorder
-
-
Constructor Details
-
BuddyTextFieldUI
Creates a newBuddyTextFieldUI
which delegates most work to anotherTextUI
.- Parameters:
delegate
- TextUI
-
-
Method Details
-
paint
Description copied from class:PromptTextUI
Delegates painting whenPromptTextUI.shouldPaintPrompt(JTextComponent)
returns false. Otherwise the prompt component is retrieved by callingPromptTextUI.getPromptComponent(JTextComponent)
and painted. Then the caret of the given text component is painted.- Overrides:
paint
in classPromptTextUI
-
installUI
Description copied from class:PromptTextUI
Calls TextUI#installUI(JComponent) on the delegate and installs a focus listener onc
which repaints the component when it gains or loses the focus.- Overrides:
installUI
in classPromptTextUI
-
createBuddyLayoutAndBorder
TODO doc- Returns:
- BuddyLayoutAndBorder
-
uninstallUI
Description copied from class:PromptTextUI
Delegates, then uninstalls the focus listener.- Overrides:
uninstallUI
in classPromptTextUI
-
getPreferredSize
TODO: comment- Overrides:
getPreferredSize
in classPromptTextUI
- See Also:
-