com.esri.arcgis.controls
Class MyPlaceCollection

java.lang.Object
  extended by com.esri.arcgis.controls.MyPlaceCollection
All Implemented Interfaces:
IEnumPlace, IPlaceCollection, IConnectionPointContainer, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, Externalizable, Serializable

public class MyPlaceCollection
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IPlaceCollection, IPersistStream, IPersist, IConnectionPointContainer, IEnumPlace, Externalizable

A singleton class that manage the collection of my places.

Description

The MyPlaceCollection object is a singleton object (only one instance of the MyPlaceCollection object is supported per thread) that manages "My Places". For example, it can be used to manage 'Places 'used by ArcWeb Services or your own custom functions. For example, you could select a feature or select a graphic element and add them to the collection. Once each Place is added to the collection it is independant from the original map, so even if the map changes you can still zoom to, center at, or flash that Place.

Product Availability

Available with ArcGIS Engine.

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
MyPlaceCollection()
          Constructs a MyPlaceCollection using ArcGIS Engine.
MyPlaceCollection(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MyPlaceCollection theMyPlaceCollection = (MyPlaceCollection) obj;
 
Method Summary
 boolean add(IPlace pPlace, boolean allowChangeName)
          Add to place collection.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 int getCount()
          The number of places in the enumeration.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 IPlace next()
          Returns the next place in the enumeration.
 void readExternal(ObjectInput in)
           
 void removeAll()
          Remove all places.
 int removeByName(String name, boolean removeMatching)
          Remove from place collection.
 void reset()
          Reset the enumeration to start from beginning.
 void save(IStream pstm, int fClearDirty)
          save
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

MyPlaceCollection

public MyPlaceCollection()
                  throws IOException,
                         UnknownHostException
Constructs a MyPlaceCollection using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

MyPlaceCollection

public MyPlaceCollection(Object obj)
                  throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MyPlaceCollection theMyPlaceCollection = (MyPlaceCollection) obj;

Construct a MyPlaceCollection using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MyPlaceCollection.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

add

public 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.

Specified by:
add in interface IPlaceCollection
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

public 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.

Specified by:
removeByName in interface IPlaceCollection
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

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

Description

Removes all of the Place objects from the collection.

Product Availability

Available with ArcGIS Engine.

Specified by:
removeAll in interface IPlaceCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

next

public IPlace next()
            throws IOException,
                   AutomationException
Returns the next place in the enumeration.

Description

The Next method returns the next Place in the enumerator.

Product Availability

Available with ArcGIS Engine.

Specified by:
next in interface IEnumPlace
Returns:
A reference to a com.esri.arcgis.controls.IPlace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Reset the enumeration to start from beginning.

Description

The Reset method resets the enumerator so that the next call to the Next method returns the first Place in the enumerator.

Product Availability

Available with ArcGIS Engine.

Specified by:
reset in interface IEnumPlace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

public int getCount()
             throws IOException,
                    AutomationException
The number of places in the enumeration.

Description

Returns the number of Place objects in the enumerator.

Product Availability

Available with ArcGIS Engine.

Specified by:
getCount in interface IEnumPlace
Returns:
The placeCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException