Corners

Inheritance: java.lang.Object

public class Corners

Represents corners of a square graphical object.

Constructors

Constructor Description
Corners() Initializes a new instance of Corners class using zero values.
Corners(double all) Initializes a new instance of the Corners class using the supplied value for all corners.
Corners(double topLeft, double topRight, double bottomLeft, double bottomRight) Initializes a new instance of the Corners class using the supplied values.

Fields

Field Description
Empty Provides a Corners object with no data.

Methods

Method Description
getAll() Gets or sets the value for all corners.
setAll(double value) Gets or sets the value for all corners.
getTopLeft() Gets or sets top left corner value.
setTopLeft(double value) Gets or sets top left corner value.
getTopRight() Gets or sets top right corner value.
setTopRight(double value) Gets or sets top right corner value.
getBottomLeft() Gets or sets bottom left corner value.
setBottomLeft(double value) Gets or sets bottom left corner value.
getBottomRight() Gets or sets bottom right corner value.
setBottomRight(double value) Gets or sets bottom right corner value.
deepClone() Gets a copy of this object.
equals(Object obj) Override equals method
hashCode() Overrides obtaining unique hash code value
toString() Overrides conversion to string.

Corners()

public Corners()

Initializes a new instance of Corners class using zero values.

Corners(double all)

public Corners(double all)

Initializes a new instance of the Corners class using the supplied value for all corners.

Parameters:

Parameter Type Description
all double The value to be used for padding for all corners.

Corners(double topLeft, double topRight, double bottomLeft, double bottomRight)

public Corners(double topLeft, double topRight, double bottomLeft, double bottomRight)

Initializes a new instance of the Corners class using the supplied values.

Parameters:

Parameter Type Description
topLeft double Top left corner value.
topRight double Top right corner value.
bottomLeft double Bottom left corner value.
bottomRight double Bottom right corner value.

Empty

public static final Corners Empty

Provides a Corners object with no data.

getAll()

public final double getAll()

Gets or sets the value for all corners. Changing of any partial corner like top right makes this property equal 0;

Returns: double

setAll(double value)

public final void setAll(double value)

Gets or sets the value for all corners. Changing of any partial corner like top right makes this property equal 0;

Parameters:

Parameter Type Description
value double

getTopLeft()

public final double getTopLeft()

Gets or sets top left corner value.

Returns: double

setTopLeft(double value)

public final void setTopLeft(double value)

Gets or sets top left corner value.

Parameters:

Parameter Type Description
value double

getTopRight()

public final double getTopRight()

Gets or sets top right corner value.

Returns: double

setTopRight(double value)

public final void setTopRight(double value)

Gets or sets top right corner value.

Parameters:

Parameter Type Description
value double

getBottomLeft()

public final double getBottomLeft()

Gets or sets bottom left corner value.

Returns: double

setBottomLeft(double value)

public final void setBottomLeft(double value)

Gets or sets bottom left corner value.

Parameters:

Parameter Type Description
value double

getBottomRight()

public final double getBottomRight()

Gets or sets bottom right corner value.

Returns: double

setBottomRight(double value)

public final void setBottomRight(double value)

Gets or sets bottom right corner value.

Parameters:

Parameter Type Description
value double

deepClone()

public final Object deepClone()

Gets a copy of this object.

Returns: java.lang.Object

equals(Object obj)

public boolean equals(Object obj)

Override equals method

Parameters:

Parameter Type Description
obj java.lang.Object Instance to compare with.

Returns: boolean - Returns true if properties of objects are equal.

hashCode()

public int hashCode()

Overrides obtaining unique hash code value

Returns: int -

toString()

public String toString()

Overrides conversion to string.

Returns: java.lang.String -