Class BuddyLayoutAndBorder
java.lang.Object
org.jdesktop.swingx.plaf.BuddyLayoutAndBorder
- All Implemented Interfaces:
LayoutManager, PropertyChangeListener, EventListener, Border, UIResource
public class BuddyLayoutAndBorder
extends Object
implements LayoutManager, Border, PropertyChangeListener, UIResource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(String name, Component comp) Does nothing.protected intReturns the insets of the original border (without the margin! Beware ofBasicBorders.MarginBorder!).protected Rectangleprotected voidinstall(JTextField textField) Installs aBuddyLayoutAndBorderas a layout and border of the given text field.booleanvoidlayoutContainer(Container parent) minimumLayoutSize(Container parent) voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) preferredLayoutSize(Container parent) voidvoidDoes nothing.protected voidWraps and replaces the text fields default border with this object, to honor the button margins and sizes of the search, clear and popup buttons and the layout style.private voidsubstractInsets(Rectangle alloc, Insets insets) toString()void
-
Field Details
-
textField
-
borderDelegate
-
-
Constructor Details
-
BuddyLayoutAndBorder
public BuddyLayoutAndBorder()
-
-
Method Details
-
install
Installs aBuddyLayoutAndBorderas a layout and border of the given text field. Registers aPropertyChangeListenerto wrap any subsequently set border on the text field. -
getBorderDelegate
-
replaceBorderIfNecessary
protected void replaceBorderIfNecessary()Wraps and replaces the text fields default border with this object, to honor the button margins and sizes of the search, clear and popup buttons and the layout style. -
addLayoutComponent
Does nothing.- Specified by:
addLayoutComponentin interfaceLayoutManager- See Also:
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
removeLayoutComponent
Does nothing.- Specified by:
removeLayoutComponentin interfaceLayoutManager- See Also:
-
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
centerY
-
getVisibleRect
- Returns:
- the rectangle allocated by the text field, including the space allocated by the child components left and right, the text fields original border insets and the outer margin.
-
substractInsets
-
getBorderInsets
-
getRealBorderInsets
Returns the insets of the original border (without the margin! Beware ofBasicBorders.MarginBorder!).- Returns:
- the insets of the border delegate
-
isBorderOpaque
public boolean isBorderOpaque()- Specified by:
isBorderOpaquein interfaceBorder
-
paintBorder
- Specified by:
paintBorderin interfaceBorder
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
uninstall
public void uninstall() -
toString
-