Class FlatButtonBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.plaf.basic.BasicBorders.MarginBorder
com.formdev.flatlaf.ui.FlatBorder
com.formdev.flatlaf.ui.FlatButtonBorder
- All Implemented Interfaces:
FlatStylingSupport.StyleableObject, Serializable, Border, UIResource
Border for
JButton.- See Also:
- UiDefault:
- Button.arc int, Button.innerFocusWidth int or float optional; defaults to Component.innerFocusWidth, Button.borderWidth int or float optional; defaults to Component.borderWidth, Button.borderColor Color, Button.startBorderColor Color optional; if set, a gradient paint is used and Button.borderColor is ignored, Button.endBorderColor Color optional; if set, a gradient paint is used, Button.disabledBorderColor Color, Button.focusedBorderColor Color, Button.hoverBorderColor Color optional, Button.pressedBorderColor Color optional, Button.selectedBorderColor Color optional, Button.disabledSelectedBorderColor Color optional, Button.focusedSelectedBorderColor Color optional, Button.hoverSelectedBorderColor Color optional, Button.pressedSelectedBorderColor Color optional, Button.default.borderWidth int or float, Button.default.borderColor Color, Button.default.startBorderColor Color optional; if set, a gradient paint is used and Button.default.borderColor is ignored, Button.default.endBorderColor Color optional; if set, a gradient paint is used, Button.default.focusedBorderColor Color, Button.default.focusColor Color, Button.default.pressedBorderColor Color optional, Button.default.hoverBorderColor Color optional, Button.toolbar.focusWidth int or float optional; default is 1.5, Button.toolbar.focusColor Color optional; defaults to Component.focusColor, Button.toolbar.margin Insets, Button.toolbar.spacingInsets Insets
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected Colorprotected floatprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected floatprotected Insetsprotected InsetsFields inherited from class FlatBorder
borderColor, borderWidth, customBorderColor, disabledBorderColor, errorBorderColor, errorFocusedBorderColor, focusColor, focusedBorderColor, focusWidth, innerFocusWidth, innerOutlineWidth, outline, outlineColor, outlineFocusedColor, successBorderColor, successFocusedBorderColor, warningBorderColor, warningFocusedBorderColor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturns the (unscaled) arc diameter of the border corners.protected PaintgetBorderInsets(Component c, Insets insets) protected floatReturns the (unscaled) line thickness used to paint the border.protected Colorprotected intReturns the (unscaled) thickness of the outer focus border.protected booleanvoidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) protected voidpaintToolBarFocus(Component c, Graphics g, int x, int y, int width, int height) Methods inherited from class FlatBorder
getInnerFocusWidth, getLineWidth, getOutlineColor, isCellEditor, isEnabledMethods inherited from class AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaqueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FlatStylingSupport.StyleableObject
applyStyleProperty, getStyleableInfos, getStyleableValue
-
Field Details
-
arc
protected int arc -
endBorderColor
-
hoverBorderColor
-
pressedBorderColor
- Since:
- 3.5
-
selectedBorderColor
- Since:
- 3.5
-
disabledSelectedBorderColor
- Since:
- 3.5
-
focusedSelectedBorderColor
- Since:
- 3.5
-
hoverSelectedBorderColor
- Since:
- 3.5
-
pressedSelectedBorderColor
- Since:
- 3.5
-
defaultBorderWidth
protected float defaultBorderWidth -
defaultBorderColor
-
defaultEndBorderColor
-
defaultFocusedBorderColor
-
defaultFocusColor
-
defaultHoverBorderColor
-
defaultPressedBorderColor
- Since:
- 3.5
-
toolbarFocusWidth
protected float toolbarFocusWidth- Since:
- 1.4
-
toolbarFocusColor
- Since:
- 1.4
-
toolbarMargin
-
toolbarSpacingInsets
-
-
Constructor Details
-
FlatButtonBorder
public FlatButtonBorder()
-
-
Method Details
-
paintBorder
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classFlatBorder
-
paintToolBarFocus
-
getFocusColor
- Overrides:
getFocusColorin classFlatBorder
-
isFocused
- Overrides:
isFocusedin classFlatBorder
-
getBorderColor
- Overrides:
getBorderColorin classFlatBorder
-
getBorderInsets
- Overrides:
getBorderInsetsin classFlatBorder
-
getFocusWidth
Description copied from class:FlatBorderReturns the (unscaled) thickness of the outer focus border.- Overrides:
getFocusWidthin classFlatBorder
-
getBorderWidth
Description copied from class:FlatBorderReturns the (unscaled) line thickness used to paint the border. This may be different toFlatBorder.getLineWidth(Component).- Overrides:
getBorderWidthin classFlatBorder
-
getArc
Description copied from class:FlatBorderReturns the (unscaled) arc diameter of the border corners.- Overrides:
getArcin classFlatBorder
-