Changeset 7527


Ignore:
Timestamp:
2004-06-02T10:15:26+12:00 (20 years ago)
Author:
davidb
Message:

Incorrect file commited. This is the correct one!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/java/org/nzdl/gsdl/GsdlCollageApplet/GsdlCollageApplet.java

    r7334 r7527  
    6565    protected Display display_ = null;
    6666
    67 
    68     public static int app_x_dim_  = 0;
    69     public static int app_y_dim_  = 0;
    70 
    71 
    7267    /** Gets verbosity */
    7368    public int verbosity()    { return verbosity_; }
     
    200195        image_url += "&cl=" + classifier_param;
    201196    }
    202 
    203     /* 
     197   
    204198    // creates a class to store the image and it's associated url
    205199    download_images_ = new DownloadImages(verbosity_);
     
    210204    // starts the display image thread with the currently downloaded images
    211205    display_thread_ = new DisplayImages(this,download_images_, isJava2_, bgcolor_);
    212 
    213     */
    214 
    215 
    216 
    217     // creates initial screen
    218     app_x_dim_ = getWidth();
    219     app_y_dim_ = getHeight();
    220 
    221     // display_ = new Display(this);
     206    display_ = new Display(this);
    222207    }
    223208
     
    248233    public void start()
    249234    {
    250     // download_thread_.start();
    251     // display_thread_.start();
    252     // display_.start();
     235    download_thread_.start();
     236    display_thread_.start();
     237    display_.start();
    253238    }
    254239
     
    256241    public void stop()
    257242    {
    258     // download_thread_.stop();
    259     // display_thread_.stop();
    260     // display_.stop();
     243    download_thread_.stop();
     244    display_thread_.stop();
     245    display_.stop();
    261246
    262247    download_thread_ = null;
     
    268253    public void destroyed()
    269254    {
    270     // download_thread_ = null;
    271     // display_thread_ = null;
    272     // display_ = null;
     255    download_thread_ = null;
     256    display_thread_ = null;
     257    display_ = null;
    273258    }
    274259
     
    282267    /** Repaints the applet using the paint method of the thread that is currently displaying images */
    283268    public void paint(Graphics g) {
    284 
    285     System.err.println("Paint called!");
    286     g.setColor(bgcolor_);
    287     g.fillRect(0,0,app_x_dim_,app_y_dim_);
    288     g.fillRect(0,0,100,200);
    289 
     269    if (display_thread_!=null)
     270    {
     271        //display_thread_.display_collage();
     272        display_thread_.paint(g);
     273    }
     274    else
     275    {
     276        System.err.println("Applet still trying to paint!!");
     277    }
    290278    }
    291279
Note: See TracChangeset for help on using the changeset viewer.