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.internal.render.impl;
16:
17: import java.awt.Graphics2D;
18:
19: import net.refractions.udig.project.ILayer;
20: import net.refractions.udig.project.internal.Messages;
21: import net.refractions.udig.project.internal.render.Renderer;
22: import net.refractions.udig.project.render.RenderException;
23:
24: import org.eclipse.core.runtime.IProgressMonitor;
25:
26: /**
27: * A renderer that does nothing. It holds the place of a normal renderer and just shows a warning. This is used
28: * if no renderer could be found for the layer.
29: * @author Jesse
30: * @since 1.1.0
31: */
32: public class PlaceHolder extends RendererImpl implements Renderer {
33:
34: @Override
35: public void render(Graphics2D destination, IProgressMonitor monitor)
36: throws RenderException {
37: context.setStatus(ILayer.ERROR);
38: context.setStatusMessage(Messages.PlaceHolder_error);
39: }
40:
41: @Override
42: public void render(IProgressMonitor monitor) throws RenderException {
43: }
44: }
|