Clover coverage report - brownies library - 1.0-beta-1 Coverage timestamp: 月 8 16 2004 17:14:42 GMT+09:00 FRAMES NO FRAMES |
file stats: | LOC: | 86 |  | Methods: | 4
| NCLOC: | 39 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
OpenCloseSwitch.java | - | 0% | 0% | 0% |

1 |  |
     /*
2 |  |
      * Joey and its relative products are published under the terms
3 |  |
      * of the Apache Software License.
4 |  |
      */
5 |  |
     /*
6 |  |
      * Created on 2004/02/04
7 |  |
      */
8 |  |
     package org.asyrinx.brownie.tapestry.components.layer;
9 |  |
10 |  |
     import java.util.Map;
11 |  |
12 |  |
     import org.apache.tapestry.BaseComponent;
13 |  |
     import org.apache.tapestry.IAsset;
14 |  |
     import org.apache.tapestry.IMarkupWriter;
15 |  |
     import org.apache.tapestry.IRequestCycle;
16 |  |
     import org.apache.tapestry.engine.IPageLoader;
17 |  |
     import org.apache.tapestry.spec.IComponentSpecification;
18 |  |
     import org.asyrinx.brownie.tapestry.script.IScriptUser;
19 |  |
     import org.asyrinx.brownie.tapestry.script.ScriptUsage;
20 |  |
     import org.asyrinx.brownie.tapestry.script.ScriptWriter;
21 |  |
22 |  |
     /**
23 |  |
      * @author akima
24 |  |
      */
25 |  |
     public abstract class OpenCloseSwitch extends BaseComponent implements
26 |  |
             IScriptUser {
27 |  |
28 |  |
         /**
29 |  |
          * @param scriptName
30 |  |
          */
31 | 0 |
         public OpenCloseSwitch() {
32 | 0 |
             super();
33 | 0 |
             this.scriptWriter = new ScriptWriter(this, "OpenCloseSwitch.script");
34 | 0 |
             this.scriptWriter.setUsage(ScriptUsage.ONCE_BY_CLASS);
35 |  |
         }
36 |  |
37 |  |
         private final ScriptWriter scriptWriter;
38 |  |
39 |  |
         /**
40 |  |
          * @see org.apache.tapestry.IComponent#finishLoad(org.apache.tapestry.IRequestCycle,
41 |  |
          *      org.apache.tapestry.engine.IPageLoader,
42 |  |
          *      org.apache.tapestry.spec.IComponentSpecification)
43 |  |
          */
44 | 0 |
         public void finishLoad(IRequestCycle cycle, IPageLoader loader,
45 |  |
                 IComponentSpecification specification) {
46 | 0 |
             super.finishLoad(cycle, loader, specification);
47 | 0 |
             this.setOpenImage(getAsset("img_plus"));
48 | 0 |
             this.setCloseImage(getAsset("img_minus"));
49 |  |
             //this.setOpenImage(null);
50 |  |
             //this.setCloseImage(null);
51 |  |
         }
52 |  |
53 |  |
         /**
54 |  |
          * @see org.asyrinx.brownie.tapestry.components.layer.AbstractLayerComponent#prepareScriptSymbols(java.util.Map,
55 |  |
          *      org.apache.tapestry.IRequestCycle)
56 |  |
          */
57 | 0 |
         public void prepareScriptSymbols(Map symbols, IRequestCycle cycle) {
58 |  |
             //do nothing
59 |  |
         }
60 |  |
61 |  |
         /**
62 |  |
          * @see org.apache.tapestry.AbstractComponent#renderComponent(org.apache.tapestry.IMarkupWriter,
63 |  |
          *      org.apache.tapestry.IRequestCycle)
64 |  |
          */
65 | 0 |
         protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) {
66 | 0 |
             this.scriptWriter.execute(cycle);
67 | 0 |
             super.renderComponent(writer, cycle);
68 |  |
         }
69 |  |
70 |  |
         abstract public boolean isDefaultOpened();
71 |  |
72 |  |
         abstract public void setDefaultOpened(boolean b);
73 |  |
74 |  |
         abstract public String getTargetId();
75 |  |
76 |  |
         abstract public void setTargetId(String string);
77 |  |
78 |  |
         abstract public IAsset getCloseImage();
79 |  |
80 |  |
         abstract public void setCloseImage(IAsset asset);
81 |  |
82 |  |
         abstract public IAsset getOpenImage();
83 |  |
84 |  |
         abstract public void setOpenImage(IAsset asset);
85 |  |
86 |  |
     }