diff options
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/AbstractFieldState.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/AbstractFieldState.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/AbstractFieldState.java b/src/com/vaadin/terminal/gwt/client/AbstractFieldState.java new file mode 100644 index 0000000000..20d96c9aee --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/AbstractFieldState.java @@ -0,0 +1,37 @@ +package com.vaadin.terminal.gwt.client; + +import com.vaadin.ui.AbstractField; + +/** + * Shared state for {@link AbstractField}. + * + * @author Vaadin Ltd + * @version @VERSION@ + * @since 7.0.0 + * + */ +public class AbstractFieldState extends ComponentState { + private boolean propertyReadOnly = false; + + /** + * Checks if the property data source for the Field is in read only mode. + * This affects the read only state of the field itself. + * + * @return true if there is a property data source and it is set to read + * only, false otherwise + */ + public boolean isPropertyReadOnly() { + return propertyReadOnly; + } + + /** + * Sets the read only state of the property data source. + * + * @param propertyReadOnly + * true if the property data source if read only, false otherwise + */ + public void setPropertyReadOnly(boolean propertyReadOnly) { + this.propertyReadOnly = propertyReadOnly; + } + +} |