Class EtchedBorder
java.lang.Object
vaadinx.swing.border.AbstractBorder
vaadinx.swing.border.EtchedBorder
- All Implemented Interfaces:
Serializable, Border
Port of
EtchedBorder. Low-relief etched
border (groove or ridge).
CSS border-style: groove and ridge render the same
visual pattern — etched into or raised from the surface. Browsers
synthesise the highlight/shadow pair from the single border-color.
R_best_effort_behaviour best-effort: the hand-picked highlight / shadow
constructor fields are stored for round-trip but don't influence the
rendered colour (the browser picks).
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEtchedBorder(int etchType) EtchedBorder(int etchType, Color highlight, Color shadow) EtchedBorder(Color highlight, Color shadow) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCss(com.vaadin.flow.dom.Element element) Write this border's CSS onto the target element.intbooleanMethods inherited from class AbstractBorder
clearBorderCss, getBorderInsets, paintBorder
-
Field Details
-
RAISED
public static final int RAISED- See Also:
-
LOWERED
public static final int LOWERED- See Also:
-
etchType
protected int etchType -
highlight
-
shadow
-
-
Constructor Details
-
EtchedBorder
public EtchedBorder() -
EtchedBorder
public EtchedBorder(int etchType) -
EtchedBorder
-
EtchedBorder
-
-
Method Details
-
getEtchType
public int getEtchType() -
getHighlightColor
-
getHighlightColor
-
getShadowColor
-
getShadowColor
-
getBorderInsets
- Specified by:
getBorderInsetsin interfaceBorder- 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
-