Method Summary |
|
public void | addListener(ILayerListener listener) Listen to changes on this layer. |
public Filter | createBBoxFilter(Envelope boundingBox, IProgressMonitor monitor) Creates A geometry filter for the layer.
getMap().getViewportModel() will return the ViewportModel.
See Also: net.refractions.udig.project.render.IViewportModel Parameters: boundingBox - in the same crs as the viewport model. |
IGeoResource | findGeoResource(Class<T> clazz) Locate the first IGeoResource that canResolve the provided resource type.
Example implementation:
for( IGeoResource resource : getGeoResources() ) {
if (resource.canResolve(FeatureSource.class)) {
return resource;
}
}
return null;
Parameters: clazz - class of the resource that the IGeoResource claims it can adapt to. |
IBlackboard | getBlackboard() Temporary layer properties, used for lightweight collaboration. |
ReferencedEnvelope | getBounds(IProgressMonitor monitor, CoordinateReferenceSystem crs) Returns the bounds of the layer as best estimated. |
CoordinateReferenceSystem | getCRS(IProgressMonitor monitor) Gets the CRS for the layer. |
CoordinateReferenceSystem | getCRS() Gets the CRS for the layer. |
Filter | getFilter() Filter indicating the selected features.
In order for this value to be useful the layer should be selectable, often a single fid
filter during user edit opperations.
Note: Filter.ALL indicates no selected Features. |
public IGeoResource | getGeoResource() Resource the user associates with this layer. |
public IGeoResource | getGeoResource(Class<T> clazz) Returns the first found geoResource that can resolve to clazz.
Parameters: clazz - the clazz that the returned georesource can resolve to. |
public List<IGeoResource> | getGeoResources() Access to resources that hold data for this layer. |
public ImageDescriptor | getGlyph() ImageDescriptor for this Layer. |
public URL | getID() |
public IMap | getMap() The Map that "owns" or "contains" the current layer. |
public String | getName() Gets the name from the associated metadata. |
IBlackboard | getProperties() Temporary layer properties, used for lightweight collaboration. |
public Query | getQuery(boolean selection) Query that selects all the features for the layer.
The selected flag is used with respect to
getFilter() :
- false : Query for layers contents
- true : Query for the layer's selected features
Convenience method
Parameters: layer - The layer the Query is associated with. Parameters: selection - true will return a query for the selected features. |
public E | getResource(Class<E> resourceType, IProgressMonitor monitor) Returns a real resource that one of the GeoResources can resolved to.
Note: examples of resources are: FeatureSource, WebMapServer, etc... |
public FeatureType | getSchema() Retrieve a schema description of this Layer.
This schema can be used to determine the available attributes for use in Style Rule
construction. |
public int | getStatus() Indication of Layer status. |
public String | getStatusMessage() A message to provide the user with additional feed back about the current rendering status. |
public IStyleBlackboard | getStyleBlackboard() StyleBlackboard used for collaboration with the rendering process. |
public int | getZorder() Returns the ZOrder of the Layer. |
public boolean | hasResource(Class<T> resourceType) Check if a IGeoResource exists that canResolve to the provided resource type.
Example:
if (layer.hasResource(FeatureSource.class)) {
return handle.getResource(FeatureSource.class, monitor);
}
The blocking
method allow the object to be
obtained.
Parameters: resourceType - the type of resource calleer is interested in. |
public boolean | isApplicable(String toolCategoryId) Check toolset applicability.
Note: some layers may not ever be applicable for certaint toolsets. |
public boolean | isType(Class<T> resourceType) |
public boolean | isVisible() |
MathTransform | layerToMapTransform() Returns the Mathtransform from this layers CRS to the map's CRS (modelled as part of the
viewport model). |
MathTransform | mapToLayerTransform() Returns the Mathtransform from the map's CRS (modeled as part of the viewport model) to this
layers CRS . |
void | refresh(Envelope bounds) Triggers the layer to rerender if it is currently displayed. |
public void | removeListener(ILayerListener listener) |
public void | setStatus(int status) Sets the current status of the Layer.
Parameters: status - the status. |
public void | setStatusMessage(String string) |