Class BevelBorder
java.lang.Object
vaadinx.swing.border.AbstractBorder
vaadinx.swing.border.BevelBorder
- All Implemented Interfaces:
Serializable, Border
- Direct Known Subclasses:
SoftBevelBorder
Port of
BevelBorder. Two-pixel raised or
lowered bevel around the component.
CSS has direct border-style: inset and outset
keywords that render the same visual cue the Swing bevel draws — the
browser automatically derives lighter/darker shades from the border
color, so we don't need to separately wire the highlight/shadow
colours. Best-effort per R_best_effort_behaviour; exact highlight/shadow control is
dropped (fields stored for round-trip).
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBevelBorder(int bevelType) BevelBorder(int bevelType, Color highlight, Color shadow) BevelBorder(int bevelType, Color highlightOuterColor, Color highlightInnerColor, Color shadowOuterColor, Color shadowInnerColor) -
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:
-
bevelType
protected int bevelType -
highlightOuter
-
highlightInner
-
shadowInner
-
shadowOuter
-
-
Constructor Details
-
BevelBorder
public BevelBorder(int bevelType) -
BevelBorder
-
BevelBorder
-
-
Method Details
-
getBevelType
public int getBevelType() -
getHighlightOuterColor
-
getHighlightInnerColor
-
getShadowOuterColor
-
getShadowInnerColor
-
getHighlightOuterColor
-
getHighlightInnerColor
-
getShadowOuterColor
-
getShadowInnerColor
-
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
-