01: package com.vividsolutions.jump.workbench.ui.renderer;
02:
03: import java.awt.Graphics2D;
04: import java.awt.geom.NoninvertibleTransformException;
05:
06: /**
07: * First call #createRunnable. If it returns null, get the image using #copyTo.
08: * Otherwise, run the Runnable in a separate thread. You can call #copyTo while
09: * it's drawing to get the partially drawn image. Drawing is done when
10: * #isRendering returns false.
11: */
12: public interface Renderer {
13: public abstract void clearImageCache();
14:
15: public abstract boolean isRendering();
16:
17: /**
18: *@param contentID identifies this Renderer by what it draws
19: */
20: public abstract Object getContentID();
21:
22: public abstract void copyTo(Graphics2D graphics);
23:
24: /**
25: * @return null if no rendering work needs to be done
26: */
27: public abstract Runnable createRunnable();
28:
29: public abstract void cancel();
30:
31: public static interface Factory {
32: public Renderer create();
33: }
34:
35: //[sstein: 20.01.2006] from Ole for RenderingManager changes
36: // for not hardwired renderers and to including pirol image layers
37: public static interface ContentDependendFactory {
38: public Renderer create(Object contentID);
39: }
40: }
|