View Javadoc

1   /*
2    * @(#)$Id: JdomKeyElement.java 689 2009-07-22 00:10:27Z bsigner $
3    *
4    * Author       :   Michele Croci, mcroci@gmail.com
5    *
6    * Purpose      :  XML support for the <key> element.
7    *
8    * -----------------------------------------------------------------------
9    *
10   * Revision Information:
11   *
12   * Date             Who         Reason
13   *
14   * Nov 29, 2007     crocimi     Initial Release
15   *
16   * -----------------------------------------------------------------------
17   *
18   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
19   *
20   * This software is the proprietary information of ETH Zurich.
21   * Use is subject to license terms.
22   * 
23   */
24  
25  
26  package org.ximtec.igesture.geco.xml;
27  
28  import org.jdom.Element;
29  import org.ximtec.igesture.geco.action.KeyboardSimulation;
30  
31  
32  
33  /**
34   * XML support for the <key> element.
35   * 
36   * @version 0.9, Nov 29, 2007
37   * @author Michele Croci, mcroci@gmail.com
38   */
39  public class JdomKeyElement extends Element {
40  
41     private static final String KEY = "key";
42  
43  
44     public JdomKeyElement(KeyboardSimulation action) {
45        this(KEY, action.toString());
46     } // JdomKeyElement
47  
48  
49     public JdomKeyElement(String name, String content) {
50        super(name);
51        this.addContent(content);
52     } // JdomKeyElement
53  
54  }