1
2
3
4
5 package org.directdemocracyportal.democracy.web.views;
6
7 import org.directdemocracyportal.democracy.web.ApplicationMessageHolder;
8 import org.directdemocracyportal.democracy.web.BeanLocator;
9 import org.directdemocracyportal.democracy.web.ApplicationMessageHolder.MessageConstans;
10 import org.directdemocracyportal.democracy.web.action.ShowApplicationHome;
11 import org.directdemocracyportal.democracy.web.views.header.WelcomePanel;
12
13 import thinwire.ui.Hyperlink;
14 import thinwire.ui.Panel;
15 import thinwire.ui.layout.TableLayout;
16 import thinwire.ui.style.Color;
17
18 /***
19 * The Class HeaderPanel.
20 */
21 public class HeaderPanel extends Panel
22 {
23
24 /***
25 * Instantiates a new header panel.
26 */
27 public HeaderPanel() {
28 ActiveUserView.activeHeaderPanel.set(this);
29
30 setLayout(new TableLayout(new double[][] { { 0.3, 0.4, 0.3 },
31
32 { 0 } },
33 1,
34 5));
35
36 getStyle().getBackground().setColor(Color.valueOf("rgb(0,51,153)"));
37
38 Hyperlink homelink = new Hyperlink(ApplicationMessageHolder
39 .getMessage(MessageConstans.APPLICATION_NAME));
40 homelink.setLimit("0,0");
41 homelink.getStyle().getFont().setColor(Color.WHITE);
42 homelink.setUserObject(new ShowApplicationHome());
43 homelink.addActionListener(ACTION_CLICK, BeanLocator
44 .getApplicationActionListener());
45 getChildren().add(homelink);
46
47 WelcomePanel welcomePanel = new WelcomePanel();
48 welcomePanel.setLimit("2,0");
49 ActiveUserView.activeRightHeaderPanel.set(welcomePanel);
50 getChildren().add(welcomePanel);
51 }
52
53 }