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
JTextFields 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 JTextComponentReturns a sharedJTextField.OverridesgetPromptComponent(JTextComponent)to additionally updateJTextFieldspecific properties.modelToView(JTextComponent t, int pos) Deprecated.modelToView(JTextComponent t, int pos, Position.Bias bias) Deprecated.intviewToModel(JTextComponent t, Point pt) Deprecated.intviewToModel(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, viewToModel2DMethods inherited from class javax.swing.plaf.TextUI
getToolTipTextMethods 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 updateJTextFieldspecific properties.- Overrides:
getPromptComponentin classPromptTextUI- Parameters:
txt- JTextComponent- Returns:
- the adjusted prompt component
-
createPromptComponent
Returns a sharedJTextField.- Specified by:
createPromptComponentin classPromptTextUI- Returns:
- JTextComponent
-
modelToView
Deprecated.- Overrides:
modelToViewin classPromptTextUI- Throws:
BadLocationException
-
modelToView
@Deprecated public Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) throws BadLocationException Deprecated.- Overrides:
modelToViewin classPromptTextUI- Throws:
BadLocationException
-
viewToModel
Deprecated.- Overrides:
viewToModelin classPromptTextUI
-
viewToModel
Deprecated.- Overrides:
viewToModelin classPromptTextUI
-