Clover Coverage Report - FEST Swing 1.2
Coverage timestamp: Tue Jun 1 2010 15:19:25 PDT
../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
5   74   4   1.25
0   21   0.8   2
4     1  
2    
 
  AppletParameter       Line # 33 3 0% 2 0 100% 1.0
  AppletParameter.AppletParameterBuilder       Line # 57 2 0% 2 0 100% 1.0
 
No Tests
 
1    /*
2    * Created on Jul 14, 2008
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5    * the License. You may obtain a copy of the License at
6    *
7    * http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10    * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11    * specific language governing permissions and limitations under the License.
12    *
13    * Copyright @2008-2010 the original author or authors.
14    */
15    package org.fest.swing.launcher;
16   
17    /**
18    * Understands a fluent interface for creation of applet parameters.
19    * <p>
20    * For example, the following code listing:
21    *
22    * <pre>
23    * // import static org.fest.swing.launcher.AppletParameter.name;
24    *
25    * AppletParameter = {@link #name(String) name}(&quot;bgcolor&quot;).{@link AppletParameterBuilder#value(String) value}(&quot;blue&quot;);
26    * </pre>
27    *
28    * will create an applet parameter with name "bgcolor" and value "blue."
29    * </p>
30    *
31    * @author Yvonne Wang
32    */
 
33    public class AppletParameter {
34   
35    public final String name;
36    public final String value;
37   
 
38  4 toggle AppletParameter(String name, String value) {
39  4 this.name = name;
40  4 this.value = value;
41    }
42   
43    /**
44    * Starting point of the fluent interface for creation of <code>{@link AppletParameter}</code>s.
45    * @param name the name of the applet parameter.
46    * @return a builder of <code>AppletParameter</code>s.
47    */
 
48  4 toggle public static AppletParameterBuilder name(String name) {
49  4 return new AppletParameterBuilder(name);
50    }
51   
52    /**
53    * Understands creation of <code>{@link AppletParameter}</code>s.
54    *
55    * @author Yvonne Wang
56    */
 
57    public static class AppletParameterBuilder {
58   
59    private final String name;
60   
 
61  4 toggle AppletParameterBuilder(String name) {
62  4 this.name = name;
63    }
64   
65    /**
66    * Creates a new <code>{@link AppletParameter}</code> with the given name and value.
67    * @param value the value for the <code>AppletParameter</code>.
68    * @return the created <code>AppletParameter</code>.
69    */
 
70  4 toggle public AppletParameter value(String value) {
71  4 return new AppletParameter(name, value);
72    }
73    }
74    }