You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by mp...@apache.org on 2004/04/22 08:57:07 UTC
cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel Widget.java
mpo 2004/04/21 23:57:07
Modified: src/blocks/forms/java/org/apache/cocoon/forms/formmodel
Widget.java
Log:
Some Javadoc clarifications.
Revision Changes Path
1.6 +13 -9 cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Widget.java
Index: Widget.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Widget.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Widget.java 21 Apr 2004 13:33:37 -0000 1.5
+++ Widget.java 22 Apr 2004 06:57:07 -0000 1.6
@@ -59,17 +59,18 @@
public interface Widget {
/**
- * Gets the source location of this widget.
+ * @return the source location of this widget.
*/
public String getLocation();
/**
- * Returns the id of this widget.
+ * @return the id of this widget. This should never be <code>null</code>
+ * Top-level container widgets (like 'form') should return <code>""</code>
*/
public String getId();
/**
- * Gets the parent of this widget. If this widget is the root widget,
+ * @return the parent of this widget. If this widget is the root widget,
* this method returns null.
*/
public Widget getParent();
@@ -82,7 +83,7 @@
public void setParent(Widget widget);
/**
- * Get the {@link Form} to which this widget belongs. The form is the top-most ancestor
+ * @return the {@link Form} to which this widget belongs. The form is the top-most ancestor
* of the widget.
*/
public Form getForm();
@@ -96,7 +97,7 @@
// public String getNamespace();
/**
- * Returns the id prefixed with the namespace, this name should be unique
+ * @return the id prefixed with the namespace, this name should be unique
* accross all widgets on the form.
*/
public String getFullyQualifiedId();
@@ -112,6 +113,9 @@
* Validates this widget and returns the outcome. Possible error messages are
* remembered by the widget itself and will be part of the XML produced by
* this widget in its {@link #generateSaxFragment(ContentHandler, Locale)} method.
+ *
+ * @return <code>true</code> to indicate all validations were ok,
+ * <code>false</code> otherwise
*/
public boolean validate(FormContext formContext);
@@ -129,7 +133,7 @@
public void generateLabel(ContentHandler contentHandler) throws SAXException;
/**
- * Returns the value of the widget. For some widgets (notably ContainerWidgets)
+ * @return the value of the widget. For some widgets (notably ContainerWidgets)
* this may not make sense, those should then simply return null here.
*/
public Object getValue();
@@ -141,8 +145,8 @@
public void setValue(Object object);
/**
- * Returns wether this widget is required to be filled in. As with {@link #getValue()}, for some
- * widgets this may not make sense, those should return false here.
+ * @return whether this widget is required to be filled in. As with {@link #getValue()},
+ * for some widgets this may not make sense, those should return false here.
*/
public boolean isRequired();