public class BuddyTextFieldUI extends PromptTextFieldUI
TODO: queries the text components layout manager for the preferred size.
PromptTextUI.PainterHighlighter| Modifier and Type | Field and Description |
|---|---|
protected BuddyLayoutAndBorder |
layoutAndBorder |
delegate, promptComponent| Constructor and Description |
|---|
BuddyTextFieldUI(TextUI delegate)
Creates a new
BuddyTextFieldUI which delegates most work to
another TextUI. |
| Modifier and Type | Method and Description |
|---|---|
protected BuddyLayoutAndBorder |
createBuddyLayoutAndBorder() |
Dimension |
getPreferredSize(JComponent c)
TODO: comment
|
void |
installUI(JComponent c)
Calls TextUI#installUI(JComponent) on the delegate and installs a focus
listener on
c which repaints the component when it gains or
loses the focus. |
void |
paint(Graphics g,
JComponent c)
Delegates painting when
PromptTextUI.shouldPaintPrompt(JTextComponent)
returns false. |
void |
uninstallUI(JComponent c)
Delegates, then uninstalls the focus listener.
|
createPromptComponent, getPromptComponentcontains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getRootView, getToolTipText, hashCode, modelToView, modelToView, paintPromptComponent, shouldPaintPrompt, toString, update, viewToModel, viewToModelcreateUI, getBaselineResizeBehaviorprotected BuddyLayoutAndBorder layoutAndBorder
public BuddyTextFieldUI(TextUI delegate)
BuddyTextFieldUI which delegates most work to
another TextUI.delegate - public void paint(Graphics g, JComponent c)
PromptTextUIPromptTextUI.shouldPaintPrompt(JTextComponent)
returns false. Otherwise the prompt component is retrieved by calling
PromptTextUI.getPromptComponent(JTextComponent) and painted. Then the caret
of the given text component is painted.paint in class PromptTextUIpublic void installUI(JComponent c)
PromptTextUIc which repaints the component when it gains or
loses the focus.installUI in class PromptTextUIprotected BuddyLayoutAndBorder createBuddyLayoutAndBorder()
public void uninstallUI(JComponent c)
PromptTextUIuninstallUI in class PromptTextUIpublic Dimension getPreferredSize(JComponent c)
getPreferredSize in class PromptTextUIComponentUI.getPreferredSize(javax.swing.JComponent)Copyright © 2017. All Rights Reserved.