/*\r
- * Copyright 2011-2012 GRNET S.A. All rights reserved.\r
+ * Copyright 2011-2013 GRNET S.A. All rights reserved.\r
*\r
* Redistribution and use in source and binary forms, with or\r
* without modification, are permitted provided that the following\r
*/\r
package gr.grnet.pithos.web.client;\r
\r
-import gr.grnet.pithos.web.client.animation.FadeIn;\r
-import gr.grnet.pithos.web.client.animation.FadeOut;\r
-\r
import com.google.gwt.core.client.GWT;\r
import com.google.gwt.event.dom.client.ClickEvent;\r
import com.google.gwt.event.dom.client.ClickHandler;\r
import com.google.gwt.resources.client.ClientBundle;\r
import com.google.gwt.resources.client.ImageResource;\r
+import com.google.gwt.user.client.Window;\r
import com.google.gwt.user.client.ui.AbstractImagePrototype;\r
import com.google.gwt.user.client.ui.Composite;\r
import com.google.gwt.user.client.ui.HTML;\r
* A link to send feedBack about the error.\r
*/\r
private HTML feedbackLink;\r
+ \r
+ Pithos app;\r
+ \r
/**\r
* The widget's constructor.\r
*\r
* @param newImages a bundle that provides the images for this widget\r
*/\r
- public MessagePanel(final Pithos app, final Images newImages) {\r
+ public MessagePanel(Pithos _app, final Images newImages) {\r
+ app = _app;\r
images = newImages;\r
simplePanel = new SimplePanel();\r
simplePanel.setStyleName("effectPanel");\r
\r
@Override\r
public void onClick(ClickEvent event) {\r
- FadeOut anim = new FadeOut(simplePanel){\r
-\r
- @Override\r
- protected void onComplete() {\r
- super.onComplete();\r
- hideMessage();\r
- }\r
- };\r
- anim.run(500);\r
+ hideMessage();\r
}\r
});\r
inner.add(message);\r
\r
@Override\r
public void onClick(ClickEvent event) {\r
- FadeOut anim = new FadeOut(simplePanel){\r
- @Override\r
- protected void onComplete() {\r
- super.onComplete();\r
- hideMessage();\r
- }\r
- };\r
- anim.run(500);\r
+ hideMessage();\r
}\r
});\r
linkPanel.add(clearMessageLink);\r
message.setHTML("<table class='pithos-errorMessage'><tr><td>" + AbstractImagePrototype.create(images.error()).getHTML() + "</td><td>" + msg + "</td></tr></table>");\r
feedbackLink.setVisible(true);\r
setVisible(true);\r
- FadeIn anim = new FadeIn(simplePanel);\r
- anim.run(500);\r
}\r
\r
/**\r
message.setHTML("<table class='pithos-warnMessage'><tr><td>" + AbstractImagePrototype.create(images.warn()).getHTML() + "</td><td>" + msg + "</td></tr></table>");\r
feedbackLink.setVisible(false);\r
setVisible(true);\r
- FadeIn anim = new FadeIn(simplePanel);\r
- anim.run(500);\r
}\r
\r
/**\r
message.setHTML("<table class='pithos-infoMessage'><tr><td>" + AbstractImagePrototype.create(images.info()).getHTML() + "</td><td>" + msg + "</td></tr></table>");\r
feedbackLink.setVisible(false);\r
setVisible(true);\r
- FadeIn anim = new FadeIn(simplePanel);\r
- anim.run(500);\r
}\r
\r
/**\r
public void hideMessage() {\r
message = new HTML(" ");\r
this.setVisible(false);\r
+ app.onWindowResized(Window.getClientHeight());\r
}\r
-\r
}\r