01: // TextEditable.java
02: // $Id: TextEditable.java,v 1.5 2000/08/16 21:37:57 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.tools.widgets;
07:
08: import java.awt.event.ActionListener;
09:
10: /**
11: * Editable interface
12: * @author Benoit Mahe <bmahe@sophia.inria.fr>
13: */
14:
15: public interface TextEditable {
16:
17: /**
18: * Sets the text that is presented by this interface to be the specified
19: * text.
20: * @param text - the new text
21: */
22: public void setText(String text);
23:
24: /**
25: * Gets the text that is presented by this interface.
26: */
27: public String getText();
28:
29: /**
30: * Check if the current text value and the default value are different.
31: */
32: public boolean updated();
33:
34: /**
35: * Sets the text at its default value
36: */
37: public void setDefault();
38:
39: /**
40: * Adds the specified action listener to recieve action events from
41: * this interface.
42: * @param al - the action listener.
43: */
44: public void addActionListener(ActionListener al);
45:
46: /**
47: * Removes the specified action listener so that it no longer receives
48: * action events from interface.
49: * @param al - the action listener.
50: */
51: public void removeActionListener(ActionListener al);
52:
53: }
|