|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILayer
Provides access to members that work with all layers.
ILayer is a generic interface for all layer objects. This interface has a method to draw the layer and provides access to generic layer properties.
This interface has a method to draw the layer and properties to define the minimum and maximum display scales, the spatial reference, the name, layer visibility, whether or not the layer is cached, and whether or not the layer shows map tips.
There are also properties that indicate whether the layer is valid, its supported draw phases, area of interest, and the map tip text for a given coordinate.
Method Summary | |
---|---|
void |
draw(int drawPhase,
IDisplay display,
ITrackCancel trackCancel)
Draws the layer to the specified display for the given draw phase. |
IEnvelope |
getAreaOfInterest()
The default area of interest for the layer. |
double |
getMaximumScale()
Maximum scale (representative fraction) at which the layer will display. |
double |
getMinimumScale()
Minimum scale (representative fraction) at which the layer will display. |
String |
getName()
Layer name. |
int |
getSupportedDrawPhases()
Supported draw phases. |
String |
getTipText(double x,
double y,
double tolerance)
Map tip text at the specified location. |
boolean |
isCached()
Indicates if the layer needs its own display cache. |
boolean |
isShowTips()
Indicates if the layer shows map tips. |
boolean |
isValid()
Indicates if the layer is currently valid. |
boolean |
isVisible()
Indicates if the layer is currently visible. |
void |
setCached(boolean cached)
Indicates if the layer needs its own display cache. |
void |
setMaximumScale(double maxScale)
Maximum scale (representative fraction) at which the layer will display. |
void |
setMinimumScale(double minScale)
Minimum scale (representative fraction) at which the layer will display. |
void |
setName(String name)
Layer name. |
void |
setShowTips(boolean show)
Indicates if the layer shows map tips. |
void |
setSpatialReferenceByRef(ISpatialReference rhs1)
Spatial reference for the layer. |
void |
setVisible(boolean visible)
Indicates if the layer is currently visible. |
Method Detail |
---|
String getName() throws IOException, AutomationException
Use this property to associate a string with a layer.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setName(String name) throws IOException, AutomationException
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isValid() throws IOException, AutomationException
The valid property indicates if the layer is currently valid. Layers that reference feature classes are valid when they hold a reference to a valid feature class. The property does not however validate the integrity of the feature classes reference to the database. Therefore, in rare situations if a datasource is removed after a layer is initialized, the layer will report itself as valid but query attempts to the data source will error due to the lack of underlying data.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnvelope getAreaOfInterest() throws IOException, AutomationException
Returns the spatial-referenced extent of the layer.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getMinimumScale() throws IOException, AutomationException
Specifies the minimum scale at which the layer will be displayed. This means that if you zoom out beyond this scale, the layer will not display. For example, specify 1000 to have the layer not display when zoomed out beyond 1:1000.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMinimumScale(double minScale) throws IOException, AutomationException
minScale
- The minScale (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getMaximumScale() throws IOException, AutomationException
Specifies the maximum scale at which the layer will be displayed. This means that if you zoom in beyond this scale, the layer will not display. For example, specify 500 to have the layer not display when zoomed in beyond 1:500.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMaximumScale(double maxScale) throws IOException, AutomationException
maxScale
- The maxScale (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isVisible() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setVisible(boolean visible) throws IOException, AutomationException
visible
- The visible (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isShowTips() throws IOException, AutomationException
Indicates whether or not map tips are shown for the layer. If set to True, then map tips will be shown for the layer. You can determine the text that will be shown via TipText. For a FeatureLayer, this text comes from the data for IFeatureLayer::DisplayField.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setShowTips(boolean show) throws IOException, AutomationException
show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getTipText(double x, double y, double tolerance) throws IOException, AutomationException
x
- The x (in)y
- The y (in)tolerance
- The tolerance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isCached() throws IOException, AutomationException
This property indicates whether or not the layer requires its own display cache. If this property is True, then the Map will use a separate display cache for the layer so that it can be refreshed indpendently of other layers.
The Map is responsible for cache management. See IScreenDisplay::AddCache for more information on caches.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCached(boolean cached) throws IOException, AutomationException
Informational property. Container is responsible for cache management.
cached
- The cached (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getSupportedDrawPhases() throws IOException, AutomationException
Indicates the draw phases supported by the layer (esriDPGeography, esriDPAnnotation, esriDPSelection, or any combination of the three). The supported draw phases are defined by esriDrawPhase. When multiple draw phases are supported, the sum of the constants is used. For example, if SupportedDrawPhases = 3 then the layer supports drawing in the geography and annotation phases.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSpatialReferenceByRef(ISpatialReference rhs1) throws IOException, AutomationException
This property is only used for map display, setting this property does not change the spatial reference of the layer's underlying data. The ArcGIS framework uses this property to pass the spatial reference from the map to the layer in order to support on-the-fly projection.
rhs1
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void draw(int drawPhase, IDisplay display, ITrackCancel trackCancel) throws IOException, AutomationException
This method draws the layer to the Display for the specified DrawPhase. Use the TrackCancel object to allow the drawing of the layer to be interrupted by the user.
drawPhase
- A com.esri.arcgis.system.esriDrawPhase constant (in)display
- A reference to a com.esri.arcgis.display.IDisplay (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |