@ClientOnly public class RequestDimension extends Object implements Cloneable
CDockable
would like to have.Constructor and Description |
---|
RequestDimension()
Creates a new request dimension where width and height are not set.
|
RequestDimension(Dimension size)
Creates a new request taking with and height from
source . |
RequestDimension(int value,
boolean valueIsWidth)
Creates a new request dimension where either width or height is set.
|
RequestDimension(int width,
int height)
Creates a new request dimension where width and height are set.
|
RequestDimension(RequestDimension original)
Creates a new request dimension copying all fields from
original . |
Modifier and Type | Method and Description |
---|---|
RequestDimension |
clone() |
void |
deleteHeight()
Deletes the height of this dimension.
|
void |
deleteWidth()
Deletes the width of this dimension.
|
boolean |
equals(Object obj) |
int |
getHeight()
Gets the height of this dimension, clients should first check
isHeightSet() . |
int |
getWidth()
Gets the width of this dimension, clients should first check
isWidthSet() . |
int |
hashCode() |
boolean |
isHeightSet()
Tells whether the
height of this dimension was
or is invalid. |
boolean |
isWidthSet()
Tells whether the
width was set or is invalid. |
static RequestDimension |
request(int width,
int height)
Creates a
RequestDimension affecting the width and height of a Dockable . |
static RequestDimension |
requestHeight(int height)
Creates a
RequestDimension only affecting the height of a Dockable . |
static RequestDimension |
requestWidth(int width)
Creates a
RequestDimension only affecting the width of a Dockable . |
void |
setHeight(int height)
Sets the height of this dimension.
|
void |
setWidth(int width)
Sets the width of this dimension.
|
String |
toString() |
public RequestDimension()
public RequestDimension(RequestDimension original)
original
.original
- the original from which to copy all settingspublic RequestDimension(Dimension size)
source
.size
- the size of this dimensionRequestDimension(int, int)
public RequestDimension(int width, int height)
width
- the initial value of widthheight
- the initial value of heightsetWidth(int)
,
setHeight(int)
public RequestDimension(int value, boolean valueIsWidth)
value
- the value for the width or the heightvalueIsWidth
- if true
then value
is
considered to be the width, else value
is considered
to be the heightpublic static RequestDimension requestWidth(int width)
RequestDimension
only affecting the width of a Dockable
. This
method is equivalent of calling new RequestDimension( width, true )
.width
- the requested widthpublic static RequestDimension requestHeight(int height)
RequestDimension
only affecting the height of a Dockable
. This
method is equivalent of calling new RequestDimension( height, false )
.height
- the requested heightpublic static RequestDimension request(int width, int height)
RequestDimension
affecting the width and height of a Dockable
. This
method is equivalent of calling new RequestDimension( width, height )
.width
- the requested widthheight
- the requested heightpublic void setWidth(int width)
isWidthSet()
to true
.width
- the new widthpublic int getWidth()
isWidthSet()
.public boolean isWidthSet()
width
was set or is invalid.true
if the width is validpublic void deleteWidth()
isWidthSet()
will be false
.public void setHeight(int height)
isHeightSet()
to true
.height
- the new heightpublic int getHeight()
isHeightSet()
.public boolean isHeightSet()
height
of this dimension was
or is invalid.true
if the height is validpublic void deleteHeight()
isHeightSet()
will change to false
.public RequestDimension clone()