@Override
  public String getThreadId() {
    String threadId = "[" + Thread.currentThread().getId() + "]: ";

    if (null != this.mapSource && null != this.mapSource.getName()) {
      return this.mapSource.getName() + " " + threadId;
    }

    return threadId;
  }
Ejemplo n.º 2
0
    public AppFrame() {
      // Show the WAIT cursor because the import may take a while.
      this.setCursor(new Cursor(Cursor.WAIT_CURSOR));

      // Import the imagery on a thread other than the event-dispatch thread to avoid freezing the
      // UI.
      Thread t =
          new Thread(
              new Runnable() {
                public void run() {
                  importImagery();

                  // Restore the cursor.
                  setCursor(Cursor.getDefaultCursor());
                }
              });

      t.start();
    }