|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BoxMacroParameters | Line # 35 | 10 | 0% | 10 | 2 | 90% |
0.9
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(16) | |||
Result | |||
0.8
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.8
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.8
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.7
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.7
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.7
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.7
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.6
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
0.5
|
org.xwiki.rendering.test.integration.RenderingTest.execute
![]() |
1 PASS | |
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.box; | |
21 | ||
22 | import java.util.List; | |
23 | ||
24 | import org.apache.commons.lang3.StringUtils; | |
25 | import org.xwiki.properties.annotation.PropertyDescription; | |
26 | import org.xwiki.properties.annotation.PropertyHidden; | |
27 | import org.xwiki.rendering.block.Block; | |
28 | import org.xwiki.rendering.listener.reference.ResourceReference; | |
29 | ||
30 | /** | |
31 | * Parameters for the Box macro. | |
32 | * | |
33 | * @version $Id: 86aeaf21e485b99471c02d084482bbbd824ecf68 $ | |
34 | */ | |
35 | public class BoxMacroParameters | |
36 | { | |
37 | /** | |
38 | * @see @getClassProperty | |
39 | */ | |
40 | private String cssClass = StringUtils.EMPTY; | |
41 | ||
42 | /** | |
43 | * @see #getTitle() | |
44 | */ | |
45 | private String title = StringUtils.EMPTY; | |
46 | ||
47 | /** | |
48 | * @see #getImage() | |
49 | */ | |
50 | private ResourceReference imageReference; | |
51 | ||
52 | /** | |
53 | * @see #getWidth() | |
54 | */ | |
55 | private String width = StringUtils.EMPTY; | |
56 | ||
57 | /** | |
58 | * @see #getTitle() | |
59 | */ | |
60 | private List< ? extends Block> blockTitle; | |
61 | ||
62 | /** | |
63 | * Optionally, the title can contain a list of Blocks, for more flexibility, instead of storing only ordinary text. | |
64 | * | |
65 | * @return the title represented as a list of Blocks | |
66 | */ | |
67 | 19 |
![]() |
68 | { | |
69 | 19 | return blockTitle; |
70 | } | |
71 | ||
72 | /** | |
73 | * @param blockTitle - refer to {@link #getBlockTitle()} | |
74 | */ | |
75 | 0 |
![]() |
76 | public void setBlockTitle(List< ? extends Block> blockTitle) | |
77 | { | |
78 | 0 | this.blockTitle = blockTitle; |
79 | } | |
80 | ||
81 | /** | |
82 | * @return the title to be displayed in the message box. Note that it can contain content in the current syntax | |
83 | * and that text which will be parsed and rendered as any syntax content | |
84 | */ | |
85 | 36 |
![]() |
86 | { | |
87 | 36 | return title; |
88 | } | |
89 | ||
90 | /** | |
91 | * @param title refer to {@link #getTitle()} | |
92 | */ | |
93 | 7 |
![]() |
94 | public void setTitle(String title) | |
95 | { | |
96 | 7 | this.title = title; |
97 | } | |
98 | ||
99 | /** | |
100 | * @return the reference to the image to display in the message box. | |
101 | */ | |
102 | 36 |
![]() |
103 | { | |
104 | 36 | return this.imageReference; |
105 | } | |
106 | ||
107 | /** | |
108 | * @param imageReference see {@link #getImage()} | |
109 | */ | |
110 | 3 |
![]() |
111 | public void setImage(ResourceReference imageReference) | |
112 | { | |
113 | 3 | this.imageReference = imageReference; |
114 | } | |
115 | ||
116 | /** | |
117 | * @return an optional CSS sheet to be used when rendering this macro. If no sheet is specified, the | |
118 | * <code>BoxMacro.getClassProperty()</code> is used to provide a default one. | |
119 | */ | |
120 | 36 |
![]() |
121 | { | |
122 | 36 | return cssClass; |
123 | } | |
124 | ||
125 | /** | |
126 | * @param cssClass refer to {@link BoxMacroParameters#getCssClass()} | |
127 | */ | |
128 | 7 |
![]() |
129 | public void setCssClass(String cssClass) | |
130 | { | |
131 | 7 | this.cssClass = cssClass; |
132 | } | |
133 | ||
134 | /** | |
135 | * @return an optional width to enforce as an inline style on the DIV element the box will be formed of. | |
136 | */ | |
137 | 37 |
![]() |
138 | { | |
139 | 37 | return this.width; |
140 | } | |
141 | ||
142 | /** | |
143 | * @param width refer to {@link BoxMacroParameters#getWidth()} | |
144 | */ | |
145 | 1 |
![]() |
146 | public void setWidth(String width) | |
147 | { | |
148 | 1 | this.width = width; |
149 | } | |
150 | } |
|