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.
-
Nested Class Summary
Nested classes/interfaces inherited from class PromptTextUI
PromptTextUI.PainterHighlighter -
Field Summary
FieldsFields inherited from class PromptTextUI
delegate, focusHandler, promptComponent -
Constructor Summary
ConstructorsConstructorDescriptionBuddyTextFieldUI(TextUI delegate) Creates a newBuddyTextFieldUIwhich delegates most work to anotherTextUI. -
Method Summary
Modifier and TypeMethodDescriptionprotected BuddyLayoutAndBorderTODO: commentprivate booleanvoidCalls TextUI#installUI(JComponent) on the delegate and installs a focus listener oncwhich repaints the component when it gains or loses the focus.voidpaint(Graphics g, JComponent c) Delegates painting whenPromptTextUI.shouldPaintPrompt(JTextComponent)returns false.voidDelegates, then uninstalls the focus listener.Methods inherited from class PromptTextFieldUI
createPromptComponent, getPromptComponentMethods inherited from class PromptTextUI
contains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getRootView, getToolTipText, hashCode, modelToView, modelToView, paintPromptComponent, shouldPaintPrompt, toString, update, viewToModel, viewToModelMethods inherited from class TextUI
getToolTipText2D, modelToView2D, viewToModel2DMethods inherited from class ComponentUI
createUI, getBaselineResizeBehavior
-
Field Details
-
layoutAndBorder
-
MAC_MARGIN
-
-
Constructor Details
-
BuddyTextFieldUI
Creates a newBuddyTextFieldUIwhich delegates most work to anotherTextUI.- Parameters:
delegate-
-
-
Method Details
-
paint
Description copied from class:PromptTextUIDelegates 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:
paintin classPromptTextUI
-
hasMacTextFieldBorder
-
installUI
Description copied from class:PromptTextUICalls TextUI#installUI(JComponent) on the delegate and installs a focus listener oncwhich repaints the component when it gains or loses the focus.- Overrides:
installUIin classPromptTextUI
-
createBuddyLayoutAndBorder
-
uninstallUI
Description copied from class:PromptTextUIDelegates, then uninstalls the focus listener.- Overrides:
uninstallUIin classPromptTextUI
-
getPreferredSize
TODO: comment- Overrides:
getPreferredSizein classPromptTextUI- See Also:
-