qnx.fuse.ui.layouts.LayoutMeasurement

LayoutMeasurement

Properties | Methods


Packageqnx.fuse.ui.layouts
Classpublic final class LayoutMeasurement
InheritanceLayoutMeasurement Inheritance Object

Stores and computes the size of a given control.

Class information:
PlayBook Tablet OS Version:   1.0.6

See also

SizeCache



Public Properties

 PropertyDefined By
  preferredHeight : Number
The preferred height of the control.
LayoutMeasurement
  preferredSize : Point
[read-only] Get the preferred size.
LayoutMeasurement
  preferredWidth : Number
The preferred width of the control.
LayoutMeasurement

Public Methods

 MethodDefined By
  
LayoutMeasurement(preferredWidth:Number = 0, preferredHeight:Number = 0)
Creates a LayoutMeasurement instance.
LayoutMeasurement
  
createConstrained(preferredWidth:Number, preferredHeight:Number, constrainedWidth:Number, constrainedHeight:Number):LayoutMeasurement
[static] Creates a LayoutMeasurement instance, using a combination of the component's constrained height and width, and the component's preferred height and width.
LayoutMeasurement
  
[static] Creates a LayoutMeasurement instance given the preferred size of the control.
LayoutMeasurement

Property Detail

preferredHeight


public var preferredHeight:Number

The preferred height of the control.

preferredSize


preferredSize:Point  [read-only]

Get the preferred size.


Implementation

public function get preferredSize():Point

preferredWidth


public var preferredWidth:Number

The preferred width of the control.

Constructor Detail

LayoutMeasurement()


public function LayoutMeasurement(preferredWidth:Number = 0, preferredHeight:Number = 0)

Creates a LayoutMeasurement instance.

Parameters

preferredWidth:Number (default = 0) — The preferred width of the component. Default is 0.
preferredHeight:Number (default = 0) — The preferred height of the component. Default is 0.

Method Detail

createConstrained()


public static function createConstrained(preferredWidth:Number, preferredHeight:Number, constrainedWidth:Number, constrainedHeight:Number):LayoutMeasurement

Creates a LayoutMeasurement instance, using a combination of the component's constrained height and width, and the component's preferred height and width.

If the specified constrained height or width does not match the default size of the component (as specified by the layout), then the constrainedWidth value is used as the preferred width of the LayoutMeasurement. Otherwise, the preferred width of the LayoutMeasurement is set to the specified preferred width.

Parameters

preferredWidth:Number — The preferred width of the component.
preferredHeight:Number — The preferred height of the component.
constrainedWidth:Number — The constrained width of the component.
constrainedHeight:Number — The constrained height of the component.

Returns

LayoutMeasurement — A LayoutMeasurement instance that was created using a combination of the preferred and constrained dimensions.

createFromPreferredSize()


public static function createFromPreferredSize(preferredSize:Point):LayoutMeasurement

Creates a LayoutMeasurement instance given the preferred size of the control.

Parameters

preferredSize:Point — The preferred size of the control, as a point.

Returns

LayoutMeasurement — A LayoutMeasurement instance created using the preferred size of the control.