Class FlatComboBoxUI.CellPaddingBorder
java.lang.Object
javax.swing.border.AbstractBorder
com.formdev.flatlaf.ui.FlatComboBoxUI.CellPaddingBorder
- All Implemented Interfaces:
Serializable, Border
- Enclosing class:
FlatComboBoxUI
Cell padding border used in popup list and for current value if not editable.
The insets are the union of the cell padding and the renderer border insets, which vertically aligns text in popup list with text in combobox.
The renderer border is painted on the outer side of this border.
For button style "mac", also used to increase insets on left side for "checked item" icon and to paint "checked item" icon for selected combobox item.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int(package private) static final String(package private) static final intprivate Insetsprivate Borderprivate JComponent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBorderInsets(Component c, Insets insets) (package private) voidvoidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) (package private) voidUninstall border from previously installed component.Methods inherited from class AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
-
Field Details
-
KEY_MAC_STYLE_HINT
- See Also:
-
MAC_STYLE_GAP
static final int MAC_STYLE_GAP- See Also:
-
padding
-
rendererComponent
-
rendererBorder
-
focusWidth
private int focusWidth
-
-
Constructor Details
-
CellPaddingBorder
CellPaddingBorder(Insets padding)
-
-
Method Details
-
install
-
uninstall
void uninstall()Uninstall border from previously installed component. Because this border is installed in PopupListCellRenderer.getListCellRendererComponent(), there is no single place to uninstall it. This is the reason why this method is called from various places. -
getBorderInsets
- Overrides:
getBorderInsetsin classAbstractBorder
-
paintBorder
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classAbstractBorder
-