Subversion Repositories eFlore/Applications.del

Rev

Rev 1556 | Rev 1842 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1556 Rev 1563
Line 69... Line 69...
69
	public void setTexteAlternatif(String texteAlternatif) {
69
	public void setTexteAlternatif(String texteAlternatif) {
70
		this.texteAlternatif.setHTML(texteAlternatif);
70
		this.texteAlternatif.setHTML(texteAlternatif);
71
	}
71
	}
Line 72... Line 72...
72
	
72
	
-
 
73
	public void setTailleOptimale() {
73
	public void setTailleOptimale() {
74
		
74
		double fenetreH = Window.getClientHeight();
75
		double fenetreH = Window.getClientHeight();
Line 75... Line -...
75
		double fenetreW = Window.getClientWidth();
-
 
76
		
-
 
77
		double rapport = 0;
76
		double fenetreW = Window.getClientWidth();
78
		
77
		
Line -... Line 78...
-
 
78
		double photoH = photoPrincipale.getHeight();
79
		double photoH = photoPrincipale.getHeight();
79
		double photoW = photoPrincipale.getWidth();
Line 80... Line 80...
80
		double photoW = photoPrincipale.getWidth();
80
		
-
 
81
		double rapport = 0;
81
		
82
		double reduction = 150;
82
		double reduction = 150;
83
		
83
		
84
		if(photoH > (fenetreH - reduction) || photoW > (fenetreW - reduction)) {
84
		if(photoH >= (fenetreH - reduction) || photoW >= (fenetreW - reduction)) {
85
			
85
			if(photoH > photoW) {
86
			if(photoH >= (fenetreH - reduction)) {				
-
 
87
				rapport = photoW/photoH;
-
 
88
				photoH = fenetreH-reduction;
86
				rapport = photoW/photoH;
89
				photoW = photoH*rapport;
87
				photoH = fenetreH-reduction;
90
			} 
88
				photoW = photoH*rapport;
91
			
89
			} else {
92
			if(photoW >= (fenetreW - reduction)) {
90
				rapport = photoH/photoW;
93
				rapport = photoH/photoW;