Package org.jdesktop.swingx.prompt
Class BuddySupport
java.lang.Object
org.jdesktop.swingx.prompt.BuddySupport
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(Component c, BuddySupport.Position pos, JTextField textField) static voidaddGap(int width, BuddySupport.Position pos, JTextField textField) static voidaddLeft(Component c, JTextField textField) static voidaddRight(Component c, JTextField textField) static ComponentcreateGap(int width) Create a gap to insert between to buddies.static voidensureBuddiesAreInComponentHierarchy(JTextField textField) getBuddies(BuddySupport.Position pos, JTextField textField) getLeft(JTextField textField) static InsetsgetOuterMargin(JTextField buddyField) getRight(JTextField textField) static booleanisBuddy(Component c, JTextField textField) check if components are boddiesstatic voidremove(JComponent c, JTextField textField) BecauseBasicTextUIremoves all components when uninstalled and therefore all buddies are removed when the LnF changes.static voidremoveAll(JTextField textField) static voidset(List<Component> buddies, BuddySupport.Position pos, JTextField textField) static voidsetLeft(JTextField textField, List<Component> leftBuddies) static voidsetOuterMargin(JTextField buddyField, Insets margin) static voidsetRight(JTextField textField, List<Component> rightBuddies)
-
Field Details
-
OUTER_MARGIN
- See Also:
-
-
Constructor Details
-
BuddySupport
public BuddySupport()
-
-
Method Details
-
addLeft
- Parameters:
c- ComponenttextField- JTextField
-
addRight
- Parameters:
c- ComponenttextField- JTextField
-
add
- Parameters:
c- Componentpos- PositiontextField- JTextField
-
addGap
- Parameters:
width- the gap widthpos- PositiontextField- JTextField
-
setRight
- Parameters:
textField- JTextFieldrightBuddies- list of components
-
setLeft
- Parameters:
textField- JTextFieldleftBuddies- list of components
-
set
- Parameters:
buddies- listpos- PositiontextField- JTextField
-
getLeft
- Parameters:
textField- JTextField- Returns:
- list of components
-
getRight
- Parameters:
textField- JTextField- Returns:
- list of components
-
getBuddies
- Parameters:
pos- PositiontextField- JTextField- Returns:
- list of components
-
isBuddy
check if components are boddies- Parameters:
c- ComponenttextField- JTextField- Returns:
- components are boddies
-
remove
BecauseBasicTextUIremoves all components when uninstalled and therefore all buddies are removed when the LnF changes.- Parameters:
c- JComponenttextField- JTextField
-
removeAll
-
setOuterMargin
- Parameters:
buddyField- JTextFieldmargin- Insets
-
getOuterMargin
- Parameters:
buddyField- JTextField- Returns:
- Insets
-
ensureBuddiesAreInComponentHierarchy
- Parameters:
textField- JTextField
-
createGap
Create a gap to insert between to buddies.- Parameters:
width- the gap width- Returns:
- Component
-