1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.jameleon.plugin.jiffie.tags;
20
21 import net.sf.jameleon.plugin.jiffie.IEFunctionTag;
22 import net.sf.jameleon.util.StateStorer;
23
24 /***
25 * Takes a snapshot of the currently displayed page.
26 *
27 * Some example uses might be:
28 *
29 * While on a given page, you want to save a snapshot with the name "test.html"
30 * <pre><source>
31 * <ie-snap-shot functionId="Take a snapshot of the current page and save it as 'test.html'"
32 * fileNameToStore="test"/>
33 * </source></pre>
34 * @jameleon.function name="ie-snap-shot" type="action"
35 */
36 public class IESnapShotTag extends IEFunctionTag{
37
38 /***
39 * The file name minus the .html extension.
40 * @jameleon.attribute required="true"
41 */
42 protected String fileNameToStore;
43
44 public void testBlock(){
45 state.eventOccured(StateStorer.ON_COMMAND_EVENT);
46 }
47
48 /***
49 * Gets the filename to store the state of the application to.
50 * @param event - the StateStorer Event
51 * @return the appropriate filename which starts with ERROR- if the StateStorer Event was an Error
52 */
53 public String getStoreToFileName(int event){
54 return fileNameToStore;
55 }
56
57 }