Packagecom.yworks.canvas.input
Classpublic class SizeConstraintProvider
InheritanceSizeConstraintProvider Inheritance Object
Implements ISizeConstraintProvider

A simple default implementation of ISizeConstraintProvider



Public Properties
 PropertyDefined By
  maximumSize : ISize
Gets or sets the instance to be returned by getMaximumSize().
SizeConstraintProvider
  minimumEnclosedArea : IRectangle
Gets or sets the instance to be returned by getMinimumEnclosedArea().
SizeConstraintProvider
  minimumSize : ISize
Gets or sets the instance to be returned by getMinimumSize().
SizeConstraintProvider
Public Methods
 MethodDefined By
  
SizeConstraintProvider(minimumSize:ISize, maximumSize:ISize, minimumEnclosedArea:IRectangle = null)
Creates a new instance using the provided size instances as the initial values.
SizeConstraintProvider
  
getMaximumSize(item:Object):ISize
Returns the maximum size allowed for the given item.
SizeConstraintProvider
  
Returns the minimum area that needs to be enclosed by the given item.
SizeConstraintProvider
  
getMinimumSize(item:Object):ISize
Returns the minimum size allowed for the given item.
SizeConstraintProvider
Property Detail
maximumSizeproperty
maximumSize:ISize

Gets or sets the instance to be returned by getMaximumSize().


Implementation
    public function get maximumSize():ISize
    public function set maximumSize(value:ISize):void
minimumEnclosedAreaproperty 
minimumEnclosedArea:IRectangle

Gets or sets the instance to be returned by getMinimumEnclosedArea().


Implementation
    public function get minimumEnclosedArea():IRectangle
    public function set minimumEnclosedArea(value:IRectangle):void
minimumSizeproperty 
minimumSize:ISize

Gets or sets the instance to be returned by getMinimumSize().


Implementation
    public function get minimumSize():ISize
    public function set minimumSize(value:ISize):void
Constructor Detail
SizeConstraintProvider()Constructor
public function SizeConstraintProvider(minimumSize:ISize, maximumSize:ISize, minimumEnclosedArea:IRectangle = null)

Creates a new instance using the provided size instances as the initial values.

Parameters
minimumSize:ISize — The minimum size.
 
maximumSize:ISize — The maximum size.
 
minimumEnclosedArea:IRectangle (default = null) — The minimum enclosed area. If this parameter is not used, ImmutableRectangle.EMPTY will be used.
Method Detail
getMaximumSize()method
public function getMaximumSize(item:Object):ISize

Returns the maximum size allowed for the given item.

Parameters

item:Object — The item to return the maximum size for.

Returns
ISize — The maximum size or ImmutableSize.UNBOUND if there is no constraint on the size.
getMinimumEnclosedArea()method 
public function getMinimumEnclosedArea(item:Object):IRectangle

Returns the minimum area that needs to be enclosed by the given item.

Parameters

item:Object — The item to return the area for.

Returns
IRectangle — The area to enclose or ImmutableRectangle.EMPTY if there is no constraint on the size due to an enclosed area.
getMinimumSize()method 
public function getMinimumSize(item:Object):ISize

Returns the minimum size allowed for the given item.

Parameters

item:Object — The item to return the minimum size for.

Returns
ISize — The minimum size or ImmutableSize.EMPTY if there is no constraint on the size.