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.innerFocusWidth int or float optional; defaults to Component.innerFocusWidth, Button.toolbar.margin Insets, Button.toolbar.spacingInsets Insets, Button.arc int
-
-
Field Summary
Fields Modifier and Type Field Description protected intarcprotected java.awt.ColorborderColorprotected intborderWidthprotected floatbuttonInnerFocusWidthprotected java.awt.ColordefaultBorderColorprotected intdefaultBorderWidthprotected java.awt.ColordefaultEndBorderColorprotected java.awt.ColordefaultFocusColorprotected java.awt.ColordefaultFocusedBorderColorprotected java.awt.ColordefaultHoverBorderColorprotected java.awt.ColordisabledBorderColorprotected java.awt.ColorendBorderColorprotected java.awt.ColorfocusedBorderColorprotected java.awt.ColorhoverBorderColorprotected java.awt.InsetstoolbarMarginprotected java.awt.InsetstoolbarSpacingInsets-
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 intgetArc(java.awt.Component c)Returns the (unscaled) arc diameter of the border.protected java.awt.PaintgetBorderColor(java.awt.Component c)java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets insets)protected intgetBorderWidth(java.awt.Component c)Returns the (unscaled) line thickness used to paint the border.protected java.awt.ColorgetFocusColor(java.awt.Component c)protected intgetFocusWidth(java.awt.Component c)Returns the (unscaled) thickness of the outer focus border.protected floatgetInnerFocusWidth(java.awt.Component c)Returns the (unscaled) thickness of the inner focus border.protected booleanisFocused(java.awt.Component c)voidpaintBorder(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
-
buttonInnerFocusWidth
protected final float buttonInnerFocusWidth
-
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:
paintBorderin interfacejavax.swing.border.Border- Overrides:
paintBorderin classFlatBorder
-
getFocusColor
protected java.awt.Color getFocusColor(java.awt.Component c)
- Overrides:
getFocusColorin classFlatBorder
-
isFocused
protected boolean isFocused(java.awt.Component c)
- Overrides:
isFocusedin classFlatBorder
-
getBorderColor
protected java.awt.Paint getBorderColor(java.awt.Component c)
- Overrides:
getBorderColorin classFlatBorder
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)- Overrides:
getBorderInsetsin classFlatBorder
-
getFocusWidth
protected int getFocusWidth(java.awt.Component c)
Description copied from class:FlatBorderReturns the (unscaled) thickness of the outer focus border.- Overrides:
getFocusWidthin classFlatBorder
-
getInnerFocusWidth
protected float getInnerFocusWidth(java.awt.Component c)
Description copied from class:FlatBorderReturns the (unscaled) thickness of the inner focus border.- Overrides:
getInnerFocusWidthin classFlatBorder
-
getBorderWidth
protected int getBorderWidth(java.awt.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(java.awt.Component c)
Description copied from class:FlatBorderReturns the (unscaled) arc diameter of the border.- Overrides:
getArcin classFlatBorder
-
-