Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / jigsaw / src / org / w3c / tools / widgets / TextEditable.java
diff --git a/JMCR-Stable/real-world application/jigsaw/src/org/w3c/tools/widgets/TextEditable.java b/JMCR-Stable/real-world application/jigsaw/src/org/w3c/tools/widgets/TextEditable.java
new file mode 100644 (file)
index 0000000..a8b514b
--- /dev/null
@@ -0,0 +1,53 @@
+// TextEditable.java\r
+// $Id: TextEditable.java,v 1.1 2010/06/15 12:20:37 smhuang Exp $\r
+// (c) COPYRIGHT MIT and INRIA, 1997.\r
+// Please first read the full copyright statement in file COPYRIGHT.html\r
+\r
+package org.w3c.tools.widgets;\r
+\r
+import java.awt.event.ActionListener;\r
+\r
+/**\r
+ * Editable interface\r
+ * @author Benoit Mahe <bmahe@sophia.inria.fr>\r
+ */\r
+\r
+public interface TextEditable {\r
+\r
+  /**\r
+   * Sets the text that is presented by this interface to be the specified \r
+   * text. \r
+   * @param text - the new text\r
+   */\r
+  public void setText(String text);\r
+\r
+  /**\r
+   * Gets the text that is presented by this interface.\r
+   */\r
+  public String getText();\r
+\r
+  /**\r
+   * Check if the current text value and the default value are different.\r
+   */\r
+  public boolean updated();\r
+\r
+  /**\r
+   * Sets the text at its default value\r
+   */\r
+  public void setDefault();\r
+\r
+  /**\r
+   * Adds the specified action listener to recieve action events from \r
+   * this interface. \r
+   * @param al - the action listener.\r
+   */\r
+  public void addActionListener(ActionListener al);\r
+\r
+  /**\r
+   * Removes the specified action listener so that it no longer receives \r
+   * action events from interface. \r
+   * @param al - the action listener.\r
+   */\r
+  public void removeActionListener(ActionListener al);\r
+\r
+}\r