Exemplo n.º 1
0
  /** Updates all the markers in marker layers */
  public void updateMarkers() {
    Rectangle r = getBoundingBox();
    final LatLon tl, br;
    // tomamos los pois en un area de 3 pantallas cuadradas, de manera que
    // se pueda arrastrar sin notar que no estan cargados los poi de mas
    // allá, ya que solo se deberian cargar cuando deja de moverse.
    tl = getLatLon(r.x - r.width, r.y - r.height);
    br = getLatLon(r.x + 2 * r.width, r.y + 2 * r.height);

    if (mapUpdater == null || mapUpdater.isDone()) {
      mapUpdater =
          new SwingWorker<Object, Object>() {

            @Override
            protected Object doInBackground() throws Exception {
              try {
                updateIncidences(tl, br);
                updateResources(tl, br);
              } catch (Throwable t) {
                log.error("Error al actualizar marcadores", t);
              }
              return null;
            }

            @Override
            protected void done() {
              repaint();
            }
          };

      mapUpdater.execute();
    }
  }
Exemplo n.º 2
0
 /** check if ingest is currently being enqueued */
 public synchronized boolean isEnqueueRunning() {
   if (queueWorker != null && !queueWorker.isDone()) {
     return true;
   }
   return false;
 }
Exemplo n.º 3
0
 public boolean isDone() {
   return worker.isDone();
 }