01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.project.render;
16:
17: /**
18: * Abstract implementation of the IRenderMetrics.
19: *
20: * @author Jesse
21: * @since 1.1.0
22: */
23: public abstract class AbstractRenderMetrics implements IRenderMetrics {
24:
25: protected final IRenderContext context;
26: protected final IRenderMetricsFactory factory;
27:
28: /**
29: * Create New instance
30: * @param context context to use for determining the metrics of the associated renderer
31: * @param factory the factory associated with this metrics.
32: */
33: public AbstractRenderMetrics(final IRenderContext context,
34: final IRenderMetricsFactory factory) {
35: this .context = context;
36: this .factory = factory;
37: }
38:
39: public IRenderContext getRenderContext() {
40: return context;
41: }
42:
43: public IRenderMetricsFactory getRenderMetricsFactory() {
44: return factory;
45: }
46:
47: public boolean isOptimized() {
48: return false;
49: }
50:
51: }
|