|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Sizeable
Interface to be implemented by components wishing to display some object that may be dynamically resized during runtime.
| Field Summary | |
|---|---|
static float |
SIZE_UNDEFINED
|
static String[] |
UNIT_SYMBOLS
Textual representations of units symbols. |
static int |
UNITS_CM
Unit code representing centimeters. |
static int |
UNITS_EM
Unit code representing the font-size of the relevant font. |
static int |
UNITS_EX
Unit code representing the x-height of the relevant font. |
static int |
UNITS_INCH
Unit code representing inches. |
static int |
UNITS_MM
Unit code representing millimeters. |
static int |
UNITS_PERCENTAGE
Unit code representing in percentage of the containing element defined by terminal. |
static int |
UNITS_PICAS
Unit code representing picas (12 points). |
static int |
UNITS_PIXELS
Unit code representing pixels. |
static int |
UNITS_POINTS
Unit code representing points (1/72nd of an inch). |
| Method Summary | |
|---|---|
float |
getHeight()
Gets the height of the object. |
int |
getHeightUnits()
Gets the height property units. |
float |
getWidth()
Gets the width of the object. |
int |
getWidthUnits()
Gets the width property units. |
void |
setHeight(float height)
Deprecated. Consider using setHeight(String) or
setHeight(float, int) instead. This method works,
but is error-prone since the unit must be set separately (and
components might have different default unit). |
void |
setHeight(float height,
int unit)
Sets the height of the object. |
void |
setHeight(String height)
Sets the height of the component using String presentation. |
void |
setHeightUnits(int units)
Deprecated. Consider setting height and unit simultaneously using setHeight(String) or setHeight(float, int),
which is less error-prone. |
void |
setSizeFull()
Sets the size to 100% x 100%. |
void |
setSizeUndefined()
Clears any size settings. |
void |
setWidth(float width)
Deprecated. Consider using setWidth(String) instead. This method
works, but is error-prone since the unit must be set
separately (and components might have different default
unit). |
void |
setWidth(float width,
int unit)
Sets the width of the object. |
void |
setWidth(String width)
Sets the width of the component using String presentation. |
void |
setWidthUnits(int units)
Deprecated. Consider setting width and unit simultaneously using setWidth(String) or setWidth(float, int),
which is less error-prone. |
| Field Detail |
|---|
static final int UNITS_PIXELS
static final int UNITS_POINTS
static final int UNITS_PICAS
static final int UNITS_EM
static final int UNITS_EX
static final int UNITS_MM
static final int UNITS_CM
static final int UNITS_INCH
static final int UNITS_PERCENTAGE
static final float SIZE_UNDEFINED
static final String[] UNIT_SYMBOLS
UNITS_PIXELS: "px"UNITS_POINTS: "pt"UNITS_PICAS: "pc"UNITS_EM: "em"UNITS_EX: "ex"UNITS_MM: "mm"UNITS_CM. "cm"UNITS_INCH: "in"UNITS_PERCENTAGE: "%"Sizeable.UNIT_SYMBOLS[UNITS_PIXELS].
| Method Detail |
|---|
float getWidth()
@Deprecated void setWidth(float width)
setWidth(String) instead. This method
works, but is error-prone since the unit must be set
separately (and components might have different default
unit).
width - the width of the object in units specified by widthUnits
property.float getHeight()
@Deprecated void setHeight(float height)
setHeight(String) or
setHeight(float, int) instead. This method works,
but is error-prone since the unit must be set separately (and
components might have different default unit).
height - the height of the object in units specified by heightUnits
property.int getWidthUnits()
@Deprecated void setWidthUnits(int units)
setWidth(String) or setWidth(float, int),
which is less error-prone.
units - the units used in width property.int getHeightUnits()
@Deprecated void setHeightUnits(int units)
setHeight(String) or setHeight(float, int),
which is less error-prone.
units - the units used in height property.void setHeight(String height)
height - in CSS style string representation
void setWidth(float width,
int unit)
width - the width of the object.unit - the unit used for the width. Possible values include
UNITS_PIXELS, UNITS_POINTS,
UNITS_PICAS, UNITS_EM, UNITS_EX,
UNITS_MM, UNITS_CM, UNITS_INCH,
UNITS_PERCENTAGE.
void setHeight(float height,
int unit)
height - the height of the object.unit - the unit used for the width. Possible values include
UNITS_PIXELS, UNITS_POINTS,
UNITS_PICAS, UNITS_EM, UNITS_EX,
UNITS_MM, UNITS_CM, UNITS_INCH,
UNITS_PERCENTAGE.void setWidth(String width)
width - in CSS style string representation, null or empty string to
resetvoid setSizeFull()
void setSizeUndefined()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||