Interface Sizeable

Interface to be implemented by components wishing to display some object that may be dynamically resized during runtime.

Synopsis

Since

3.0

Inheritance Path.  com.itmill.toolkit.terminal.Sizeable

UNIT_SYMBOLS

Textual representations of units symbols. Supported units and their symbols are:

  • UNITS_PIXELS : "" (unit is omitted for pixels)

  • UNITS_POINTS : "pt"

  • UNITS_PICAS : "pc"

  • UNITS_EM : "em"

  • UNITS_EX : "ex"

  • UNITS_MM : "mm"

  • UNITS_CM . "cm"

  • UNITS_INCH : "in"

  • UNITS_PERCENTAGE : "%"

  • UNITS_ROWS : "rows"

These can be used like Sizeable.UNIT_SYMBOLS[UNITS_PIXELS] .

UNITS_CM

Unit code representing centimetres.

UNITS_EM

Unit code representing the font-size of the relevant font.

UNITS_EX

Unit code representing the x-height of the relevant font.

UNITS_INCH

Unit code representing inches.

UNITS_MM

Unit code representing millimetres.

UNITS_PERCENTAGE

Unit code representing in percentage of the containing element defined by terminal.

UNITS_PICAS

Unit code representing picas (12 points).

UNITS_PIXELS

Unit code representing pixels.

UNITS_POINTS

Unit code representing points (1/72nd of an inch).

UNITS_ROWS

Unit code representing in rows of text. This unit is only applicaple to some components can it's meaning is specified by component implementation.

getHeight()

Parameters

return

height of the object in units specified by heightUnits property.

Get height of the object. Negative number implies unspecified size (terminal is free to set the size).

getHeightUnits()

Parameters

return

units used in height property.

Get height property units.

getWidth()

Parameters

return

width of the object in units specified by widthUnits property.

Get width of the object. Negative number implies unspecified size (terminal is free to set the size).

getWidthUnits()

Parameters

return

units used in width property.

Get width property units.

setHeight(int)

Parameters

height

height of the object in units specified by heightUnits property.

Set height of the object. Negative number implies unspecified size (terminal is free to set the size).

setHeightUnits(int)

Parameters

units

units used in height property.

Set height property units.

setWidth(int)

Parameters

width

width of the object in units specified by widthUnits property.

Set width of the object. Negative number implies unspecified size (terminal is free to set the size).

setWidthUnits(int)

Parameters

units

units used in width property.

Set width property units.