Revision fd294c94 src/gr/ebs/gss/client/animation/FadeIn.java

b/src/gr/ebs/gss/client/animation/FadeIn.java
1 1
/*
2
 * Copyright 2008, 2009 Electronic Business Systems Ltd.
2
 * Copyright 2008, 2009, 2010 Electronic Business Systems Ltd.
3 3
 *
4 4
 * This file is part of GSS.
5 5
 *
......
32 32
	int initialOpacity = 100;
33 33
	double currOpacity = 100;
34 34

  
35
	public FadeIn(Widget widget){
36
		this.widget = widget;
35
	public FadeIn(Widget aWidget){
36
		widget = aWidget;
37 37
	}
38
	/* (non-Javadoc)
39
	 * @see com.google.gwt.animation.client.Animation#onUpdate(double)
40
	 */
38

  
39
	@Override
41 40
	protected void onUpdate(double progress) {
42
		if(currOpacity>0.0){
41
		if(currOpacity > 0.0){
43 42
			progress = 1.0 - progress;
44
			currOpacity = initialOpacity*progress;
45
			int opacityToSet = new Double(currOpacity).intValue();
46
			DOM.setStyleAttribute(widget.getElement(), "opacity", ""+new Double(1d-currOpacity/100d));
43
			currOpacity = initialOpacity * progress;
44
			DOM.setStyleAttribute(widget.getElement(), "opacity", ""+new Double(1d - currOpacity / 100d));
47 45
			//required for ie to work
48 46
			//Disabled because IE has bugs rendering non-opaque objects
49
			//DOM.setStyleAttribute(widget.getElement(), "filter", "alpha(opacity="+(initialOpacity-opacityToSet)+")");
47
			//int opacityToSet = new Double(currOpacity).intValue();
48
			//DOM.setStyleAttribute(widget.getElement(), "filter", "alpha(opacity=" + (initialOpacity - opacityToSet) + ")");
50 49
		}
51 50
	}
52 51

  

Also available in: Unified diff