Statistics
| Branch: | Tag: | Revision:

root / src / gr / grnet / pithos / web / client / StatusPanel.java @ fbb19e02

History | View | Annotate | Download (3.4 kB)

1 a57faaf0 Christos Stathis
/*
2 e6e9f6e6 Christos KK Loverdos
 * Copyright 2011-2013 GRNET S.A. All rights reserved.
3 63366925 Christos Stathis
 *
4 63366925 Christos Stathis
 * Redistribution and use in source and binary forms, with or
5 63366925 Christos Stathis
 * without modification, are permitted provided that the following
6 63366925 Christos Stathis
 * conditions are met:
7 63366925 Christos Stathis
 *
8 63366925 Christos Stathis
 *   1. Redistributions of source code must retain the above
9 63366925 Christos Stathis
 *      copyright notice, this list of conditions and the following
10 63366925 Christos Stathis
 *      disclaimer.
11 63366925 Christos Stathis
 *
12 63366925 Christos Stathis
 *   2. Redistributions in binary form must reproduce the above
13 63366925 Christos Stathis
 *      copyright notice, this list of conditions and the following
14 63366925 Christos Stathis
 *      disclaimer in the documentation and/or other materials
15 63366925 Christos Stathis
 *      provided with the distribution.
16 63366925 Christos Stathis
 *
17 63366925 Christos Stathis
 * THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
18 63366925 Christos Stathis
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 63366925 Christos Stathis
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 63366925 Christos Stathis
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
21 63366925 Christos Stathis
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 63366925 Christos Stathis
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 63366925 Christos Stathis
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 63366925 Christos Stathis
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 63366925 Christos Stathis
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 63366925 Christos Stathis
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27 63366925 Christos Stathis
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 63366925 Christos Stathis
 * POSSIBILITY OF SUCH DAMAGE.
29 63366925 Christos Stathis
 *
30 63366925 Christos Stathis
 * The views and conclusions contained in the software and
31 63366925 Christos Stathis
 * documentation are those of the authors and should not be
32 63366925 Christos Stathis
 * interpreted as representing official policies, either expressed
33 63366925 Christos Stathis
 * or implied, of GRNET S.A.
34 a57faaf0 Christos Stathis
 */
35 a57faaf0 Christos Stathis
package gr.grnet.pithos.web.client;
36 a57faaf0 Christos Stathis
37 b850b91d Christos Stathis
import com.google.gwt.core.client.GWT;
38 cdc11586 Christos Stathis
import com.google.gwt.i18n.client.Dictionary;
39 9578b580 Christos Stathis
import com.google.gwt.user.client.ui.Anchor;
40 a57faaf0 Christos Stathis
import com.google.gwt.user.client.ui.Composite;
41 a57faaf0 Christos Stathis
import com.google.gwt.user.client.ui.HTML;
42 a57faaf0 Christos Stathis
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
43 a57faaf0 Christos Stathis
import com.google.gwt.user.client.ui.HorizontalPanel;
44 36dc8e18 Christos Stathis
import com.google.gwt.user.client.ui.VerticalPanel;
45 a57faaf0 Christos Stathis
46 a57faaf0 Christos Stathis
/**
47 a57faaf0 Christos Stathis
 * The panel that displays a status bar with quota information.
48 a57faaf0 Christos Stathis
 */
49 a57faaf0 Christos Stathis
public class StatusPanel extends Composite {
50 a57faaf0 Christos Stathis
51 a57faaf0 Christos Stathis
        /**
52 a57faaf0 Christos Stathis
         * The constructor of the status panel.
53 a57faaf0 Christos Stathis
         */
54 36dc8e18 Christos Stathis
        public StatusPanel() {
55 cdc11586 Christos Stathis
                Dictionary otherProperties = Dictionary.getDictionary("otherProperties");
56 cdc11586 Christos Stathis
57 a57faaf0 Christos Stathis
                HorizontalPanel outer = new HorizontalPanel();
58 a57faaf0 Christos Stathis
                outer.setWidth("100%");
59 36dc8e18 Christos Stathis
                outer.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
60 36dc8e18 Christos Stathis
61 36dc8e18 Christos Stathis
        VerticalPanel inner = new VerticalPanel();
62 36dc8e18 Christos Stathis
        inner.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
63 36dc8e18 Christos Stathis
                HorizontalPanel firstLine = new HorizontalPanel();
64 36dc8e18 Christos Stathis
                firstLine.setSpacing(8);
65 9578b580 Christos Stathis
                firstLine.add(new Anchor("About"));
66 9578b580 Christos Stathis
                firstLine.add(new HTML("|"));
67 9578b580 Christos Stathis
        firstLine.add(new Anchor("Help"));
68 9578b580 Christos Stathis
                firstLine.add(new HTML("|"));
69 9578b580 Christos Stathis
        firstLine.add(new Anchor("Contact"));
70 9578b580 Christos Stathis
                firstLine.add(new HTML("|"));
71 9578b580 Christos Stathis
        firstLine.add(new Anchor("Terms"));
72 9578b580 Christos Stathis
                firstLine.add(new HTML("|"));
73 9578b580 Christos Stathis
        firstLine.add(new Anchor("Privacy"));
74 36dc8e18 Christos Stathis
                inner.add(firstLine);
75 36dc8e18 Christos Stathis
76 36dc8e18 Christos Stathis
        HorizontalPanel secondLine = new HorizontalPanel();
77 5b380d95 Christos KK Loverdos
        secondLine.add(new HTML("Pithos Web Client v" + otherProperties.get("version") + " <a class='grnet-sign' href='http://www.grnet.gr'>Copyright (C) 2011-2013 Greek Research and Technology Network</a>"));
78 362f30e4 Christos Stathis
        secondLine.addStyleName("grnet-sign");
79 36dc8e18 Christos Stathis
        inner.add(secondLine);
80 36dc8e18 Christos Stathis
        outer.add(inner);
81 bbdd34ef Christos Stathis
        outer.addStyleName("pithos-statusbar");
82 bbdd34ef Christos Stathis
83 a57faaf0 Christos Stathis
                initWidget(outer);
84 a57faaf0 Christos Stathis
        }
85 a57faaf0 Christos Stathis
}