Class MatteBorder
java.lang.Object
vaadinx.swing.border.AbstractBorder
vaadinx.swing.border.EmptyBorder
vaadinx.swing.border.MatteBorder
- All Implemented Interfaces:
Serializable, Border
Port of
MatteBorder. Per-side coloured
border (LineBorder with independent widths on each side) or
tile-filled border (via Icon).
The (top, left, bottom, right, Color) ctor is the common case and
maps cleanly to per-side CSS border-top/right/bottom/left. The
Icon form has no simple CSS analogue — our ctor accepts it for API
parity but logs a WARN on install and falls back to a plain-insets
EmptyBorder-equivalent rendering until icon rendering lands.
- See Also:
-
Field Summary
FieldsFields inherited from class EmptyBorder
bottom, left, right, top -
Constructor Summary
ConstructorsConstructorDescriptionMatteBorder(int top, int left, int bottom, int right, Color matteColor) MatteBorder(int top, int left, int bottom, int right, Icon tileIcon) MatteBorder(Insets borderInsets, Color matteColor) MatteBorder(Insets borderInsets, Icon tileIcon) MatteBorder(Icon tileIcon) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCss(com.vaadin.flow.dom.Element element) Write this border's CSS onto the target element.booleanMethods inherited from class EmptyBorder
getBorderInsets, getBorderInsetsMethods inherited from class AbstractBorder
clearBorderCss, paintBorder
-
Field Details
-
color
-
tileIcon
-
-
Constructor Details
-
MatteBorder
-
MatteBorder
-
MatteBorder
-
MatteBorder
-
MatteBorder
-
-
Method Details
-
getMatteColor
-
getTileIcon
-
isBorderOpaque
public boolean isBorderOpaque()- Specified by:
isBorderOpaquein interfaceBorder- Overrides:
isBorderOpaquein classEmptyBorder
-
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 classEmptyBorder
-