Changeset 11716


Ignore:
Timestamp:
2006-04-26T16:56:15+12:00 (18 years ago)
Author:
kjdon
Message:

committed Shaoquns version of the applet for the branch - version 1.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gsdl-2_70-distribution-branch/gsdl/src/java/org/nzdl/gsdl/GsdlCollageApplet/GsdlCollageApplet.java

    r11565 r11716  
    5757
    5858    /** Time lapse between repainting of the applet */
    59     protected int refreshDelay_ = 1500;
     59    protected int refreshDelay_ = 2000;
    6060   
    6161    /** Stores an image and url pair and provides associated methods */
     
    123123    }
    124124
     125
    125126    if (verbosity_ >= 4) {
    126127        System.err.println("Got parameters.");
    127128    }
    128     verbosity_=0;
     129
    129130    if (caption_param != null && !caption_param.startsWith("_")) {
    130131        caption_ = caption_param;
     
    238239
    239240 
    240 
    241241    /** Goes to the url associated with the image that is clicked on screen<br>
    242242     *  Displays the url containing the image in a new window */
     
    251251        try {
    252252        // displays the associated url in a new window
    253         URL from_url = new URL(cimage.from_url_  + "#" + cimage.name_);
     253                URL from_url = null;       
     254       
     255        java.util.regex.Pattern p = java.util.regex.Pattern.compile("cl=CL\\d(\\.\\d)*\\s");
     256        java.util.regex.Matcher m = p.matcher(cimage.from_url_.trim()+" ");
     257
     258                if (m.find() ){
     259            from_url = cimage.url_;
     260        }
     261        else{
     262            from_url =  new URL(cimage.from_url_  + "#" + cimage.name_);
     263        }
    254264        getAppletContext().showDocument(from_url,"gsdlDoc");
    255265        }
    256         catch (MalformedURLException e) {
     266        catch (MalformedURLException e) { 
    257267        e.printStackTrace();
    258268        }
     
    266276    {
    267277   
     278    download_thread_.start();   
     279
     280    display_thread_.start();
     281
    268282         paint =  new Thread(new Runnable(){
    269283                public void run() {
     
    276290               repaint();
    277291               
    278                 Thread.sleep(1000);
     292                Thread.sleep(2000);
    279293                curr_thread = Thread.currentThread();
    280294            }
     
    282296       
    283297            } catch (Exception e) {
    284             e.printStackTrace();
     298           
    285299            }
    286300        }
     
    290304
    291305        paint.start();
    292 
    293 
    294         download_thread_.start();   
    295 
    296     display_thread_.start();
    297 
     306   
    298307    }
    299308
Note: See TracChangeset for help on using the changeset viewer.