Skip to main content

RectangleOffset Class

Defines offsets from shape edges.

Declaration

public final class RectangleOffset extends Struct<RectangleOffset> implements Cloneable

Implements

java.lang.Cloneable

Inherited Members

com.devexpress.system.Struct.equals(java.lang.Object)
com.devexpress.system.Struct.getHashCode()
com.devexpress.system.Struct.hashCode()
java.lang.Object.clone()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.Struct
RectangleOffset

Constructors

RectangleOffset() Constructor

Initializes a new instance of the RectangleOffset class.

Declaration

public RectangleOffset()

RectangleOffset(float left, float top, float right, float bottom) Constructor

Initializes a new instance of the RectangleOffset class with specified settings.

Declaration

public RectangleOffset(float left, float top, float right, float bottom)

Parameters

Name Type Description
left float

Specifies the left offset.

top float

Specifies the top offset.

right float

Specifies the right offset.

bottom float

Specifies the bottom offset.

RectangleOffset(float left, float top, float right) Constructor

Initializes a new instance of the RectangleOffset class with specified settings.

Declaration

public RectangleOffset(float left, float top, float right)

Parameters

Name Type Description
left float

Specifies the left offset.

top float

Specifies the top offset.

right float

Specifies the right offset.

RectangleOffset(float left, float top) Constructor

Initializes a new instance of the RectangleOffset class with specified settings.

Declaration

public RectangleOffset(float left, float top)

Parameters

Name Type Description
left float

Specifies the left offset.

top float

Specifies the top offset.

RectangleOffset(float left) Constructor

Initializes a new instance of the RectangleOffset class with specified settings.

Declaration

public RectangleOffset(float left)

Parameters

Name Type Description
left float

Specifies the left offset.

RectangleOffset(RectangleOffset other) Constructor

Initializes a new instance of the RectangleOffset class with specified settings.

Declaration

public RectangleOffset(RectangleOffset other)

Parameters

Name Type Description
other RectangleOffset

Specifies the rectangle offset to copy.

Methods

clone() Method

Creates a copy of the current RectangleOffset object.

Declaration

public RectangleOffset clone()

Returns

Type Description
RectangleOffset

A copy of the current rectangle offset.

equals(Object obj) Method

Determines whether the specified object is equal to this rectangle offset.

Declaration

public boolean equals(Object obj)

Parameters

Name Type Description
obj Object

The object to compare with this rectangle offset.

Returns

Type Description
boolean

true if the specified object is equal to this rectangle offset; otherwise, false.

getBottom() Method

Returns the offset from the bottom edge of the shape.

Declaration

public float getBottom()

Returns

Type Description
float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

getLeft() Method

Returns the offset from the left edge of the shape.

Declaration

public float getLeft()

Returns

Type Description
float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

getRight() Method

Returns the offset from the right edge of the shape.

Declaration

public float getRight()

Returns

Type Description
float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

getTop() Method

Returns the offset from the top edge of the shape.

Declaration

public float getTop()

Returns

Type Description
float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

hashCode() Method

Returns a hash code value for this rectangle offset.

Declaration

public int hashCode()

Returns

Type Description
int

The hash code.

setBottom(float value) Method

Sets the offset from the bottom edge of the shape.

Declaration

public void setBottom(float value)

Parameters

Name Type Description
value float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

setLeft(float value) Method

Sets the offset from the left edge of the shape.

Declaration

public void setLeft(float value)

Parameters

Name Type Description
value float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

setRight(float value) Method

Sets the offset from the right edge of the shape.

Declaration

public void setRight(float value)

Parameters

Name Type Description
value float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.

setTop(float value) Method

Sets the offset from the top edge of the shape.

Declaration

public void setTop(float value)

Parameters

Name Type Description
value float

The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset.