org.jdesktop.swingx.prompt
Class BuddySupport

java.lang.Object
  extended by org.jdesktop.swingx.prompt.BuddySupport

public class BuddySupport
extends Object


Nested Class Summary
static class BuddySupport.Position
           
 
Field Summary
static String OUTER_MARGIN
           
 
Constructor Summary
BuddySupport()
           
 
Method Summary
static void add(Component c, BuddySupport.Position pos, JTextField textField)
           
static void addGap(int width, BuddySupport.Position pos, JTextField textField)
           
static void addLeft(Component c, JTextField textField)
           
static void addRight(Component c, JTextField textField)
           
static Component createGap(int width)
          Create a gap to insert between to buddies.
static void ensureBuddiesAreInComponentHierarchy(JTextField textField)
           
static List<Component> getBuddies(BuddySupport.Position pos, JTextField textField)
           
static List<Component> getLeft(JTextField textField)
           
static Insets getOuterMargin(JTextField buddyField)
           
static List<Component> getRight(JTextField textField)
           
static boolean isBuddy(Component c, JTextField textField)
           
static void remove(JComponent c, JTextField textField)
          Because BasicTextUI removes all components when uninstalled and therefore all buddies are removed when the LnF changes.
static void removeAll(JTextField textField)
           
static void set(List<Component> buddies, BuddySupport.Position pos, JTextField textField)
           
static void setLeft(JTextField textField, List<Component> leftBuddies)
           
static void setOuterMargin(JTextField buddyField, Insets margin)
           
static void setRight(JTextField textField, List<Component> rightBuddies)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTER_MARGIN

public static final String OUTER_MARGIN
See Also:
Constant Field Values
Constructor Detail

BuddySupport

public BuddySupport()
Method Detail

addLeft

public static void addLeft(Component c,
                           JTextField textField)

addRight

public static void addRight(Component c,
                            JTextField textField)

add

public static void add(Component c,
                       BuddySupport.Position pos,
                       JTextField textField)

addGap

public static void addGap(int width,
                          BuddySupport.Position pos,
                          JTextField textField)

setRight

public static void setRight(JTextField textField,
                            List<Component> rightBuddies)

setLeft

public static void setLeft(JTextField textField,
                           List<Component> leftBuddies)

set

public static void set(List<Component> buddies,
                       BuddySupport.Position pos,
                       JTextField textField)

getLeft

public static List<Component> getLeft(JTextField textField)

getRight

public static List<Component> getRight(JTextField textField)

getBuddies

public static List<Component> getBuddies(BuddySupport.Position pos,
                                         JTextField textField)

isBuddy

public static boolean isBuddy(Component c,
                              JTextField textField)

remove

public static void remove(JComponent c,
                          JTextField textField)
Because BasicTextUI removes all components when uninstalled and therefore all buddies are removed when the LnF changes.

Parameters:
c -
textField -

removeAll

public static void removeAll(JTextField textField)

setOuterMargin

public static void setOuterMargin(JTextField buddyField,
                                  Insets margin)

getOuterMargin

public static Insets getOuterMargin(JTextField buddyField)

ensureBuddiesAreInComponentHierarchy

public static void ensureBuddiesAreInComponentHierarchy(JTextField textField)

createGap

public static Component createGap(int width)
Create a gap to insert between to buddies.

Parameters:
width -
Returns: