Packageorg.openzoom.flash.viewport.constraints
Classpublic final class CompositeConstraint
ImplementsIViewportConstraint

CompositeConstraint allows you to apply many different constraints at the same time. This class is an implementation of the Composite Design Pattern by the GoF.

Default MXML Propertyconstraints



Public Properties
 PropertyDefined by
  constraints : Array
An array of constraints that are applied successively.
CompositeConstraint
Public Methods
 MethodDefined by
  
Constructor.
CompositeConstraint
  
Validate the viewport transform by performing transformations until it validates all constraints.
CompositeConstraint
Property detail
constraintsproperty
constraints:Array  [read-write]

An array of constraints that are applied successively.

Implementation
    public function get constraints():Array
    public function set constraints(value:Array):void
Constructor detail
CompositeConstraint()constructor
public function CompositeConstraint()

Constructor.

Method detail
validate()method
public function validate(transform:IViewportTransform, target:IViewportTransform):IViewportTransform

Validate the viewport transform by performing transformations until it validates all constraints.

Parameters
transform:IViewportTransform — IViewportTransform object to be validated.
 
target:IViewportTransform — IViewportTransform object that represents the last validated transform.

Returns
IViewportTransform — Validated IViewportTransform object.