# Class RoundBorder

java.lang.Object
com.codename1.ui.plaf.Border
com.codename1.ui.plaf.RoundBorder

public final class RoundBorder extends Border

A border that can either be a circle or a circular rectangle which is a rectangle whose sides are circles. This border can optionally have a drop shadow associated with it.

IMPORTANT: `RoundRectBorder` instances can't be reused you would need to create a separate instance for each style object! See this issue for further details.

    Form hi = new Form("Round", new BorderLayout(BorderLayout.CENTER_BEHAVIOR_CENTER));

    Button ok = new Button("OK");
    Button cancel = new Button("Cancel");

    Label loginLabel = new Label("Login", "Container");
    loginLabel.getAllStyles().setAlignment(Component.CENTER);

    Label passwordLabel = new Label("Password", "Container");
    passwordLabel.getAllStyles().setAlignment(Component.CENTER);

    TextField login = new TextField("", "Login", 20, TextArea.ANY);
    TextField password = new TextField("", "Password", 20, TextArea.PASSWORD);
    Style loginStyle = login.getAllStyles();
    Stroke borderStroke = new Stroke(2, Stroke.CAP_SQUARE, Stroke.JOIN_MITER, 1);
    loginStyle.setBorder(RoundBorder.create().
            rectangle(true).
            color(0xffffff).
            strokeColor(0).
            strokeOpacity(120).
            stroke(borderStroke));
    loginStyle.setMarginUnit(Style.UNIT_TYPE_DIPS);
    loginStyle.setMargin(Component.BOTTOM, 3);
    Style passwordStyle = password.getAllStyles();
    passwordStyle.setBorder(RoundBorder.create().
            rectangle(true).
            color(0xffffff).
            strokeColor(0).
            strokeOpacity(120).
            stroke(borderStroke));

    Container box = BoxLayout.encloseY(
            loginLabel,
            login,
            passwordLabel,
            password,
                GridLayout.encloseIn(2, cancel, ok));

    Button closeButton = new Button();
    Style closeStyle = closeButton.getAllStyles();
    closeStyle.setFgColor(0xffffff);
    closeStyle.setBgTransparency(0);
    closeStyle.setPaddingUnit(Style.UNIT_TYPE_DIPS);
    closeStyle.setPadding(3, 3, 3, 3);
    closeStyle.setBorder(RoundBorder.create().shadowOpacity(100));
    FontImage.setMaterialIcon(closeButton, FontImage.MATERIAL_CLOSE);

    Container layers = LayeredLayout.encloseIn(box, FlowLayout.encloseRight(closeButton));
    Style boxStyle = box.getUnselectedStyle();
    boxStyle.setBgTransparency(255);
    boxStyle.setBgColor(0xeeeeee);
    boxStyle.setMarginUnit(Style.UNIT_TYPE_DIPS);
    boxStyle.setPaddingUnit(Style.UNIT_TYPE_DIPS);
    boxStyle.setMargin(4, 3, 3, 3);
    boxStyle.setPadding(2, 2, 2, 2);

    hi.add(BorderLayout.CENTER, layers);

    hi.show();

