root / src / gr / grnet / pithos / web / client / StatusPanel.java @ ecc4ef81
History | View | Annotate | Download (3.3 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 | cdc11586 | Christos Stathis | import com.google.gwt.i18n.client.Dictionary; |
38 | f2ae0948 | Christos KK Loverdos | import com.google.gwt.user.client.ui.*; |
39 | a57faaf0 | Christos Stathis | |
40 | a57faaf0 | Christos Stathis | /**
|
41 | a57faaf0 | Christos Stathis | * The panel that displays a status bar with quota information.
|
42 | a57faaf0 | Christos Stathis | */
|
43 | a57faaf0 | Christos Stathis | public class StatusPanel extends Composite { |
44 | a57faaf0 | Christos Stathis | |
45 | a57faaf0 | Christos Stathis | /**
|
46 | a57faaf0 | Christos Stathis | * The constructor of the status panel.
|
47 | a57faaf0 | Christos Stathis | */
|
48 | 36dc8e18 | Christos Stathis | public StatusPanel() {
|
49 | cdc11586 | Christos Stathis | Dictionary otherProperties = Dictionary.getDictionary("otherProperties"); |
50 | f2ae0948 | Christos KK Loverdos | final String SERVICE_NAME = otherProperties.get("SERVICE_NAME"); |
51 | f2ae0948 | Christos KK Loverdos | final String SERVICE_URL = otherProperties.get("SERVICE_URL"); |
52 | f2ae0948 | Christos KK Loverdos | final String COMPANY_NAME = otherProperties.get("COMPANY_NAME"); |
53 | f2ae0948 | Christos KK Loverdos | final String COMPANY_URL = otherProperties.get("COMPANY_URL"); |
54 | f2ae0948 | Christos KK Loverdos | final String COPYRIGHT_MESSAGE = otherProperties.get("COPYRIGHT_MESSAGE"); |
55 | ecc4ef81 | Christos KK Loverdos | final String SYNNEFO_VERSION = otherProperties.get("SYNNEFO_VERSION"); |
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 | f2ae0948 | Christos KK Loverdos | firstLine.add(new HTML("<a class='grnet-sign' href='" + COMPANY_URL + "'>" + COPYRIGHT_MESSAGE + "</a>")); |
66 | 36dc8e18 | Christos Stathis | inner.add(firstLine); |
67 | 36dc8e18 | Christos Stathis | |
68 | 36dc8e18 | Christos Stathis | HorizontalPanel secondLine = new HorizontalPanel();
|
69 | f2ae0948 | Christos KK Loverdos | secondLine.add(new HTML( |
70 | ecc4ef81 | Christos KK Loverdos | "<div class='software'>Powered by <a href='http://synnefo.org'>Synnefo</a> <span class='version'>v " + SYNNEFO_VERSION + "</span></div>")); |
71 | f2ae0948 | Christos KK Loverdos | secondLine.addStyleName("software");
|
72 | 36dc8e18 | Christos Stathis | inner.add(secondLine); |
73 | 36dc8e18 | Christos Stathis | outer.add(inner); |
74 | bbdd34ef | Christos Stathis | outer.addStyleName("pithos-statusbar");
|
75 | bbdd34ef | Christos Stathis | |
76 | a57faaf0 | Christos Stathis | initWidget(outer); |
77 | a57faaf0 | Christos Stathis | } |
78 | a57faaf0 | Christos Stathis | } |