View Javadoc

1   /**
2    * This file is part of the equanda project.
3    *
4    * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7    *
8    * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
9    * ANY KIND, either express or implied. See the License for the specific language governing rights and
10   * limitations under the License.
11   *
12   * Alternatively, the contents of this file may be used under the terms of
13   * either the GNU General Public License Version 2 or later (the "GPL"), or
14   * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
15   * in which case the provisions of the GPL or the LGPL are applicable instead
16   * of those above. If you wish to allow use of your version of this file only
17   * under the terms of either the GPL or the LGPL, and not to allow others to
18   * use your version of this file under the terms of the MPL, indicate your
19   * decision by deleting the provisions above and replace them with the notice
20   * and other provisions required by the GPL or the LGPL. If you do not delete
21   * the provisions above, a recipient may use your version of this file under
22   * the terms of any one of the MPL, the GPL or the LGPL.
23   */
24  
25  package org.equanda.test.gui.components;
26  
27  import org.apache.tapestry5.Asset;
28  import org.apache.tapestry5.Block;
29  import org.apache.tapestry5.annotations.Parameter;
30  import org.apache.tapestry5.annotations.Path;
31  import org.apache.tapestry5.ioc.annotations.Inject;
32  
33  /**
34   * General layout
35   *
36   * @author <a href="mailto:joachim@progs.be">Joachim Van der Auwera</a>
37   */
38  public class Layout
39  {
40      @Inject
41      @Path("context:css/style.css")
42      private Asset style;
43  
44      @Inject
45      @Path( "${tapestry.scriptaculous}/prototype.js" )
46      private Asset prototypeJs;
47  
48      @Inject
49      @Path( "classpath:/org/equanda/tapestry5/resources/equanda.js" )
50      private Asset equandaJs;
51  
52      @Parameter
53      private Block sidebar;
54  
55      @Parameter
56      private Block context;
57  
58      @Parameter
59      private Block title;
60  
61      @Parameter
62      private Block buttons;
63  
64      public Asset getEquandaJs() { return equandaJs; }
65  
66      public Asset getPrototypeJs()
67      {
68          return prototypeJs;
69      }
70  
71      public Asset getStyle()
72      {
73          return style;
74      }
75  
76      public void setStyle( Asset style )
77      {
78          this.style = style;
79      }
80  
81      public Block getSidebar()
82      {
83          return sidebar;
84      }
85  
86      public void setSidebar( Block sidebar )
87      {
88          this.sidebar = sidebar;
89      }
90  
91      public Block getContext()
92      {
93          return context;
94      }
95  
96      public void setContext( Block context )
97      {
98          this.context = context;
99      }
100 
101     public Block getTitle()
102     {
103         return title;
104     }
105 
106     public void setTitle( Block title )
107     {
108         this.title = title;
109     }
110 
111     public Block getButtons()
112     {
113         return buttons;
114     }
115 
116     public void setButtons( Block buttons )
117     {
118         this.buttons = buttons;
119     }
120 }