Revision 7412

View differences:

trunk/frameworks/_fwAndami/src/com/iver/andami/ui/splash/MultiSplashWindow.java
67 67

  
68 68

  
69 69
     public void init(){
70
    	 offscreenImage = createCompatibleImage(splashDimension.width, splashDimension.height+20,Transparency.TRANSLUCENT);
70
    	   offscreenImage = createCompatibleImage(splashDimension.width, splashDimension.height+20,Transparency.TRANSLUCENT);
71 71
    	 File dirLogos=new File("./logos");
72 72
    	 String[] logos=dirLogos.list();
73 73
    	 numLogos=logos.length+1;
......
76 76
    	 for (int i=0;i<numLogos-1;i++){
77 77
    		 img[i+1]=new ImageIcon("./logos/"+logos[i]);
78 78
    	 }
79
    	 start();
79 80
     }
80 81
     private BufferedImage createCompatibleImage(int w, int h, int transparancy){
81 82
             GraphicsConfiguration gc = getGraphicsConfiguration();
82 83
             return gc.createCompatibleImage(w, h, transparancy);
83 84
     }
84 85
     public void update(Graphics g){
85
          Graphics offscreenG = offscreenImage.getGraphics();
86
          offscreenG.setColor(getBackground());
87
          offscreenG.fillRect(0, 0, splashDimension.width, splashDimension.height+20);
88
          paint(offscreenG);
89
          g.drawImage(offscreenImage, 0, 0, this);
86
    	 if (offscreenImage == null) {
87
    		 // no images were loaded yet (for computers with slow disks)
88
    		 super.update(g);
89
    	 } else {
90
             Graphics offscreenG = offscreenImage.getGraphics();
91
             offscreenG.setColor(getBackground());
92
             offscreenG.fillRect(0, 0, splashDimension.width, splashDimension.height+20);
93
             paint(offscreenG);
94
             g.drawImage(offscreenImage, 0, 0, this);
95
    	 }
90 96
     }
91 97

  
92 98
     public void paint(Graphics g){

Also available in: Unified diff