ucar.jpeg.jj2000.disp
Class TitleUpdater

java.lang.Object
  extended by ucar.jpeg.jj2000.disp.TitleUpdater
All Implemented Interfaces:
Runnable

public class TitleUpdater
extends Object
implements Runnable

This class should run as an independent thread to update tha main display window title with current image scroll position and zoom.


Field Summary
 boolean done
          The thread exits when this is true
 
Constructor Summary
TitleUpdater(ImgScrollPane isp, Frame win, String btitle)
          Instantiates the title updater.
 
Method Summary
 void run()
          The method that executes this thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

done

public volatile boolean done
The thread exits when this is true

Constructor Detail

TitleUpdater

public TitleUpdater(ImgScrollPane isp,
                    Frame win,
                    String btitle)
Instantiates the title updater. The title of 'win' will be regularly updated with the current zoom and scroll point. The current zoom and scroll point are added to the basic title given by 'btitle'.

Parameters:
isp - Where the image is displayed
win - The window which title to update
btitle - The base of the title.
Method Detail

run

public void run()
The method that executes this thread. The method periodically updates the title, if necessary, and puts to sleep the thread for 100 msec. This method never returns. If the sleep of the thread is interrupted, the title will be updated earlier and the cycle will continue.

Specified by:
run in interface Runnable


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.