%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.turbine.modules.navigations.DefaultTopNavigation |
|
|
1 | package org.apache.turbine.modules.navigations; |
|
2 | ||
3 | /* |
|
4 | * Copyright 2001-2005 The Apache Software Foundation. |
|
5 | * |
|
6 | * Licensed under the Apache License, Version 2.0 (the "License") |
|
7 | * you may not use this file except in compliance with the License. |
|
8 | * You may obtain a copy of the License at |
|
9 | * |
|
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
|
11 | * |
|
12 | * Unless required by applicable law or agreed to in writing, software |
|
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
15 | * See the License for the specific language governing permissions and |
|
16 | * limitations under the License. |
|
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 | 0 | public class DefaultTopNavigation |
35 | extends Navigation |
|
36 | { |
|
37 | /** The string to display */ |
|
38 | 0 | 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 | 0 | 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 | 0 | return null; |
58 | } |
|
59 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |