com.esri.arcgis.carto
Class BasicOverposter

java.lang.Object
  extended by com.esri.arcgis.carto.BasicOverposter
All Implemented Interfaces:
IOverposter, IOverposter2, IOverposter3, IConnectionPointContainer, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, Externalizable, Serializable

public class BasicOverposter
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IOverposter, IOverposter2, IOverposter3, IConnectionPointContainer, IPersist, IPersistStream, Externalizable

An engine that places labels for features using conflict detection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
BasicOverposter()
          Constructs a BasicOverposter using ArcGIS Engine.
BasicOverposter(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
BasicOverposter theBasicOverposter = (BasicOverposter) obj;
 
Method Summary
 void addBarriers(int weight, IGeometryCollection barriers)
          Adds a barrier object that placed objects must avoid.
 int addClass(IOverposterLayerProperties props)
          Adds a class to the overposter and specifies its properties.
 void addCurvedLabel(int classIndex, String label, Object widths, Object ascents, Object descents, double fontHeight, double fontDescent, IGeometry controlShape, int featureId, ISymbol symbol)
          Adds a curved label object to be placed.
 void addIBasicOverposterEventsListener(IBasicOverposterEvents theListener)
          addIBasicOverposterEventsListener.
 void addLabel(int classIndex, String label, double width, double height, IGeometry controlShape, int featureId, ISymbol symbol)
          Adds a label object to be placed.
 void addLabel2(int classIndex, String label, double width, double height, IGeometry controlShape, int featureId, ISymbol symbol, double angle)
          Adds a label object to be placed.
 void addSymbol(int classIndex, ISymbol symbol, IGeometry geometry, int featureId)
          Adds a symbol to be placed.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
 int getCapabilities(ILayer layer)
          Overposter capabilities for the specified layer.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 int getNumberOfPlacedLabels()
          The number of unplaced labels.
 int getNumberOfUnplacedLabels()
          The number of unplaced labels.
 int getNumClasses()
          The number of classes.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int hashCode()
          the hashcode for this object
 void initialize(IEnvelope extent, IDisplay display)
          Initializes the overposter for drawing into the specified area of the map display.
 void initialize(IEnvelope extent, IDisplay display, IOverposterProperties pOverposterProps)
          Initializes the overposter for drawing into the specified area of the map display.
 void insertClass(int index, IOverposterLayerProperties props)
          Inserts a class at a specific index, and specifies its peoperties.
 void isDirty()
          isDirty
 void load(IStream pstm)
          load
 void nextPlaced(IPlacedObject[] object, ITrackCancel trackCancel, IStepProgressor stepProgressor)
          The next object that was successfully placed.
 void nextUnplaced(IPlacedObject[] object)
          The next object that was not successfully placed.
 void nextUnused(IPlacedObject[] object)
          The next object that was not used.
 void placeObjects()
          Places objects using the overposter.
 void readExternal(ObjectInput in)
           
 void releaseResources()
          Releases current objects from memory.
 void removeClass(int classIndex)
          Removes the class at the specified index from the overposter.
 void removeIBasicOverposterEventsListener(IBasicOverposterEvents theListener)
          removeIBasicOverposterEventsListener.
 void resetClasses()
          Removes all classes from the overposter.
 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

BasicOverposter

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

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

BasicOverposter

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

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

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

addIBasicOverposterEventsListener

public void addIBasicOverposterEventsListener(IBasicOverposterEvents theListener)
                                       throws IOException
addIBasicOverposterEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.carto.IBasicOverposterEvents interface.
Throws:
IOException - If there are communications problems.

removeIBasicOverposterEventsListener

public void removeIBasicOverposterEventsListener(IBasicOverposterEvents theListener)
                                          throws IOException
removeIBasicOverposterEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.carto.IBasicOverposterEvents interface.
Throws:
IOException - If there are communications problems.

getNumClasses

public int getNumClasses()
                  throws IOException,
                         AutomationException
The number of classes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNumClasses in interface IOverposter
Specified by:
getNumClasses in interface IOverposter2
Specified by:
getNumClasses in interface IOverposter3
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCapabilities

public int getCapabilities(ILayer layer)
                    throws IOException,
                           AutomationException
Overposter capabilities for the specified layer.

Product Availability

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

Specified by:
getCapabilities in interface IOverposter
Specified by:
getCapabilities in interface IOverposter2
Specified by:
getCapabilities in interface IOverposter3
Parameters:
layer - A reference to a com.esri.arcgis.carto.ILayer (in)
Returns:
A com.esri.arcgis.carto.esriOverposterCaps constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addClass

public int addClass(IOverposterLayerProperties props)
             throws IOException,
                    AutomationException
Adds a class to the overposter and specifies its properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addClass in interface IOverposter
Specified by:
addClass in interface IOverposter2
Specified by:
addClass in interface IOverposter3
Parameters:
props - A reference to a com.esri.arcgis.carto.IOverposterLayerProperties (in)
Returns:
The classIndex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertClass

public void insertClass(int index,
                        IOverposterLayerProperties props)
                 throws IOException,
                        AutomationException
Inserts a class at a specific index, and specifies its peoperties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insertClass in interface IOverposter
Specified by:
insertClass in interface IOverposter2
Specified by:
insertClass in interface IOverposter3
Parameters:
index - The index (in)
props - A reference to a com.esri.arcgis.carto.IOverposterLayerProperties (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeClass

public void removeClass(int classIndex)
                 throws IOException,
                        AutomationException
Removes the class at the specified index from the overposter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
removeClass in interface IOverposter
Specified by:
removeClass in interface IOverposter2
Specified by:
removeClass in interface IOverposter3
Parameters:
classIndex - The classIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resetClasses

public void resetClasses()
                  throws IOException,
                         AutomationException
Removes all classes from the overposter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
resetClasses in interface IOverposter
Specified by:
resetClasses in interface IOverposter2
Specified by:
resetClasses in interface IOverposter3
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

public void initialize(IEnvelope extent,
                       IDisplay display)
                throws IOException,
                       AutomationException
Initializes the overposter for drawing into the specified area of the map display.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
initialize in interface IOverposter
Specified by:
initialize in interface IOverposter2
Parameters:
extent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
display - A reference to a com.esri.arcgis.display.IDisplay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addBarriers

public void addBarriers(int weight,
                        IGeometryCollection barriers)
                 throws IOException,
                        AutomationException
Adds a barrier object that placed objects must avoid.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addBarriers in interface IOverposter
Specified by:
addBarriers in interface IOverposter2
Specified by:
addBarriers in interface IOverposter3
Parameters:
weight - A com.esri.arcgis.carto.esriBasicOverposterWeight constant (in)
barriers - A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLabel

public void addLabel(int classIndex,
                     String label,
                     double width,
                     double height,
                     IGeometry controlShape,
                     int featureId,
                     ISymbol symbol)
              throws IOException,
                     AutomationException
Adds a label object to be placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addLabel in interface IOverposter
Specified by:
addLabel in interface IOverposter2
Specified by:
addLabel in interface IOverposter3
Parameters:
classIndex - The classIndex (in)
label - The label (in)
width - The width (in)
height - The height (in)
controlShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
featureId - The featureId (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addCurvedLabel

public void addCurvedLabel(int classIndex,
                           String label,
                           Object widths,
                           Object ascents,
                           Object descents,
                           double fontHeight,
                           double fontDescent,
                           IGeometry controlShape,
                           int featureId,
                           ISymbol symbol)
                    throws IOException,
                           AutomationException
Adds a curved label object to be placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addCurvedLabel in interface IOverposter
Specified by:
addCurvedLabel in interface IOverposter2
Specified by:
addCurvedLabel in interface IOverposter3
Parameters:
classIndex - The classIndex (in)
label - The label (in)
widths - A Variant (in)
ascents - A Variant (in)
descents - A Variant (in)
fontHeight - The fontHeight (in)
fontDescent - The fontDescent (in)
controlShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
featureId - The featureId (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSymbol

public void addSymbol(int classIndex,
                      ISymbol symbol,
                      IGeometry geometry,
                      int featureId)
               throws IOException,
                      AutomationException
Adds a symbol to be placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addSymbol in interface IOverposter
Specified by:
addSymbol in interface IOverposter2
Specified by:
addSymbol in interface IOverposter3
Parameters:
classIndex - The classIndex (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
geometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
featureId - The featureId (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

placeObjects

public void placeObjects()
                  throws IOException,
                         AutomationException
Places objects using the overposter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
placeObjects in interface IOverposter
Specified by:
placeObjects in interface IOverposter2
Specified by:
placeObjects in interface IOverposter3
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nextPlaced

public void nextPlaced(IPlacedObject[] object,
                       ITrackCancel trackCancel,
                       IStepProgressor stepProgressor)
                throws IOException,
                       AutomationException
The next object that was successfully placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
nextPlaced in interface IOverposter
Specified by:
nextPlaced in interface IOverposter2
Specified by:
nextPlaced in interface IOverposter3
Parameters:
object - A reference to a com.esri.arcgis.carto.IPlacedObject (in/out: use single element array)
trackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
stepProgressor - A reference to a com.esri.arcgis.system.IStepProgressor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nextUnplaced

public void nextUnplaced(IPlacedObject[] object)
                  throws IOException,
                         AutomationException
The next object that was not successfully placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
nextUnplaced in interface IOverposter
Specified by:
nextUnplaced in interface IOverposter2
Specified by:
nextUnplaced in interface IOverposter3
Parameters:
object - A reference to a com.esri.arcgis.carto.IPlacedObject (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nextUnused

public void nextUnused(IPlacedObject[] object)
                throws IOException,
                       AutomationException
The next object that was not used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
nextUnused in interface IOverposter
Specified by:
nextUnused in interface IOverposter2
Specified by:
nextUnused in interface IOverposter3
Parameters:
object - A reference to a com.esri.arcgis.carto.IPlacedObject (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

releaseResources

public void releaseResources()
                      throws IOException,
                             AutomationException
Releases current objects from memory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
releaseResources in interface IOverposter
Specified by:
releaseResources in interface IOverposter2
Specified by:
releaseResources in interface IOverposter3
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumberOfUnplacedLabels

public int getNumberOfUnplacedLabels()
                              throws IOException,
                                     AutomationException
The number of unplaced labels. Only valid after calling PlaceObjects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNumberOfUnplacedLabels in interface IOverposter
Specified by:
getNumberOfUnplacedLabels in interface IOverposter2
Specified by:
getNumberOfUnplacedLabels in interface IOverposter3
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumberOfPlacedLabels

public int getNumberOfPlacedLabels()
                            throws IOException,
                                   AutomationException
The number of unplaced labels. Only valid after calling PlaceObjects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNumberOfPlacedLabels in interface IOverposter
Specified by:
getNumberOfPlacedLabels in interface IOverposter2
Specified by:
getNumberOfPlacedLabels in interface IOverposter3
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLabel2

public void addLabel2(int classIndex,
                      String label,
                      double width,
                      double height,
                      IGeometry controlShape,
                      int featureId,
                      ISymbol symbol,
                      double angle)
               throws IOException,
                      AutomationException
Adds a label object to be placed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addLabel2 in interface IOverposter2
Specified by:
addLabel2 in interface IOverposter3
Parameters:
classIndex - The classIndex (in)
label - The label (in)
width - The width (in)
height - The height (in)
controlShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
featureId - The featureId (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
angle - The angle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

public void initialize(IEnvelope extent,
                       IDisplay display,
                       IOverposterProperties pOverposterProps)
                throws IOException,
                       AutomationException
Initializes the overposter for drawing into the specified area of the map display.

Product Availability

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

Specified by:
initialize in interface IOverposter3
Parameters:
extent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
display - A reference to a com.esri.arcgis.display.IDisplay (in)
pOverposterProps - A reference to a com.esri.arcgis.carto.IOverposterProperties (in)
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.

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.

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.

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