Revision 249fbc5b src/gr/grnet/pithos/web/client/UploadAlert.java

b/src/gr/grnet/pithos/web/client/UploadAlert.java
47 47
 */
48 48
public class UploadAlert extends PopupPanel {
49 49
	
50
	private HTML label = new HTML();
51
	
50 52
	/**
51 53
	 * The widget's constructor.
52 54
	 */
53
	public UploadAlert(final Pithos app, int numOfFiles) {
55
	public UploadAlert(final Pithos app, int _numOfFiles) {
54 56
		// The popup's constructor's argument is a boolean specifying that it
55 57
		// auto-close itself when the user clicks outside of it.
56 58
		super(false);
57 59
		setAnimationEnabled(true);
58 60
		addStyleName(Pithos.resources.pithosCss().uploadAlert());
59 61
		FlowPanel content = new FlowPanel();
60
		String label = String.valueOf(numOfFiles) + " " + (numOfFiles > 1 ? "files are" : "file is") + " being uploaded";
61
		content.add(new HTML(label));
62
		setNumOfFiles(_numOfFiles);
63
		content.add(label);
62 64
		Anchor a = new Anchor("Click for details");
63 65
		a.addStyleName(Pithos.resources.pithosCss().uploadAlertLink());
64 66
		a.addClickHandler(new ClickHandler() {
......
99 101
		
100 102
		add(content);
101 103
	}
104
	
105
	public void setNumOfFiles(int n) {
106
		label.setText(String.valueOf(n) + " " + (n > 1 ? "files are" : "file is") + " being uploaded");
107
	}
102 108
}

Also available in: Unified diff