01: /*
02: * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
03: * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
04: * under the terms of the GNU Lesser General Public License as published by the Free Software
05: * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
06: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
07: * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
08: */
09: package net.refractions.udig.project.render;
10:
11: import net.refractions.udig.project.ILayer;
12: import net.refractions.udig.project.internal.render.Renderer;
13:
14: /**
15: * A RenderMetrics object is used to calculate estimated metrics for a renderer while rendering a
16: * particular layer. RenderMetrics objects are used to decide which renderer to instantiate to
17: * render a layer. As the state of udig changes different renderers may be more suited so the
18: * RenderMetrics object are also used to judge whether a new renderer should be used for rendering a
19: * layer.
20: *
21: * @see AbstractRenderMetrics
22: *
23: * @author Jesse Eichar
24: * @version $Revision: 1.9 $
25: */
26: public interface IRenderMetrics {
27: /**
28: * Creates a new Renderer that is represented by this Metrics object
29: *
30: * @return a new Renderer that is represented by this Metrics object
31: */
32: public Renderer createRenderer();
33:
34: /**
35: * @return the RenderContext that this RenderMetrics is valid for.
36: * @see IRenderContext
37: */
38: public IRenderContext getRenderContext();
39:
40: /**
41: * Returns the IRenderMetricsFactory that created this object.
42: *
43: * @return the IRenderMetricsFactory that created this object.
44: * @see IRenderMetricsFactory
45: */
46: public IRenderMetricsFactory getRenderMetricsFactory();
47:
48: /**
49: * True if renderer use the provided style information.
50: * <p>
51: * The style information should be considered with respect to the current getRenderContext().
52: * </p>
53: *
54: * @param SyleID
55: * @param value
56: * @return true if renderer can use the provided style information
57: */
58: public boolean canStyle(String styleID, Object value);
59:
60: /**
61: * Returns true if this renderer is built specifically to render the GeoResource.
62: *
63: * @return true if renderer is optimized to render
64: */
65: public boolean isOptimized();
66:
67: /**
68: * Check to see if this layers can be added to rendered.
69: * <p>
70: * This is only called for renderers that are MultiLayer renderers.
71: * </p>
72: */
73: public boolean canAddLayer(ILayer layer);
74: }
|