01: // AttributeEditorInterface.java
02: // $Id: AttributeEditorInterface.java,v 1.13 2000/08/16 21:37:26 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1997.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.jigadm.editors;
07:
08: import java.util.Properties;
09: import org.w3c.jigadm.RemoteResourceWrapper;
10:
11: import org.w3c.jigadm.events.AttributeListener;
12:
13: import org.w3c.jigsaw.admin.RemoteAccessException;
14:
15: import org.w3c.tools.resources.Attribute;
16:
17: public interface AttributeEditorInterface {
18:
19: /**
20: * Tells if the edited value has changed
21: * @return true if the value changed.
22: */
23:
24: public boolean hasChanged();
25:
26: /**
27: * set the current value to be the original value, ie: changed
28: * must return <strong>false</strong> after a reset.
29: */
30:
31: public void clearChanged();
32:
33: /**
34: * reset the changes (if any)
35: */
36:
37: public void resetChanges();
38:
39: /**
40: * Get the current value of the edited value
41: * @return an object or <strong>null</strong> if the object was not
42: * initialized
43: */
44:
45: public Object getValue();
46:
47: /**
48: * Set the value of the edited value
49: * @param o the new value.
50: */
51:
52: public void setValue(Object o);
53:
54: /**
55: * Add a Listener to this editor.
56: * @param el a listener
57: */
58:
59: public void addAttributeListener(AttributeListener el);
60:
61: /**
62: * Remove the listener from this editor.
63: * @param el the listener to be removed.
64: */
65:
66: public void removeAttributeListener(AttributeListener el);
67:
68: /**
69: * Initialize the editor
70: * @param w the ResourceWrapper father of the attribute
71: * @param a the Attribute we are editing
72: * @param o the value of the above attribute
73: * @param p some Properties, used to fine-tune the editor
74: * @exception RemoteAccessException if a remote access error occurs.
75: */
76:
77: public void initialize(RemoteResourceWrapper w, Attribute a,
78: Object o, Properties p) throws RemoteAccessException;
79:
80: }
|