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 intarcprotected ColordefaultBorderColorprotected floatdefaultBorderWidthprotected ColordefaultEndBorderColorprotected ColordefaultFocusColorprotected ColordefaultFocusedBorderColorprotected ColordefaultHoverBorderColorprotected ColorendBorderColorprotected ColorhoverBorderColorprotected ColortoolbarFocusColorprotected floattoolbarFocusWidthprotected InsetstoolbarMarginprotected InsetstoolbarSpacingInsets-
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 intgetArc(Component c)Returns the (unscaled) arc diameter of the border.protected PaintgetBorderColor(Component c)InsetsgetBorderInsets(Component c, Insets insets)protected floatgetBorderWidth(Component c)Returns the (unscaled) line thickness used to paint the border.protected ColorgetFocusColor(Component c)protected intgetFocusWidth(Component c)Returns the (unscaled) thickness of the outer focus border.protected booleanisFocused(Component c)voidpaintBorder(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 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:
paintBorderin interfaceBorder- Overrides:
paintBorderin 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:
getFocusColorin classFlatBorder
-
isFocused
protected boolean isFocused(Component c)
- Overrides:
isFocusedin classFlatBorder
-
getBorderColor
protected Paint getBorderColor(Component c)
- Overrides:
getBorderColorin classFlatBorder
-
getBorderInsets
public Insets getBorderInsets(Component c, Insets insets)
- Overrides:
getBorderInsetsin classFlatBorder
-
getFocusWidth
protected int getFocusWidth(Component c)
Description copied from class:FlatBorderReturns the (unscaled) thickness of the outer focus border.- Overrides:
getFocusWidthin classFlatBorder
-
getBorderWidth
protected float getBorderWidth(Component c)
Description copied from class:FlatBorderReturns the (unscaled) line thickness used to paint the border. This may be different toFlatBorder.getLineWidth(java.awt.Component).- Overrides:
getBorderWidthin classFlatBorder
-
getArc
protected int getArc(Component c)
Description copied from class:FlatBorderReturns the (unscaled) arc diameter of the border.- Overrides:
getArcin classFlatBorder
-
-