01: package org.apache.turbine.modules.navigations;
02:
03: /*
04: * Copyright 2001-2005 The Apache Software Foundation.
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License")
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
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: public class DefaultTopNavigation extends Navigation {
35: /** The string to display */
36: private static String txt = "Turbine - A Servlet Framework for building "
37: + "Secure Dynamic Websites.";
38:
39: /**
40: * Build the Navigation.
41: *
42: * @param data Turbine information.
43: * @return A ConcreteElement.
44: * @exception Exception a generic exception.
45: */
46: public ConcreteElement doBuild(RunData data) throws Exception {
47: data.getPage().getBody().addElement(
48: new B().addElement(
49: new Font().setColor(HtmlColor.green).setSize(2)
50: .addElement(txt)).addElement(
51: new HR().setSize(1).setNoShade(true)));
52:
53: return null;
54: }
55: }
|