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:
java.io.Serializable
,javax.swing.border.Border
,javax.swing.plaf.UIResource
public class FlatButtonBorder extends FlatBorder
Border forJButton
.- See Also:
- Serialized Form
- UiDefault:
- 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.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.hoverBorderColor Color optional, Button.default.focusedBorderColor Color, Button.default.focusColor Color, Button.borderWidth int, Button.default.borderWidth int, Button.toolbar.margin Insets, Button.toolbar.spacingInsets Insets, Button.arc int
-
-
Field Summary
Fields Modifier and Type Field Description protected int
arc
protected java.awt.Color
borderColor
protected int
borderWidth
protected java.awt.Color
defaultBorderColor
protected int
defaultBorderWidth
protected java.awt.Color
defaultEndBorderColor
protected java.awt.Color
defaultFocusColor
protected java.awt.Color
defaultFocusedBorderColor
protected java.awt.Color
defaultHoverBorderColor
protected java.awt.Color
disabledBorderColor
protected java.awt.Color
endBorderColor
protected java.awt.Color
focusedBorderColor
protected java.awt.Color
hoverBorderColor
protected java.awt.Insets
toolbarMargin
protected java.awt.Insets
toolbarSpacingInsets
-
Fields inherited from class com.formdev.flatlaf.ui.FlatBorder
customBorderColor, errorBorderColor, errorFocusedBorderColor, focusColor, focusWidth, innerFocusWidth, innerOutlineWidth, warningBorderColor, warningFocusedBorderColor
-
-
Constructor Summary
Constructors Constructor Description FlatButtonBorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getArc(java.awt.Component c)
Returns the (unscaled) arc diameter of the border.protected java.awt.Paint
getBorderColor(java.awt.Component c)
java.awt.Insets
getBorderInsets(java.awt.Component c, java.awt.Insets insets)
protected int
getBorderWidth(java.awt.Component c)
Returns the (unscaled) line thickness used to paint the border.protected java.awt.Color
getFocusColor(java.awt.Component c)
protected int
getFocusWidth(java.awt.Component c)
Returns the (unscaled) thickness of the outer focus border.protected boolean
isFocused(java.awt.Component c)
void
paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
-
Methods inherited from class com.formdev.flatlaf.ui.FlatBorder
getLineWidth, getOutlineColor, isCellEditor, isEnabled
-
-
-
-
Field Detail
-
borderColor
protected final java.awt.Color borderColor
-
endBorderColor
protected final java.awt.Color endBorderColor
-
disabledBorderColor
protected final java.awt.Color disabledBorderColor
-
focusedBorderColor
protected final java.awt.Color focusedBorderColor
-
hoverBorderColor
protected final java.awt.Color hoverBorderColor
-
defaultBorderColor
protected final java.awt.Color defaultBorderColor
-
defaultEndBorderColor
protected final java.awt.Color defaultEndBorderColor
-
defaultHoverBorderColor
protected final java.awt.Color defaultHoverBorderColor
-
defaultFocusedBorderColor
protected final java.awt.Color defaultFocusedBorderColor
-
defaultFocusColor
protected final java.awt.Color defaultFocusColor
-
borderWidth
protected final int borderWidth
-
defaultBorderWidth
protected final int defaultBorderWidth
-
toolbarMargin
protected final java.awt.Insets toolbarMargin
-
toolbarSpacingInsets
protected final java.awt.Insets toolbarSpacingInsets
-
arc
protected final int arc
-
-
Method Detail
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
- Specified by:
paintBorder
in interfacejavax.swing.border.Border
- Overrides:
paintBorder
in classFlatBorder
-
getFocusColor
protected java.awt.Color getFocusColor(java.awt.Component c)
- Overrides:
getFocusColor
in classFlatBorder
-
isFocused
protected boolean isFocused(java.awt.Component c)
- Overrides:
isFocused
in classFlatBorder
-
getBorderColor
protected java.awt.Paint getBorderColor(java.awt.Component c)
- Overrides:
getBorderColor
in classFlatBorder
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
- Overrides:
getBorderInsets
in classFlatBorder
-
getFocusWidth
protected int getFocusWidth(java.awt.Component c)
Description copied from class:FlatBorder
Returns the (unscaled) thickness of the outer focus border.- Overrides:
getFocusWidth
in classFlatBorder
-
getBorderWidth
protected int getBorderWidth(java.awt.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(java.awt.Component c)
Description copied from class:FlatBorder
Returns the (unscaled) arc diameter of the border.- Overrides:
getArc
in classFlatBorder
-
-