/[schmitzm]/branches/2.3.KECK/src/skrueger/geotools/RenderingExecutor.java
ViewVC logotype

Diff of /branches/2.3.KECK/src/skrueger/geotools/RenderingExecutor.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/1.0-gt2-2.6/src/skrueger/geotools/RenderingExecutor.java revision 555 by alfonx, Tue Nov 24 09:17:22 2009 UTC trunk/src/skrueger/geotools/RenderingExecutor.java revision 740 by alfonx, Wed Mar 3 10:32:14 2010 UTC
# Line 10  import org.geotools.renderer.GTRenderer; Line 10  import org.geotools.renderer.GTRenderer;
10  import org.geotools.renderer.RenderListener;  import org.geotools.renderer.RenderListener;
11  import org.opengis.feature.simple.SimpleFeature;  import org.opengis.feature.simple.SimpleFeature;
12    
13    import schmitzm.geotools.gui.XMapPane;
14    
15  /**  /**
16   * This class is used by {@link XMapPane} to start and stop the rendering a   * This class is used by {@link XMapPane} to start and stop the rendering a
17   * {@link Thread} for rendering.   * {@link Thread} for rendering.
18   */   */
19  class RenderingExecutor {  public class RenderingExecutor {
20          private final static Logger LOGGER = Logger.getLogger(RenderingExecutor.class);          private final static Logger LOGGER = Logger.getLogger(RenderingExecutor.class);
21          /**          /**
22           * Instance to a {@link RenderThread} doing any work. It's volatile so the           * Instance to a {@link RenderThread} doing any work. It's volatile so the
# Line 121  class RenderingExecutor { Line 123  class RenderingExecutor {
123    
124                  @Override                  @Override
125                  public void run() {                  public void run() {
126                            long startT = System.currentTimeMillis();
127                          try {                          try {
128                                  renderer.addRenderListener(this);                                  renderer.addRenderListener(this);
129                                  LOGGER.debug("start rendering...");  //                              LOGGER.debug("start rendering...");
130    
131                                  // Clear the graphics context                                  // Clear the graphics context
132                                  graphics.setBackground(mapPane.getMapBackgroundColor());                                  graphics.setBackground(mapPane.getMapBackgroundColor());
# Line 135  class RenderingExecutor { Line 138  class RenderingExecutor {
138                                  // Kill the reference to this Thread so #isRunning will say                                  // Kill the reference to this Thread so #isRunning will say
139                                  // false directly                                  // false directly
140                                  renderThread = null;                                  renderThread = null;
141                                  mapPane.onRenderingCompleted();                                  mapPane.onRenderingCompleted(System.currentTimeMillis()-startT);
142                          } catch (Exception e) {                          } catch (Exception e) {
143                                  mapPane.onRenderingFailed(e);                                  mapPane.onRenderingFailed(e);
144                          } finally {                          } finally {

Legend:
Removed from v.555  
changed lines
  Added in v.740

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26