com.esri.arcgis.controls
Interface IPlaceCollection

All Superinterfaces:
Serializable
All Known Implementing Classes:
MyPlaceCollection

public interface IPlaceCollection
extends Serializable

Provides access to members that manage a place collection. Duplicate names are not allowed.

Description

The IPlaceCollection interface manages adding and removing Place objects to the collection.

Product Availability

Available with ArcGIS Engine.


Method Summary
 boolean add(IPlace pPlace, boolean allowChangeName)
          Add to place collection.
 void removeAll()
          Remove all places.
 int removeByName(String name, boolean removeMatching)
          Remove from place collection.
 

Method Detail

add

boolean add(IPlace pPlace,
            boolean allowChangeName)
            throws IOException,
                   AutomationException
Add to place collection. If allowChangeName is true and place with the same name exists, unique name will be assigned, the place will not be added otherwise.

Description

Adds the specified Place to the end of the collection.

allowChangeName specifies whether the IPlace::Name can be renamed when adding the same Place to the collection multiple times.

For example, if allowChangeName is true and a Place is added with an IPlace::Name set to "My Place", and there is already a Place object with that name in the collection the Place object will be added to the collection with an IPlace::Name set to "My Place [2]". If allowChangeName is false the Place object will not get added to the collection.

Product Availability

Available with ArcGIS Engine.

Parameters:
pPlace - A reference to a com.esri.arcgis.controls.IPlace (in)
allowChangeName - The allowChangeName (in)
Returns:
The pAdded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeByName

int removeByName(String name,
                 boolean removeMatching)
                 throws IOException,
                        AutomationException
Remove from place collection. If RemoveMatching is true, all places will be removed whose name matches the unique name generation pattern. Otherwise place is removed if the name is an exact match.

Description

Removes the Place object with the specified IPlace::Name from the collection. Returns the number of Place objects removed.

removeMatching specifies whether Place objects with IPlace::Name properties matching the following pattern will be removed: "My Place", "My Place [2]" and "My Place [3]". Place objects are added to the collection with this pattern when allowChangeName is passed as true to the Add method.

Product Availability

Available with ArcGIS Engine.

Parameters:
name - The name (in)
removeMatching - The removeMatching (in)
Returns:
The pRemovedCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAll

void removeAll()
               throws IOException,
                      AutomationException
Remove all places.

Description

Removes all of the Place objects from the collection.

Product Availability

Available with ArcGIS Engine.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.