org.jdesktop.swingx.plaf
Class BuddyTextFieldUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TextUI
          extended by org.jdesktop.swingx.plaf.PromptTextUI
              extended by org.jdesktop.swingx.plaf.PromptTextFieldUI
                  extended by org.jdesktop.swingx.plaf.BuddyTextFieldUI
Direct Known Subclasses:
SearchFieldUI

public class BuddyTextFieldUI
extends PromptTextFieldUI

TODO: queries the text components layout manager for the preferred size.

Author:
Peter Weishapl

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.swingx.plaf.PromptTextUI
PromptTextUI.PainterHighlighter
 
Field Summary
protected  BuddyLayoutAndBorder layoutAndBorder
           
 
Fields inherited from class org.jdesktop.swingx.plaf.PromptTextUI
delegate, promptComponent
 
Constructor Summary
BuddyTextFieldUI(javax.swing.plaf.TextUI delegate)
          Creates a new BuddyTextFieldUI which delegates most work to another TextUI.
 
Method Summary
protected  BuddyLayoutAndBorder createBuddyLayoutAndBorder()
           
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
          TODO: comment
 void installUI(javax.swing.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(java.awt.Graphics g, javax.swing.JComponent c)
          Delegates painting when PromptTextUI.shouldPaintPrompt(JTextComponent) returns false.
 void uninstallUI(javax.swing.JComponent c)
          Delegates, then uninstalls the focus listener.
 
Methods inherited from class org.jdesktop.swingx.plaf.PromptTextFieldUI
createPromptComponent, getPromptComponent
 
Methods inherited from class org.jdesktop.swingx.plaf.PromptTextUI
contains, damageRange, damageRange, equals, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getEditorKit, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getRootView, getToolTipText, hashCode, modelToView, modelToView, paintPromptComponent, shouldPaintPrompt, toString, update, viewToModel, viewToModel
 
Methods inherited from class javax.swing.plaf.ComponentUI
createUI, getBaselineResizeBehavior
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

layoutAndBorder

protected BuddyLayoutAndBorder layoutAndBorder
Constructor Detail

BuddyTextFieldUI

public BuddyTextFieldUI(javax.swing.plaf.TextUI delegate)
Creates a new BuddyTextFieldUI which delegates most work to another TextUI.

Parameters:
delegate -
Method Detail

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Description copied from class: PromptTextUI
Delegates painting when PromptTextUI.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.

Overrides:
paint in class PromptTextUI

installUI

public void installUI(javax.swing.JComponent c)
Description copied from class: PromptTextUI
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.

Overrides:
installUI in class PromptTextUI

createBuddyLayoutAndBorder

protected BuddyLayoutAndBorder createBuddyLayoutAndBorder()

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Description copied from class: PromptTextUI
Delegates, then uninstalls the focus listener.

Overrides:
uninstallUI in class PromptTextUI

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
TODO: comment

Overrides:
getPreferredSize in class PromptTextUI
See Also:
ComponentUI.getPreferredSize(javax.swing.JComponent)


Copyright © 2010. All Rights Reserved.