01: /*
02: * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI for
03: * visualizing and manipulating spatial features with geometry and attributes.
04: *
05: * Copyright (C) 2003 Vivid Solutions
06: *
07: * This program is free software; you can redistribute it and/or modify it under
08: * the terms of the GNU General Public License as published by the Free Software
09: * Foundation; either version 2 of the License, or (at your option) any later
10: * version.
11: *
12: * This program is distributed in the hope that it will be useful, but WITHOUT
13: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15: * details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19: * Place - Suite 330, Boston, MA 02111-1307, USA.
20: *
21: * For more information, contact:
22: *
23: * Vivid Solutions Suite #1A 2328 Government Street Victoria BC V8T 5G5 Canada
24: *
25: * (250)385-6040 www.vividsolutions.com
26: */
27: package com.vividsolutions.jump.workbench.ui.plugin.scalebar;
28:
29: import com.vividsolutions.jump.workbench.ui.TaskFrame;
30: import com.vividsolutions.jump.workbench.ui.plugin.InstallRendererPlugIn;
31: import com.vividsolutions.jump.workbench.ui.renderer.Renderer;
32:
33: /**
34: * Ensures that all TaskFrames get a scale bar.
35: */
36: public class InstallScaleBarPlugIn extends InstallRendererPlugIn {
37: public InstallScaleBarPlugIn() {
38: super (ScaleBarRenderer.CONTENT_ID, true);
39: }
40:
41: protected Renderer.Factory createFactory(final TaskFrame frame) {
42: return new Renderer.Factory() {
43: public Renderer create() {
44: return new ScaleBarRenderer(frame.getLayerViewPanel());
45: }
46: };
47: }
48: }
|