javadoc polish

This commit is contained in:
Keith Donald 2009-07-24 19:40:11 +00:00
parent bbe4c2b611
commit a7465c1475
4 changed files with 27 additions and 7 deletions

View File

@ -15,16 +15,34 @@
*/ */
package org.springframework.ui.binding.config; package org.springframework.ui.binding.config;
import org.springframework.ui.binding.FieldModel;
/**
* A FieldModel condition.
* @author Keith Donald
* @see FieldModel#isEnabled()
* @see FieldModel#isEditable()
* @see FieldModel#isVisible()
*/
public interface Condition { public interface Condition {
/**
* Is the condition true or false?
*/
boolean isTrue(); boolean isTrue();
/**
* The condition is always true.
*/
static final Condition ALWAYS_TRUE = new Condition() { static final Condition ALWAYS_TRUE = new Condition() {
public boolean isTrue() { public boolean isTrue() {
return true; return true;
} }
}; };
/**
* The condition is always false.
*/
static final Condition ALWAYS_FALSE = new Condition() { static final Condition ALWAYS_FALSE = new Condition() {
public boolean isTrue() { public boolean isTrue() {
return false; return false;

View File

@ -15,11 +15,13 @@
*/ */
package org.springframework.ui.binding.config; package org.springframework.ui.binding.config;
import org.springframework.ui.binding.FieldModel;
import org.springframework.ui.format.Formatter; import org.springframework.ui.format.Formatter;
/** /**
* A fluent interface for configuring a newly added field model. * A fluent interface for configuring a {@link FieldModel}.
* @author Keith Donald * @author Keith Donald
* @since 3.0
*/ */
public interface FieldModelConfiguration { public interface FieldModelConfiguration {

View File

@ -102,12 +102,12 @@ public class DefaultPresentationModel implements PresentationModel {
} }
/** /**
* Add a FieldModel rule at the domain object property path. * Add a FieldModel configuration at the path specified.
* @param propertyPath the domain object property path in format <prop>[.nestedProp] * @param fieldPath the domain object property path in format <prop>[.nestedProp]
* @return a builder for the field model configuration * @return a builder for the {@link FieldModel} configuration
*/ */
public FieldModelConfiguration field(String propertyPath) { public FieldModelConfiguration field(String fieldPath) {
FieldPath path = new FieldPath(propertyPath); FieldPath path = new FieldPath(fieldPath);
PropertyFieldModelRule rule = getRule(path.getFirstElement().getValue()); PropertyFieldModelRule rule = getRule(path.getFirstElement().getValue());
for (FieldPathElement element : path.getNestedElements()) { for (FieldPathElement element : path.getNestedElements()) {
rule = rule.getNestedRule(element.getValue()); rule = rule.getNestedRule(element.getValue());

View File

@ -1,7 +1,7 @@
<html> <html>
<body> <body>
<p> <p>
Default implementation of a PresentationModel usable in any environment. Default implementation of a PresentationModel usable in most environments.
</p> </p>
</body> </body>
</html> </html>