View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   package org.directdemocracyportal.democracy.web.views;
6   
7   import org.directdemocracyportal.democracy.web.ApplicationMessageHolder;
8   import org.directdemocracyportal.democracy.web.ApplicationMessageHolder.MessageConstans;
9   
10  import thinwire.ui.Hyperlink;
11  import thinwire.ui.Label;
12  import thinwire.ui.Panel;
13  import thinwire.ui.layout.TableLayout;
14  import thinwire.ui.style.Color;
15  
16  /***
17   * The Class FooterPanel.
18   */
19  public class FooterPanel extends Panel
20  {
21  
22      /***
23       * Instantiates a new footer panel.
24       */
25      public FooterPanel() {
26          setLayout(new TableLayout(new double[][] { { 0, 0 }, // Column Widths
27                  { 0 } }, // Row Heights
28                  5, // Margin around edge of container
29                  5)); // Spacing between cells
30  
31          getStyle().getBackground().setColor(Color.valueOf("rgb(0,51,153)"));
32  
33          Hyperlink applicationlink = new Hyperlink(ApplicationMessageHolder
34                  .getMessage(MessageConstans.APPLICATION_NAME),
35                  ApplicationMessageHolder
36                          .getMessage(MessageConstans.APPLICATION_URL));
37          applicationlink.setSize(150, 20);
38          applicationlink.setLimit("0,0,r,c");
39          getChildren().add(applicationlink);
40          Label footerBanner = new Label();
41          footerBanner.getStyle().getFont().setColor(Color.WHITE);
42          footerBanner.setText("["
43                  + ApplicationMessageHolder
44                          .getMessage(MessageConstans.APPLICATION_VERSION)
45                  + "] Copyright (c) 2005 Pether Sorling");
46          footerBanner.setSize(280, 20);
47          footerBanner.setLimit("1,0,l,c");
48          getChildren().add(footerBanner);
49      }
50  }