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 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) getBuddies
(BuddySupport.Position pos, JTextField textField) getLeft
(JTextField textField) static Insets
getOuterMargin
(JTextField buddyField) getRight
(JTextField textField) static boolean
isBuddy
(Component c, JTextField textField) check if components are boddiesstatic void
remove
(JComponent c, JTextField textField) BecauseBasicTextUI
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)
-
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
BecauseBasicTextUI
removes 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
-