Constructor and Description |
---|
FixedDimension()
Creates a fixed dimension without constraint.
|
FixedDimension(int width,
int height)
Creates a fixed dimension with constraints.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Rectangle contentBounds,
Rectangle sizeHint)
Applies the dimension to the given size.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
void |
setHeight(int height)
Sets the height.
|
void |
setSize(int width,
int height)
Sets the width and height.
|
void |
setWidth(int width)
Sets the width.
|
public FixedDimension()
public FixedDimension(int width, int height)
width
- the width to set.height
- the height to set.public void setWidth(int width)
width
- the width to set.public void setHeight(int height)
height
- the height to set.public void setSize(int width, int height)
width
- the width to set.height
- the height to set.public void apply(Rectangle contentBounds, Rectangle sizeHint)
Dimension
The content bounds is updated.
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object