BiAreaCollection

This collection contains BiArea objects This implements the same interface as BiSelectionItemCollection

This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiAreaCollection .

Constructor

new BiAreaCollection ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
changeValueObjectcheckedThis is used by BiSelectionModel to compare whether the collection has changed. Two identical collections should always return the same value. If a change has occured the change value must also change

Methods

NameDescription
addAdds an area to the collection. This does not check whether the area might intersect with any of the existing areas in the collection
containsWhether the collection contains the area. This also returns true if one of the areas in the collection completely encloses the area.
getItemHashCodeReturns an identifier for the area
hitTestTests whether a point is inside any of the areas in the collection
isEmptyWhether the collection is empty
removeRemoves an area from the collection.
removeAllRemoves all the areas in the collection making it empty
toArrayReturns an array containing the areas in the collection

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

add

Adds an area to the collection. This does not check whether the area might intersect with any of the existing areas in the collection

Syntax

object.add ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to add

Return Type

void

contains

Whether the collection contains the area. This also returns true if one of the areas in the collection completely encloses the area.

Syntax

object.contains ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to test whether the collection contains

Return Type

Boolean

getItemHashCode

Returns an identifier for the area

Syntax

object.getItemHashCode ( oItem )

Parameters

NameTypeOptionalDefaultDescripton
oItemBiAreaThe area to get the identifier for

Return Type

String

hitTest

Tests whether a point is inside any of the areas in the collection

Syntax

object.hitTest ( x,y )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe x coordinate
yNumberThe y coordinate

Return Type

Boolean

isEmpty

Whether the collection is empty

Syntax

object.isEmpty ( )

Parameters

No arguments.

Return Type

Boolean

remove

Removes an area from the collection.

Syntax

object.remove ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to remove

Return Type

void

removeAll

Removes all the areas in the collection making it empty

Syntax

object.removeAll ( )

Parameters

No arguments.

Return Type

void

toArray

Returns an array containing the areas in the collection

Syntax

object.toArray ( )

Parameters

No arguments.

Return Type

BiArea[]