Package org.jdesktop.swingx.plaf
Class PromptTextFieldUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
org.jdesktop.swingx.plaf.PromptTextUI
org.jdesktop.swingx.plaf.PromptTextFieldUI
- Direct Known Subclasses:
BuddyTextFieldUI
PromptTextUI
implementation for rendering prompts on
JTextField
s and uses a JTextField
as a prompt component.- Author:
- Peter Weishapl petw@gmx.net
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jdesktop.swingx.plaf.PromptTextUI
PromptTextUI.PainterHighlighter
-
Field Summary
Fields inherited from class org.jdesktop.swingx.plaf.PromptTextUI
delegate, promptComponent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JTextComponent
Returns a sharedJTextField
.OverridesgetPromptComponent(JTextComponent)
to additionally updateJTextField
specific properties.modelToView
(JTextComponent t, int pos) Deprecated.modelToView
(JTextComponent t, int pos, Position.Bias bias) Deprecated.int
viewToModel
(JTextComponent t, Point pt) Deprecated.int
viewToModel
(JTextComponent t, Point pt, Position.Bias[] biasReturn) Deprecated.Methods inherited from class org.jdesktop.swingx.plaf.PromptTextUI
contains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText2D, hashCode, installUI, modelToView2D, modelToView2D, paint, paintPromptComponent, shouldPaintPrompt, toString, uninstallUI, update, viewToModel2D
Methods inherited from class javax.swing.plaf.TextUI
getToolTipText
Methods inherited from class javax.swing.plaf.ComponentUI
createUI, getBaselineResizeBehavior
-
Constructor Details
-
PromptTextFieldUI
Creates a newPromptTextFieldUI
.- Parameters:
delegate
- TextUI
-
-
Method Details
-
getPromptComponent
OverridesgetPromptComponent(JTextComponent)
to additionally updateJTextField
specific properties.- Overrides:
getPromptComponent
in classPromptTextUI
- Parameters:
txt
- JTextComponent- Returns:
- the adjusted prompt component
-
createPromptComponent
Returns a sharedJTextField
.- Specified by:
createPromptComponent
in classPromptTextUI
- Returns:
- JTextComponent
-
modelToView
Deprecated.- Overrides:
modelToView
in classPromptTextUI
- Throws:
BadLocationException
-
modelToView
@Deprecated public Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) throws BadLocationException Deprecated.- Overrides:
modelToView
in classPromptTextUI
- Throws:
BadLocationException
-
viewToModel
Deprecated.- Overrides:
viewToModel
in classPromptTextUI
-
viewToModel
Deprecated.- Overrides:
viewToModel
in classPromptTextUI
-