Package muntjac :: Package terminal :: Module sizeable :: Class ISizeable
[hide private]
[frames] | no frames]

Class ISizeable

source code

object --+
         |
        ISizeable
Known Subclasses:

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


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
getWidth(self)
Gets the width of the object.
source code
 
setWidth(self, *args)
Sets the width of the object.
source code
 
getHeight(self)
Gets the height of the object.
source code
 
setHeight(self, *args)
Sets the height of the object.
source code
 
getWidthUnits(self)
Gets the width property units.
source code
 
setWidthUnits(self, units)
Sets the width property units.
source code
 
getHeightUnits(self)
Gets the height property units.
source code
 
setHeightUnits(self, units)
Sets the height property units.
source code
 
setSizeFull(self)
Sets the size to 100% x 100%.
source code
 
setSizeUndefined(self)
Clears any size settings.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  UNITS_PIXELS = 0
Unit code representing pixels.
  UNITS_POINTS = 1
Unit code representing points (1/72nd of an inch).
  UNITS_PICAS = 2
Unit code representing picas (12 points).
  UNITS_EM = 3
Unit code representing the font-size of the relevant font.
  UNITS_EX = 4
Unit code representing the x-height of the relevant font.
  UNITS_MM = 5
Unit code representing millimeters.
  UNITS_CM = 6
Unit code representing centimeters.
  UNITS_INCH = 7
Unit code representing inches.
  UNITS_PERCENTAGE = 8
Unit code representing in percentage of the containing element
  SIZE_UNDEFINED = -1
  UNIT_SYMBOLS = ['px', 'pt', 'pc', 'em', 'ex', 'mm', 'cm', 'in'...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getWidth(self)

source code 

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

Returns:
width of the object in units specified by widthUnits property.

setWidth(self, *args)

source code 

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

Parameters:

getHeight(self)

source code 

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

Returns:
height of the object in units specified by heightUnits property.

setHeight(self, *args)

source code 

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

Parameters:
  • args - tuple of the form
    • (height)
      1. the height of the object in units specified by heightUnits property or the height of the component using string presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size.
    • (height, unit)
      1. the height of the object.
      2. 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.

getWidthUnits(self)

source code 

Gets the width property units.

Returns:
units used in width property.

setWidthUnits(self, units)

source code 

Sets the width property units.

Parameters:
  • units - the units used in width property.

Deprecated: Consider setting width and unit simultaneously using setWidth, which is less error-prone.

getHeightUnits(self)

source code 

Gets the height property units.

Returns:
units used in height property.

setHeightUnits(self, units)

source code 

Sets the height property units.

Parameters:
  • units - the units used in height property.

Deprecated: Consider setting height and unit simultaneously using setHeight or which is less error-prone.


Class Variable Details [hide private]

UNIT_SYMBOLS

Value:
['px', 'pt', 'pc', 'em', 'ex', 'mm', 'cm', 'in', '%']