1 package org.apache.turbine.modules.navigations;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.ecs.ConcreteElement;
20 import org.apache.ecs.HtmlColor;
21 import org.apache.ecs.html.B;
22 import org.apache.ecs.html.Font;
23 import org.apache.ecs.html.HR;
24 import org.apache.turbine.modules.Navigation;
25 import org.apache.turbine.util.RunData;
26
27 /***
28 * This is a sample navigation module.
29 *
30 * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
31 * @version $Id: DefaultTopNavigation.java 264148 2005-08-29 14:21:04Z henning $
32 * @deprecated The use of ECS for the view is deprecated. Use a templating solution.
33 */
34 public class DefaultTopNavigation
35 extends Navigation
36 {
37 /*** The string to display */
38 private static String txt = "Turbine - A Servlet Framework for building "
39 + "Secure Dynamic Websites.";
40
41 /***
42 * Build the Navigation.
43 *
44 * @param data Turbine information.
45 * @return A ConcreteElement.
46 * @exception Exception a generic exception.
47 */
48 public ConcreteElement doBuild(RunData data)
49 throws Exception
50 {
51 data.getPage().getBody()
52 .addElement(new B().addElement(
53 new Font().setColor(HtmlColor.green).setSize(2)
54 .addElement(txt))
55 .addElement(new HR().setSize(1).setNoShade(true)));
56
57 return null;
58 }
59 }