1 /*
2 * @(#)$Id: JdomDeviceElement.java 605 2008-11-10 22:20:28Z bsigner $
3 *
4 * Author : Michele Croci, mcroci@gmail.com
5 *
6 * Purpose : XML support for the <device> element.
7 *
8 * -----------------------------------------------------------------------
9 *
10 * Revision Information:
11 *
12 * Date Who Reason
13 *
14 * Jan 15, 2008 crocimi Initial Release
15 *
16 * -----------------------------------------------------------------------
17 *
18 * Copyright 1999-2007 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
30
31
32
33 /**
34 * XML support for the <device> element.
35 *
36 * @version 0.9, Jan 15, 2008
37 * @author Michele Croci, mcroci@gmail.com
38 */
39 public class JdomDeviceElement extends Element {
40
41 private static final String COMMAND = "device";
42
43 private static final String NAME = "name";
44
45 private static final String SELECTED = "selected";
46
47
48
49 public JdomDeviceElement(String device, boolean selected) {
50 this(COMMAND, device, selected);
51 } // JdomDeviceElement
52
53
54 public JdomDeviceElement(String name, String device, boolean selected) {
55 super(name);
56 this.setAttribute(NAME, device);
57 this.setAttribute(SELECTED, String.valueOf(selected));
58 } // JdomDeviceElement
59
60 }