public class Thickness extends Object
Describes the thickness of a frame around a rectangle.
| Constructor and Description |
|---|
Thickness(double uniformLength)
Initializes a new instance of the
Thickness class
that has the specified uniform length on each side. |
Thickness(double left,
double right,
double top,
double bottom)
Initializes a new instance of the
Thickness class
that has specific lengths applied to each side of the rectangle. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Determines whether the specified
Thickness is equal to the current Thickness. |
double |
getBottom()
Gets the width of the bottom side of the bounding rectangle.
|
double |
getLeft()
Gets the width of the left side of the bounding rectangle.
|
double |
getRight()
Gets the width of the right side of the bounding rectangle.
|
double |
getTop()
Gets the width of the top side of the bounding rectangle.
|
int |
hashCode()
Returns the hash code for this instance.
|
void |
setBottom(double value)
Sets the width of the bottom side of the bounding rectangle.
|
void |
setLeft(double value)
Sets the width of the left side of the bounding rectangle.
|
void |
setRight(double value)
Sets the width of the right side of the bounding rectangle.
|
void |
setTop(double value)
Sets the width of the top side of the bounding rectangle.
|
String |
toString()
Returns the string representation of the
Thickness class. |
public Thickness(double uniformLength)
Initializes a new instance of the Thickness class
that has the specified uniform length on each side.
uniformLength - The uniform length applied to all four sides of the bounding rectangle.public Thickness(double left,
double right,
double top,
double bottom)
Initializes a new instance of the Thickness class
that has specific lengths applied to each side of the rectangle.
left - The thickness for the left side of the rectangle.right - The thickness for the right side of the rectangle.top - The thickness for the top side of the rectangle.bottom - The thickness for the bottom side of the rectangle.public boolean equals(Object obj)
Determines whether the specified Thickness is equal to the current Thickness.
public final double getBottom()
Gets the width of the bottom side of the bounding rectangle.
public final double getLeft()
Gets the width of the left side of the bounding rectangle.
public final double getRight()
Gets the width of the right side of the bounding rectangle.
public final double getTop()
Gets the width of the top side of the bounding rectangle.
public int hashCode()
Returns the hash code for this instance.
public final void setBottom(double value)
Sets the width of the bottom side of the bounding rectangle.
value - The width of the bottom side of the bounding rectangle.public final void setLeft(double value)
Sets the width of the left side of the bounding rectangle.
value - The width of the left side of the bounding rectangle.public final void setRight(double value)
Sets the width of the right side of the bounding rectangle.
value - The width of the right side of the bounding rectangle.public final void setTop(double value)
Sets the width of the top side of the bounding rectangle.
value - The width of the top side of the bounding rectangle.Copyright © 2026. All rights reserved.