1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.rendering.macro.container

File ContainerMacroParameters.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart7.png
64% of files have more coverage

Code metrics

0
6
6
1
105
36
6
1
1
6
1

Classes

Class Line # Actions
ContainerMacroParameters 31 6 0% 6 4
0.666666766.7%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.rendering.macro.container;
21   
22    import org.xwiki.properties.annotation.PropertyDescription;
23   
24    /**
25    * Parameters of the container macro, specifying the layout of the container, for the moment. To be completed with other
26    * properties for the container.
27    *
28    * @version $Id: 02190fcfdfbad3e63b88422ae9603712e6c75f4d $
29    * @since 2.5M2
30    */
 
31    public class ContainerMacroParameters
32    {
33    /**
34    * Flag specifying whether the groups inside this macro are displayed as justified or not.
35    */
36    private boolean justify;
37   
38    /**
39    * The style of the layout of this container.
40    */
41    private String layoutStyle;
42   
43    /**
44    * The css class of this container.
45    */
46    private String cssClass;
47   
48    /**
49    * @return the string identifying the layout style for this container.
50    */
 
51  3 toggle public String getLayoutStyle()
52    {
53  3 return layoutStyle;
54    }
55   
56    /**
57    * Sets the layout style of this container.
58    *
59    * @param layoutStyle the style to set, e.g. {@code columns}
60    */
 
61  3 toggle @PropertyDescription("The identifier of the container layout (e.g. \"columns\"). If no style is provided, the "
62    + "container content will be rendered as is.")
63    public void setLayoutStyle(String layoutStyle)
64    {
65  3 this.layoutStyle = layoutStyle;
66    }
67   
68    /**
69    * @return {@code true} whether the content in this container is justified, {@code false} otherwise
70    */
 
71  3 toggle public boolean isJustify()
72    {
73  3 return justify;
74    }
75   
76    /**
77    * Set if the content in this container is justified.
78    *
79    * @param justify {@code true} whether the content in this container is aligned "justify", {@code false} otherwise
80    */
 
81  0 toggle @PropertyDescription("Flag specifying whether the content in this container is justified or not.")
82    public void setJustify(boolean justify)
83    {
84  0 this.justify = justify;
85    }
86   
87    /**
88    * @return the CSS class to add to this container
89    * @since 3.0M1
90    */
 
91  3 toggle public String getCssClass()
92    {
93  3 return cssClass;
94    }
95   
96    /**
97    * @param cssClass the value of the class attribute to set for CSS styling
98    * @since 3.0M1
99    */
 
100  0 toggle @PropertyDescription("Value of the HTML class attribute to add to this container, used to style in CSS.")
101    public void setCssClass(String cssClass)
102    {
103  0 this.cssClass = cssClass;
104    }
105    }