01: package com.xoetrope.svgscanner.model;
02:
03: import net.xoetrope.xml.XmlElement;
04: import net.xoetrope.xui.XPage;
05:
06: /**
07: *
08: * <p> Copyright (c) Xoetrope Ltd., 2001-2007, This software is licensed under
09: * the GNU Public License (GPL), please see license.txt for more details. If
10: * you make commercial use of this software you must purchase a commercial
11: * license from Xoetrope.</p>
12: * <p>$Revision: 1.7 $</p>
13: */
14: public abstract class SynthElementHandler {
15: protected XmlElement objectElement;
16:
17: /** Creates a new instance of StyleElement */
18: public SynthElementHandler() {
19: }
20:
21: public String getName(XmlElement e) {
22: return e.getName();
23: }
24:
25: /**
26: * Update the panel showing details of this type of element.
27: * @param page the page with the UI for this component
28: */
29: public abstract void updateUI(XPage page);
30:
31: /**
32: * Update the object being edited
33: * @param e the source data element
34: */
35: public void setObject(XmlElement e) {
36: objectElement = e;
37: }
38:
39: /**
40: * Set the attribute value
41: * @param id the attribute id to modify
42: * @param value the new value
43: */
44: public void setAttribute(String id, String value) {
45: objectElement.setAttribute(id, value);
46: }
47: }
|