Package com.formdev.flatlaf.ui
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.StyleableBorder
,Serializable
,Border
,UIResource
public class FlatButtonBorder extends FlatBorder
Border forJButton
.- See Also:
- Serialized Form
- 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.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.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
Fields Modifier and Type Field Description protected int
arc
protected Color
defaultBorderColor
protected float
defaultBorderWidth
protected Color
defaultEndBorderColor
protected Color
defaultFocusColor
protected Color
defaultFocusedBorderColor
protected Color
defaultHoverBorderColor
protected Color
endBorderColor
protected Color
hoverBorderColor
protected Color
toolbarFocusColor
protected float
toolbarFocusWidth
protected Insets
toolbarMargin
protected Insets
toolbarSpacingInsets
-
Fields inherited from class com.formdev.flatlaf.ui.FlatBorder
borderColor, borderWidth, customBorderColor, disabledBorderColor, errorBorderColor, errorFocusedBorderColor, focusColor, focusedBorderColor, focusWidth, innerFocusWidth, innerOutlineWidth, outline, outlineColor, outlineFocusedColor, warningBorderColor, warningFocusedBorderColor
-
-
Constructor Summary
Constructors Constructor Description FlatButtonBorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getArc(Component c)
Returns the (unscaled) arc diameter of the border.protected Paint
getBorderColor(Component c)
Insets
getBorderInsets(Component c, Insets insets)
protected float
getBorderWidth(Component c)
Returns the (unscaled) line thickness used to paint the border.protected Color
getFocusColor(Component c)
protected int
getFocusWidth(Component c)
Returns the (unscaled) thickness of the outer focus border.protected boolean
isFocused(Component c)
void
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
protected void
paintToolBarFocus(Component c, Graphics g, int x, int y, int width, int height)
-
Methods inherited from class com.formdev.flatlaf.ui.FlatBorder
applyStyleProperty, getInnerFocusWidth, getLineWidth, getOutlineColor, getStyleableInfos, getStyleableValue, isCellEditor, isEnabled
-
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
-
-
-
-
Field Detail
-
arc
protected int arc
-
endBorderColor
protected Color endBorderColor
-
hoverBorderColor
protected Color hoverBorderColor
-
defaultBorderWidth
protected float defaultBorderWidth
-
defaultBorderColor
protected Color defaultBorderColor
-
defaultEndBorderColor
protected Color defaultEndBorderColor
-
defaultFocusedBorderColor
protected Color defaultFocusedBorderColor
-
defaultFocusColor
protected Color defaultFocusColor
-
defaultHoverBorderColor
protected Color defaultHoverBorderColor
-
toolbarFocusWidth
protected float toolbarFocusWidth
- Since:
- 1.4
-
toolbarFocusColor
protected Color toolbarFocusColor
- Since:
- 1.4
-
toolbarMargin
protected Insets toolbarMargin
-
toolbarSpacingInsets
protected Insets toolbarSpacingInsets
-
-
Method Detail
-
paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classFlatBorder
-
paintToolBarFocus
protected void paintToolBarFocus(Component c, Graphics g, int x, int y, int width, int height)
- Since:
- 1.4
-
getFocusColor
protected Color getFocusColor(Component c)
- Overrides:
getFocusColor
in classFlatBorder
-
isFocused
protected boolean isFocused(Component c)
- Overrides:
isFocused
in classFlatBorder
-
getBorderColor
protected Paint getBorderColor(Component c)
- Overrides:
getBorderColor
in classFlatBorder
-
getBorderInsets
public Insets getBorderInsets(Component c, Insets insets)
- Overrides:
getBorderInsets
in classFlatBorder
-
getFocusWidth
protected int getFocusWidth(Component c)
Description copied from class:FlatBorder
Returns the (unscaled) thickness of the outer focus border.- Overrides:
getFocusWidth
in classFlatBorder
-
getBorderWidth
protected float getBorderWidth(Component c)
Description copied from class:FlatBorder
Returns the (unscaled) line thickness used to paint the border. This may be different toFlatBorder.getLineWidth(java.awt.Component)
.- Overrides:
getBorderWidth
in classFlatBorder
-
getArc
protected int getArc(Component c)
Description copied from class:FlatBorder
Returns the (unscaled) arc diameter of the border.- Overrides:
getArc
in classFlatBorder
-
-