Class EmptyBorder
java.lang.Object
vaadinx.swing.border.AbstractBorder
vaadinx.swing.border.EmptyBorder
- All Implemented Interfaces:
Serializable, Border
- Direct Known Subclasses:
MatteBorder
Port of
EmptyBorder. Invisible border that
only adds insets — in CSS terms, pure padding.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmptyBorder(int top, int left, int bottom, int right) EmptyBorder(Insets borderInsets) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCss(com.vaadin.flow.dom.Element element) Write this border's CSS onto the target element.getBorderInsets(Component c, Insets target) Fill-the-arg variant of getBorderInsets — concrete borders override when they want to avoid the Insets allocation.booleanMethods inherited from class AbstractBorder
clearBorderCss, paintBorder
-
Field Details
-
left
protected int left -
right
protected int right -
top
protected int top -
bottom
protected int bottom
-
-
Constructor Details
-
EmptyBorder
public EmptyBorder(int top, int left, int bottom, int right) -
EmptyBorder
-
-
Method Details
-
getBorderInsets
- Specified by:
getBorderInsetsin interfaceBorder- Overrides:
getBorderInsetsin classAbstractBorder
-
getBorderInsets
Description copied from class:AbstractBorderFill-the-arg variant of getBorderInsets — concrete borders override when they want to avoid the Insets allocation. Default readsAbstractBorder.getBorderInsets(vaadinx.awt.Component)and copies.- Overrides:
getBorderInsetsin classAbstractBorder
-
isBorderOpaque
public boolean isBorderOpaque()- Specified by:
isBorderOpaquein interfaceBorder- Overrides:
isBorderOpaquein classAbstractBorder
-
applyCss
public void applyCss(com.vaadin.flow.dom.Element element) Description copied from class:AbstractBorderWrite this border's CSS onto the target element. Called byJComponent.setBorder(Border). Concrete border classes override to emit the CSS that represents them (padding for EmptyBorder,borderfor LineBorder, per-side for MatteBorder, …). The base implementation clears any previously-installed border CSS viaAbstractBorder.clearBorderCss(Element)and writes nothing, which is the honest behaviour for a user-authored custom AbstractBorder that didn't override this hook.Typical override:
clearBorderCss(e); set("border", …);. Always clear first so a previous border's keys don't linger.- Overrides:
applyCssin classAbstractBorder
-