com.vaadin.terminal.gwt.client
Class AbstractFieldState

java.lang.Object
  extended by com.vaadin.terminal.gwt.client.communication.SharedState
      extended by com.vaadin.terminal.gwt.client.ComponentState
          extended by com.vaadin.terminal.gwt.client.AbstractFieldState
All Implemented Interfaces:
TabIndexState, Serializable
Direct Known Subclasses:
AbstractTextFieldState, CheckBoxState, FormState

public class AbstractFieldState
extends ComponentState
implements TabIndexState

Shared state for AbstractField.

Since:
7.0.0
Version:
7.0.0.alpha3
Author:
Vaadin Ltd
See Also:
Serialized Form

Constructor Summary
AbstractFieldState()
           
 
Method Summary
 int getTabIndex()
          Gets the tabulator index of the field.
 boolean isHideErrors()
          Returns true if the component will hide any errors even if the error message is set.
 boolean isModified()
          Has the contents of the field been modified, i.e.
 boolean isPropertyReadOnly()
          Checks if the property data source for the Field is in read only mode.
 boolean isRequired()
          Is the field required.
 void setHideErrors(boolean hideErrors)
          Sets whether the component should hide any errors even if the error message is set.
 void setModified(boolean modified)
          Setter for the modified flag, toggled when the contents of the field is modified by the user.
 void setPropertyReadOnly(boolean propertyReadOnly)
          Sets the read only state of the property data source.
 void setRequired(boolean required)
          Sets the field required.
 void setTabIndex(int tabIndex)
          Sets the tabulator index of the field.
 
Methods inherited from class com.vaadin.terminal.gwt.client.ComponentState
addRegisteredEventListener, getCaption, getDebugId, getDescription, getErrorMessage, getHeight, getIcon, getRegisteredEventListeners, getStyles, getWidth, hasDescription, hasStyles, isImmediate, isReadOnly, isUndefinedHeight, isUndefinedWidth, isVisible, removeRegisteredEventListener, setCaption, setDebugId, setDescription, setErrorMessage, setHeight, setIcon, setImmediate, setReadOnly, setRegisteredEventListeners, setStyles, setVisible, setWidth
 
Methods inherited from class com.vaadin.terminal.gwt.client.communication.SharedState
isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFieldState

public AbstractFieldState()
Method Detail

isPropertyReadOnly

public boolean isPropertyReadOnly()
Checks if the property data source for the Field is in read only mode. This affects the read only state of the field itself.

Returns:
true if there is a property data source and it is set to read only, false otherwise

setPropertyReadOnly

public void setPropertyReadOnly(boolean propertyReadOnly)
Sets the read only state of the property data source.

Parameters:
propertyReadOnly - true if the property data source if read only, false otherwise

isHideErrors

public boolean isHideErrors()
Returns true if the component will hide any errors even if the error message is set.

Returns:
true if error messages are disabled

setHideErrors

public void setHideErrors(boolean hideErrors)
Sets whether the component should hide any errors even if the error message is set. This is used e.g. on forms to hide error messages for invalid fields before the first user actions.

Parameters:
hideErrors - true if error messages should be hidden

isRequired

public boolean isRequired()
Is the field required. Required fields must filled by the user. See AbstractField#isRequired() for more information.

Returns:
true if the field is required, otherwise false.

setRequired

public void setRequired(boolean required)
Sets the field required. Required fields must filled by the user. See AbstractField#setRequired(boolean) for more information.

Parameters:
required - Is the field required.

isModified

public boolean isModified()
Has the contents of the field been modified, i.e. has the value been updated after it was read from the data source.

Returns:
true if the field has been modified, false otherwise

setModified

public void setModified(boolean modified)
Setter for the modified flag, toggled when the contents of the field is modified by the user.

Parameters:
modified - the new modified state

getTabIndex

public int getTabIndex()
Description copied from interface: TabIndexState
Gets the tabulator index of the field.

Specified by:
getTabIndex in interface TabIndexState
Returns:
the tab index for the Field

setTabIndex

public void setTabIndex(int tabIndex)
Description copied from interface: TabIndexState
Sets the tabulator index of the field.

Specified by:
setTabIndex in interface TabIndexState
Parameters:
tabIndex - the tab index to set


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.