- ## Method Summary

  Modifier and Type
  Method
  Description
  `RoundBorder`
  `color(int color)`
  Sets the background color of the circle/rectangle
  `static RoundBorder`
  `create()`
  Creates a flat round border with no stroke and no shadow and the default color, this call can be chained with the other calls to mutate the color/opacity etc.
  `boolean`
  `equals(Object obj)`
  {{Indicates whether some other object is "equal to" this one.
  `int`
  `getColor()`
  The color of the border background
  `int`
  `getMinimumHeight()`
  Returns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g.
  `int`
  `getMinimumWidth()`
  Returns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g.
  `int`
  `getOpacity()`
  The opacity (transparency) of the border background
  `float`
  `getShadowBlur()`
  The Gaussian blur size
  `int`
  `getShadowOpacity()`
  The opacity of the shadow between 0 and 255
  `int`
  `getShadowSpread()`
  The spread of the shadow in pixels of millimeters
  `float`
  `getShadowX()`
  X axis bias of the shadow between 0 and 1 where 0 is to the top and 1 is to the bottom, defaults to 0.5
  `float`
  `getShadowY()`
  Y axis bias of the shadow between 0 and 1 where 0 is to the left and 1 is to the right, defaults to 0.5
  `int`
  `getStrokeColor()`
  The color of the edge of the border if applicable
  `int`
  `getStrokeOpacity()`
  The opacity of the edge of the border if applicable
  `float`
  `getStrokeThickness()`
  The thickness of the edge of the border if applicable, 0 if no stroke is needed
  `boolean`
  `getUIID()`
  True is we use the background of the component setting to draw
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `boolean`
  `isBackgroundPainter()`
  Returns true if installing this border will override the painting of the component background
  `boolean`
  `isOnlyLeftRounded()`
  Checks if only left side is rounded.
  `boolean`
  `isOnlyRightRounded()`
  Checks if only right side is rounded.
  `boolean`
  `isRectangle()`
  True if this border grows into a rectangle horizontally or keeps growing as a circle
  `boolean`
  `isShadowMM()`
  True if the shadow spread is in millimeters
  `boolean`
  `isStrokeMM()`
  True if the thickness of the stroke is in millimeters
  `RoundBorder`
  `onlyLeftRounded(boolean onlyLeftRounded)`
  Forces a special case of the rectangle mode that renders the right side as square.
  `RoundBorder`
  `onlyRightRounded(boolean onlyRightRounded)`
  Forces a special case of the rectangle mode that renders the left side as square.
  `RoundBorder`
  `opacity(int opacity)`
  Sets the background opacity of the circle/rectangle
  `void`
  `paintBorderBackground(Graphics g, Component c)`
  Has effect when the border demands responsibility for background painting normally the painter will perform this work but in this case the border might do it instead.
  `RoundBorder`
  `rectangle(boolean rectangle)`
  When set to true this border grows into a rectangle when the space isn't perfectly circular
  `RoundBorder`
  `shadowBlur(float shadowBlur)`
  The blur on the shadow this is the standard Gaussian blur radius
  `RoundBorder`
  `shadowOpacity(int shadowOpacity)`
  Sets the opacity of the shadow from 0 - 255 where 0 means no shadow and 255 means opaque black shadow
  `RoundBorder`
  `shadowSpread(int shadowSpread)`
  Sets the spread in pixels of the shadow i.e how much bigger is it than the actual circle/rectangle
  `RoundBorder`
  `shadowSpread(int shadowSpread, boolean mm)`
  Sets the spread in pixels of the shadow i.e how much bigger is it than the actual circle/rectangle
  `RoundBorder`
  `shadowX(float shadowX)`
  The position of the shadow on the X axis where 0.5f means the center and higher values draw it to the right side
  `RoundBorder`
  `shadowY(float shadowY)`
  The position of the shadow on the Y axis where 0.5f means the center and higher values draw it to the bottom
  `RoundBorder`
  `stroke(float stroke, boolean mm)`
  Sets the stroke of the circle/rectangle
  `RoundBorder`
  `stroke(Stroke stroke)`
  Sets the stroke of the circle/rectangle
  `RoundBorder`
  `strokeAngle(int strokeAngle)`
  Sets the stroke angle of the circle, this only applies to circular versions
  `RoundBorder`
  `strokeColor(int strokeColor)`
  Sets the stroke color of the circle/rectangle
  `RoundBorder`
  `strokeOpacity(int strokeOpacity)`
  Sets the opacity of the stroke line around the circle/rectangle
  `RoundBorder`
  `uiid(boolean uiid)`
  Uses the style of the components UIID to draw the background of the border, this effectively overrides all other style settings but allows the full power of UIID drawing including gradients, background images etc.

  ### Methods inherited from class Border

  `addOuterBorder, clearImageBorderSpecialTile, createBevelLowered, createBevelLowered, createBevelRaised, createBevelRaised, createCompoundBorder, createDashedBorder, createDashedBorder, createDottedBorder, createDottedBorder, createDoubleBorder, createDoubleBorder, createEmpty, createEtchedLowered, createEtchedLowered, createEtchedRaised, createEtchedRaised, createGrooveBorder, createGrooveBorder, createHorizonalImageBorder, createImageBorder, createImageBorder, createImageScaledBorder, createImageSplicedBorder, createInsetBorder, createInsetBorder, createLineBorder, createLineBorder, createLineBorder, createLineBorder, createLineBorder, createLineBorder, createOutsetBorder, createOutsetBorder, createPressedVersion, createRidgeBorder, createRidgeBorder, createRoundBorder, createRoundBorder, createRoundBorder, createRoundBorder, createUndelineBorder, createUndelineBorder, createUnderlineBorder, createUnderlineBorder, createUnderlineBorder, createUnderlineBorder, createVerticalImageBorder, getCompoundBorders, getDefaultBorder, getEmpty, getFocusedInstance, getPressedInstance, getProperty, getThickness, getTrackComponent, isEmptyBorder, isPaintOuterBorderFirst, isRectangleType, lock, mirrorBorder, paint, setDefaultBorder, setFocusedInstance, setImageBorderSpecialTile, setImageBorderSpecialTile, setPaintOuterBorderFirst, setPressedInstance, setThickness, setTrackComponent, setTrackComponent, unlock`
  Modifier and Type
  Method
  Description
  `void`
  `addOuterBorder(Border outer)`
  Ads a border that wraps this border
  `void`
  `clearImageBorderSpecialTile()`
  Cleans the tile tracking state allowing the garbage collector to pick up the component and the image data
  `static Border`
  `createBevelLowered()`
  Creates a lowered bevel border with default colors, highlight is derived from the component and shadow is a plain dark color
  `static Border`
  `createBevelLowered(int highlightOuter, int highlightInner, int shadowOuter, int shadowInner)`
  Creates a raised bevel border with the given colors
  `static Border`
  `createBevelRaised()`
  Creates a lowered bevel border with default colors, highlight is derived from the component and shadow is a plain dark color
  `static Border`
  `createBevelRaised(int highlightOuter, int highlightInner, int shadowOuter, int shadowInner)`
  Creates a raised bevel border with the given colors
  `static Border`
  `createCompoundBorder(Border top, Border bottom, Border left, Border right)`
  Creates a border that is comprised of multiple border types so one border type can be used on top while another one can be used at the bottom.
  `static Border`
  `createDashedBorder(int thickness)`
  Creates a dashed border with the specified thickness and the theme colors
  `static Border`
  `createDashedBorder(int thickness, int color)`
  Creates a dashed border with the specified thickness and color
  `static Border`
  `createDottedBorder(int thickness)`
  Creates a dotted border with the specified thickness and the theme colors
  `static Border`
  `createDottedBorder(int thickness, int color)`
  Creates a dotted border with the specified thickness and color
  `static Border`
  `createDoubleBorder(int thickness)`
  Creates a double border with the specified thickness and color
  `static Border`
  `createDoubleBorder(int thickness, int color)`
  Creates a double border with the specified thickness and color
  `static Border`
  `createEmpty()`
  Creates an empty border, this is useful where we don't want a border for a component but want a focus border etc...
  `static Border`
  `createEtchedLowered()`
  Creates a lowered etched border with default colors, highlight is derived from the component and shadow is a plain dark color
  `static Border`
  `createEtchedLowered(int highlight, int shadow)`
  Creates a raised etched border with the given colors
  `static Border`
  `createEtchedRaised()`
  Creates a lowered etched border with default colors, highlight is derived from the component and shadow is a plain dark color
  `static Border`
  `createEtchedRaised(int highlight, int shadow)`
  Creates a raised etched border with the given colors
  `static Border`
  `createGrooveBorder(int thickness)`
  Creates a groove border with the specified thickness and theme colors
  `static Border`
  `createGrooveBorder(int thickness, int color)`
  Creates a groove border with the specified thickness and color
  `static Border`
  `createHorizonalImageBorder(Image left, Image right, Image center)`
  This is an image border that can only grow horizontally
  `static Border`
  `createImageBorder(Image top, Image topLeft, Image background)`
  The given images are tiled appropriately across the matching side of the border, rotated and placed as expected in the four corners.
  `static Border`
  `createImageBorder(Image top, Image bottom, Image left, Image right, Image topLeft, Image topRight, Image bottomLeft, Image bottomRight, Image background)`
  The given top/bottom/left/right images are tiled appropriately across the matching sides of the border and the corners are placed as expected in the four corners.
  `static Border`
  `createImageScaledBorder(Image top, Image bottom, Image left, Image right, Image topLeft, Image topRight, Image bottomLeft, Image bottomRight, Image background)`
  The given top/bottom/left/right images are scaled appropriately across the matching sides of the border and the corners are placed as expected in the four corners.
  `static Border`
  `createImageSplicedBorder(Image img, double topInset, double rightInset, double bottomInset, double leftInset)`
  The given image is spliced into 9 pieces based on the provided top, right, bottom, and left insets, and the resulting sub-images are used to form a 9-piece image border via `com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image, com.codename1.ui.Image)`
  `static Border`
  `createInsetBorder(int thickness)`
  Creates an inset border with the specified thickness and theme colors
  `static Border`
  `createInsetBorder(int thickness, int color)`
  Creates an inset border with the specified thickness and color
  `static Border`
  `createLineBorder(float thickness)`
  Creates a line border that uses the color of the component foreground for drawing
  `static Border`
  `createLineBorder(float thickness, int color)`
  Creates a line border that uses the given color for the component
  `static Border`
  `createLineBorder(int thickness)`
  Creates a line border that uses the color of the component foreground for drawing
  `static Border`
  `createLineBorder(int thickness, int color)`
  Creates a line border that uses the given color for the component
  `static Border`
  `createLineBorder(int thickness, int color, String title)`
  Creates a line border that uses the given color for the component
  `static Border`
  `createLineBorder(int thickness, String title)`
  Creates a line border with the specified title
  `static Border`
  `createOutsetBorder(int thickness)`
  Creates an outset border with the specified thickness and theme colors
  `static Border`
  `createOutsetBorder(int thickness, int color)`
  Creates an outset border with the specified thickness and color
  `Border`
  `createPressedVersion()`
  When applied to buttons borders produce a version that reverses the effects of the border providing a pressed feel
  `static Border`
  `createRidgeBorder(int thickness)`
  Creates a ridge border with the specified thickness and theme colors
  `static Border`
  `createRidgeBorder(int thickness, int color)`
  Creates a ridge border with the specified thickness and color
  `static Border`
  `createRoundBorder(int arcWidth, int arcHeight)`
  Creates a rounded corner border that uses the color of the component foreground for drawing.
  `static Border`
  `createRoundBorder(int arcWidth, int arcHeight, boolean outline)`
  Creates a rounded corner border that uses the color of the component foreground for drawing.
  `static Border`
  `createRoundBorder(int arcWidth, int arcHeight, int color)`
  Creates a rounded border that uses the given color for the component.
  `static Border`
  `createRoundBorder(int arcWidth, int arcHeight, int color, boolean outline)`
  Creates a rounded border that uses the given color for the component.
  `static Border`
  `createUndelineBorder(float thickness)`
  Creates an underline border that uses the color of the component foreground for drawing
  `static Border`
  `createUndelineBorder(int thickness)`
  Creates an underline border that uses the color of the component foreground for drawing
  `static Border`
  `createUnderlineBorder(float thickness)`
  Creates an underline border that uses the color of the component foreground for drawing
  `static Border`
  `createUnderlineBorder(float thickness, int color)`
  Creates an underline border that uses the given color
  `static Border`
  `createUnderlineBorder(int thickness)`
  Creates an underline border that uses the color of the component foreground for drawing
  `static Border`
  `createUnderlineBorder(int thickness, int color)`
  Creates an underline border that uses the given color
  `static Border`
  `createVerticalImageBorder(Image top, Image bottom, Image center)`
  This is an image border that can only grow vertically
  `Border[]`
  `getCompoundBorders()`
  This method returns the Compound Borders array.
  `static Border`
  `getDefaultBorder()`
  Gets the default border to the given value
  `static Border`
  `getEmpty()`
  Returns an empty border, this is mostly useful for overriding components that have a border by default
  `Border`
  `getFocusedInstance()`
  Returns the focused version of the border if one is installed
  `Border`
  `getPressedInstance()`
  Returns the pressed version of the border if one is set by the user
  `Object`
  `getProperty(String n)`
  This method is for internal usage only!
  `int`
  `getThickness()`
  This method returns how thick is the border in pixels, notice this doesn't apply to most border types
  `protected Rectangle`
  `getTrackComponent()`
  The track component is an area to which an arrow based border should point at.
  `boolean`
  `isEmptyBorder()`
  Indicates whether this is an empty border
  `boolean`
  `isPaintOuterBorderFirst()`
  Allows toggling the order in which the outer and inner borders are painted for the Outer border type
  `boolean`
  `isRectangleType()`
  Returns true if this border type is a rectangle border.
  `void`
  `lock()`
  This callback indicates that a component pointing at this border is initialized, this method is useful for image borders whose lock methods are implicitly invoked.
  `Border`
  `mirrorBorder()`
  If a border is a horizontal image border it can be mirrored which is useful for an RTL scenario
  `void`
  `paint(Graphics g, Component c)`
  Draws the border for the given component, this method is called before a call to background painting is made.
  `static void`
  `setDefaultBorder(Border border)`
  Sets the default border to the given value
  `void`
  `setFocusedInstance(Border focused)`
  Allows us to define a border that will act as the focused version of this border
  `void`
  `setImageBorderSpecialTile(Image tileTop, Image tileBottom, Image tileLeft, Image tileRight, Component trackComponent)`
  This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images.
  `void`
  `setImageBorderSpecialTile(Image tileTop, Image tileBottom, Image tileLeft, Image tileRight, Rectangle trackComponent)`
  This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images.
  `void`
  `setPaintOuterBorderFirst(boolean paintOuterBorderFirst)`
  Allows toggling the order in which the outer and inner borders are painted for the Outer border type
  `void`
  `setPressedInstance(Border pressed)`
  Allows us to define a border that will act as the pressed version of this border
  `void`
  `setThickness(int thickness)`
  This method returns sets the border thickness in pixels, notice this doesn't apply to most border types
  `void`
  `setTrackComponent(Component trackComponent)`
  In the case of an arrow border the track component lets us track the position to which the border is pointing
  `void`
  `setTrackComponent(Rectangle trackComponent)`
  In the case of an arrow border the track component lets us track the position to which the border is pointing
  `void`
  `unlock()`
  This callback indicates that a component pointing at this border is now deinitilized This method may be invoked multiple times.

  ### Methods inherited from class Object

  `clone, getClass, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(long timeout)`
  Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
  `final void`
  `wait(long timeout, int nanos)`
  Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

- ## Method Details

  - ### create

    public static RoundBorder create()

    Creates a flat round border with no stroke and no shadow and the default color, this call can be chained with the other calls to mutate the color/opacity etc.

    ###### Returns

    a border instance

  - ### uiid

    public RoundBorder uiid(boolean uiid)

    Uses the style of the components UIID to draw the background of the border, this effectively overrides all other style settings but allows the full power of UIID drawing including gradients, background images etc.

    **Notice: **this flag will only work when shaped clipping is supported. That feature isn't available in all platforms...

    ###### Parameters

    - `uiid`: true to use the background of the component setting

    ###### Returns

    border instance so these calls can be chained

  - ### getUIID

    public boolean getUIID()

    True is we use the background of the component setting to draw

    ###### Returns

    true if we draw based on the component UIID

  - ### color

    public RoundBorder color(int color)

    Sets the background color of the circle/rectangle

    ###### Parameters

    - `color`: the color

    ###### Returns

    border instance so these calls can be chained

  - ### opacity

    public RoundBorder opacity(int opacity)

    Sets the background opacity of the circle/rectangle

    ###### Parameters

    - `opacity`: the background opacity from 0-255 where 255 is completely opaque

    ###### Returns

    border instance so these calls can be chained

  - ### strokeOpacity

    public RoundBorder strokeOpacity(int strokeOpacity)

    Sets the opacity of the stroke line around the circle/rectangle

    ###### Parameters

    - `strokeOpacity`: the opacity from 0-255 where 255 is completely opaque

    ###### Returns

    border instance so these calls can be chained

  - ### strokeColor

    public RoundBorder strokeColor(int strokeColor)

    Sets the stroke color of the circle/rectangle

    ###### Parameters

    - `strokeColor`: the color

    ###### Returns

    border instance so these calls can be chained

  - ### stroke

    public RoundBorder stroke(Stroke stroke)

    Sets the stroke of the circle/rectangle

    ###### Parameters

    - `stroke`: the stroke object

    ###### Returns

    border instance so these calls can be chained

  - ### stroke

    public RoundBorder stroke(float stroke, boolean mm)

    Sets the stroke of the circle/rectangle

    ###### Parameters

    - `stroke`: the thickness of the stroke object

    - `mm`: set to true to indicate the value is in millimeters, false indicates pixels

    ###### Returns

    border instance so these calls can be chained

  - ### strokeAngle

    public RoundBorder strokeAngle(int strokeAngle)

    Sets the stroke angle of the circle, this only applies to circular versions

    ###### Parameters

    - `strokeAngle`: the stroke angle in degrees

    ###### Returns

    border instance so these calls can be chained

  - ### shadowSpread

    public RoundBorder shadowSpread(int shadowSpread, boolean mm)

    Sets the spread in pixels of the shadow i.e how much bigger is it than the actual circle/rectangle

    ###### Parameters

    - `shadowSpread`: the amount in pixels representing the size of the shadow

    - `mm`: set to true to indicate the value is in millimeters, false indicates pixels

    ###### Returns

    border instance so these calls can be chained

  - ### shadowSpread

    public RoundBorder shadowSpread(int shadowSpread)

    Sets the spread in pixels of the shadow i.e how much bigger is it than the actual circle/rectangle

    ###### Parameters

    - `shadowSpread`: the amount in pixels representing the size of the shadow

    ###### Returns

    border instance so these calls can be chained

  - ### shadowOpacity

    public RoundBorder shadowOpacity(int shadowOpacity)

    Sets the opacity of the shadow from 0 - 255 where 0 means no shadow and 255 means opaque black shadow

    ###### Parameters

    - `shadowOpacity`: the opacity of the shadow

    ###### Returns

    border instance so these calls can be chained

  - ### shadowX

    public RoundBorder shadowX(float shadowX)

    The position of the shadow on the X axis where 0.5f means the center and higher values draw it to the right side

    ###### Parameters

    - `shadowX`: the position of the shadow between 0 - 1 where 0 equals left and 1 equals right

    ###### Returns

    border instance so these calls can be chained

  - ### shadowY

    public RoundBorder shadowY(float shadowY)

    The position of the shadow on the Y axis where 0.5f means the center and higher values draw it to the bottom

    ###### Parameters

    - `shadowY`: the position of the shadow between 0 - 1 where 0 equals top and 1 equals bottom

    ###### Returns

    border instance so these calls can be chained

  - ### shadowBlur

    public RoundBorder shadowBlur(float shadowBlur)

    The blur on the shadow this is the standard Gaussian blur radius

    ###### Parameters

    - `shadowBlur`: The blur on the shadow this is the standard Gaussian blur radius

    ###### Returns

    border instance so these calls can be chained

  - ### rectangle

    public RoundBorder rectangle(boolean rectangle)

    When set to true this border grows into a rectangle when the space isn't perfectly circular

    ###### Parameters

    - `rectangle`: When set to true this border grows into a rectangle when the space isn't perfectly circular

    ###### Returns

    border instance so these calls can be chained

  - ### onlyLeftRounded

    public RoundBorder onlyLeftRounded(boolean onlyLeftRounded)

    Forces a special case of the rectangle mode that renders the right side as square. This is ignored when the rectangle mode is false

    ###### Parameters

    - `onlyLeftRounded`: the new state of this mode

    ###### Returns

    border instance so these calls can be chained

  - ### isOnlyLeftRounded

    public boolean isOnlyLeftRounded()

    Checks if only left side is rounded.

    ###### Returns

    True if only left side is rounded.

    ###### Since

    7.0

  - ### onlyRightRounded

    public RoundBorder onlyRightRounded(boolean onlyRightRounded)

    Forces a special case of the rectangle mode that renders the left side as square. This is ignored when the rectangle mode is false

    ###### Parameters

    - `onlyRightRounded`: the new state of this mode

    ###### Returns

    border instance so these calls can be chained

  - ### isOnlyRightRounded

    public boolean isOnlyRightRounded()

    Checks if only right side is rounded.

    ###### Returns

    True if only right side is rounded.

    ###### Since

    7.0

  - ### paintBorderBackground

    public void paintBorderBackground(Graphics g, Component c)
    Description copied from class: `Border`

    Has effect when the border demands responsibility for background painting normally the painter will perform this work but in this case the border might do it instead.

    ###### Parameters

    - `g`: graphics context to draw onto

    - `c`: component whose border should be drawn

    Overrides:
      `paintBorderBackground` in class `Border`

  - ### getMinimumHeight

    public int getMinimumHeight()
    Description copied from class: `Border`

    Returns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g. for the case of an image border the minimum height would be top + bottom and the minimum width would be left+right

    ###### Returns

    0 if not applicable or a dimension if it is.

    Overrides:
      `getMinimumHeight` in class `Border`

  - ### getMinimumWidth

    public int getMinimumWidth()
    Description copied from class: `Border`

    Returns the minimum size required to properly display this border, normally this is 0 but a border might deem itself undisplayable with too small a size e.g. for the case of an image border the minimum height would be top + bottom and the minimum width would be left+right

    ###### Returns

    0 if not applicable or a dimension if it is.

    Overrides:
      `getMinimumWidth` in class `Border`

  - ### isBackgroundPainter

    public boolean isBackgroundPainter()
    Description copied from class: `Border`

    Returns true if installing this border will override the painting of the component background

    ###### Returns

    true if this border replaces the painter

    Overrides:
      `isBackgroundPainter` in class `Border`

  - ### getColor

    public int getColor()

    The color of the border background

    ###### Returns

    the color

  - ### getOpacity

    public int getOpacity()

    The opacity (transparency) of the border background

    ###### Returns

    the opacity

  - ### getStrokeColor

    public int getStrokeColor()

    The color of the edge of the border if applicable

    ###### Returns

    the strokeColor

  - ### getStrokeOpacity

    public int getStrokeOpacity()

    The opacity of the edge of the border if applicable

    ###### Returns

    the strokeOpacity

  - ### getStrokeThickness

    public float getStrokeThickness()

    The thickness of the edge of the border if applicable, 0 if no stroke is needed

    ###### Returns

    the strokeThickness

  - ### isStrokeMM

    public boolean isStrokeMM()

    True if the thickness of the stroke is in millimeters

    ###### Returns

    the strokeMM

  - ### getShadowSpread

    public int getShadowSpread()

    The spread of the shadow in pixels of millimeters

    ###### Returns

    the shadowSpread

  - ### getShadowOpacity

    public int getShadowOpacity()

    The opacity of the shadow between 0 and 255

    ###### Returns

    the shadowOpacity

  - ### getShadowX

    public float getShadowX()

    X axis bias of the shadow between 0 and 1 where 0 is to the top and 1 is to the bottom, defaults to 0.5

    ###### Returns

    the shadowX

  - ### getShadowY

    public float getShadowY()

    Y axis bias of the shadow between 0 and 1 where 0 is to the left and 1 is to the right, defaults to 0.5

    ###### Returns

    the shadowY

  - ### getShadowBlur

    public float getShadowBlur()

    The Gaussian blur size

    ###### Returns

    the shadowBlur

  - ### isShadowMM

    public boolean isShadowMM()

    True if the shadow spread is in millimeters

    ###### Returns

    the shadowMM

  - ### isRectangle

    public boolean isRectangle()

    True if this border grows into a rectangle horizontally or keeps growing as a circle

    ###### Returns

    the rectangle

  - ### equals

    public boolean equals(Object obj)
    Description copied from class: `Border`
    {Indicates whether some other object is "equal to" this one. The equals method implements an equivalence relation: It is reflexive: for any reference value x, x.equals(x) should return true. It is symmetric: for any reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true. It is transitive: for any reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true. It is consistent: for any reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the object is modified. For any non-null reference value x, x.equals(null) should return false. The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).}
    Overrides:
      `equals` in class `Border`

  - ### hashCode

    public int hashCode()
    Description copied from class: `Border`
    Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable. The general contract of hashCode is: Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables. As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
    Overrides:
      `hashCode` in class `Border`