|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFeatureRenderer
Provides access to members that control functionality common to all feature renderers.
All feature renderers implement this interface and it is used by the framework to draw features from a FeatureClass.
Method Summary | |
---|---|
boolean |
canRender(IFeatureClass featClass,
IDisplay display)
Indicates if the specified feature class can be rendered on the given display. |
void |
draw(IFeatureCursor cursor,
int drawPhase,
IDisplay display,
ITrackCancel trackCancel)
Draws features from the specified cursor on the given display. |
ISymbol |
getSymbolByFeature(IFeature feature)
Symbol used to draw the specified feature. |
boolean |
isRenderPhase(int drawPhase)
Indicates if renderer uses the specified draw phase. |
void |
prepareFilter(IFeatureClass fc,
IQueryFilter queryFilter)
Prepares the query filter for the rendering process. |
void |
setExclusionSetByRef(IFeatureIDSet rhs1)
An object reference to a temporary drawing exclusion set. |
Method Detail |
---|
boolean canRender(IFeatureClass featClass, IDisplay display) throws IOException, AutomationException
If the renderer is not applicable to a feature layer, then it can return False in response to a CanRender method. For example, the dot-density renderer is only applicable to polygon feature layers and returns False in response to other feature layers.
featClass
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)display
- A reference to a com.esri.arcgis.display.IDisplay (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void prepareFilter(IFeatureClass fc, IQueryFilter queryFilter) throws IOException, AutomationException
This method is called prior to the Draw method and gives the renderer a chance to adjust the query filter to incorporate extra constraints. For example, if a particular field is required for the renderer, it would add this field to the filter to ensure it is accessible during the Draw method.
fc
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)queryFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void draw(IFeatureCursor cursor, int drawPhase, IDisplay display, ITrackCancel trackCancel) throws IOException, AutomationException
This method is typically called by the framework to renderer features to a display. This could be in response to a refresh on the map. This method typically iterates through all the features and renders each feature with an appropriate symbol.
An individual feature is typically drawn by calling the Draw method on the feature's IFeatureDraw with the symbol created by the renderer. However, when writing a custom feature renderer you can draw anything you want using a number of different methods. To learn more see the section on writing a custom feature renderer in Extending ArcObjects.
To allow complex rendering to be canceled halfway through a draw, the renderer typically checks the TrackCancel object after each feature or set of features. If a cancel action has occurred, the renderer will exit.
There are three drawing phases: selection, annotation, and geography, and this method can be called by the framework up to three times. With the exception of the selection phase, this method will only be called for a particular draw phase if the call by the framework to RenderPhase returns true for that phase.
Feature renderers typically only draw features during the geography phase, though in some cases features are drawn in the annotation phase. Take for example a case where proportional symbols are drawn for polygon features. The ProportionalSymbolRenderer draws the background fill symbol during the geography phase and the proportionally sized marker symbol during the annotation phase.
cursor
- A reference to a com.esri.arcgis.geodatabase.IFeatureCursor (in)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.ISymbol getSymbolByFeature(IFeature feature) throws IOException, AutomationException
feature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isRenderPhase(int drawPhase) throws IOException, AutomationException
drawPhase
- A com.esri.arcgis.system.esriDrawPhase constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setExclusionSetByRef(IFeatureIDSet rhs1) throws IOException, AutomationException
The list of feature IDs to be excluded from drawing.
Some feature renderers support IDataExclusion which allows you to build a where clause to exclude features.
Exclusion prevents features from drawing. To prevent features from drawing as well as from appearing in tables and in query results, set a layer definition query using IFeatureLayerDefinition.
rhs1
- A reference to a com.esri.arcgis.carto.IFeatureIDSet (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 |