synchronized void threadFinished(ResourceThread finishedThread,boolean success){
  if (finishedThread.cssDocInfo != null) {
    cssCount--;
  }
  if ((HTMLComponent.SUPPORT_CSS) && (cssCount == 0)) {
    cssCount=-1;
    htmlC.applyAllCSS();
    htmlC.cssCompleted();
  }
  running.removeElement(finishedThread);
  if (queue.size() > 0) {
    ResourceThread t=(ResourceThread)queue.firstElement();
    queue.removeElementAt(0);
    running.addElement(t);
    t.go();
  }
 else {
    threadCount--;
  }
  if (threadCount == 0) {
    if (images.size() == 0) {
      htmlC.setPageStatus(HTMLCallback.STATUS_COMPLETED);
    }
 else {
      startRunningImages();
    }
  }
}

synchronized void threadFinished ( ResourceThread finishedThread , boolean success ) { if ( finishedThread . cssDocInfo != null ) { cssCount -- ; } if ( ( HTMLComponent . SUPPORT_CSS ) && ( cssCount == 0 ) ) { cssCount = - 1 ; htmlC . applyAllCSS ( ) ; htmlC . cssCompleted ( ) ; } running . removeElement ( finishedThread ) ; if ( queue . size ( ) > 0 ) { ResourceThread t = ( ResourceThread ) queue . firstElement ( ) ; queue . removeElementAt ( 0 ) ; running . addElement ( t ) ; t . go ( ) ; } else { threadCount -- ; } if ( threadCount == 0 ) { if ( images . size ( ) == 0 ) { htmlC . setPageStatus ( HTMLCallback . STATUS_COMPLETED ) ; } else { startRunningImages ( ) ; } } }
called by the resourcethread when it finishes downloading and setting the image . this in turns starts another thread if the queue is not empty
