ilog.views.maps.geometry
Class IlvMapMultiArea

java.lang.Object
  extended by ilog.views.maps.IlvMapGeometry
      extended by ilog.views.maps.geometry.IlvMapArea
          extended by ilog.views.maps.geometry.IlvMapMultiArea

public class IlvMapMultiArea
extends IlvMapArea

This class defines an area that is composed of a list of IlvMapArea. The instances of this class can be rendered by an IlvDefaultFeatureRenderer or by an IlvDefaultAreaRenderer.

Since:
JViews 3.5

Constructor Summary
IlvMapMultiArea()
          Initializes an instance of the class.
 
Method Summary
 void addArea(IlvMapArea area)
          Adds an area to this IlvMapMultiArea.
 boolean contains(IlvCoordinate c)
          Returns true if c is contained in the object.
 IlvMapArea getArea(int index)
          Returns the area at the specified position.
 Rectangle2D getBounds(Rectangle2D result)
          Returns the bounds of this IlvMapGeometry
 int getCardinal()
          Returns the number of areas.
 IlvMapCurve getOutline()
          Returns the outline of the area.
 void removeAll()
          Removes all the areas.
 IlvMapArea removeArea(IlvMapArea area)
          Removes the specified area and returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapMultiArea

public IlvMapMultiArea()
Initializes an instance of the class.

Method Detail

getCardinal

public int getCardinal()
Returns the number of areas.

Returns:
The number of areas.

getArea

public IlvMapArea getArea(int index)
Returns the area at the specified position.

Parameters:
index - The index that should be ranged between 0 and getCardinal() - 1.
Returns:
An IlvMapArea object that should not be modified.

addArea

public void addArea(IlvMapArea area)
Adds an area to this IlvMapMultiArea. Since the area is not copied, the area should not be modified after being added to the collection.

Parameters:
area - The area to be added.

removeArea

public IlvMapArea removeArea(IlvMapArea area)
Removes the specified area and returns it. If the area is not part of the multiarea, the function returns null.

Parameters:
area - The area to be removed.
Returns:
The specified area if the specified area if part of the multiarea.

removeAll

public void removeAll()
Removes all the areas.


contains

public boolean contains(IlvCoordinate c)
Returns true if c is contained in the object.

Specified by:
contains in class IlvMapArea
Parameters:
c - The point to be checked.
Returns:
true if c is contained in the object.

getOutline

public IlvMapCurve getOutline()
Returns the outline of the area.
As this method returns a reference to an internal object, this object is subject to change when this IlvMapMultiArea changes.

Specified by:
getOutline in class IlvMapArea
Returns:
An IlvCurve object that should not be modified.

getBounds

public Rectangle2D getBounds(Rectangle2D result)
Returns the bounds of this IlvMapGeometry

Specified by:
getBounds in class IlvMapGeometry


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.