Class TableTextFieldWrapper

  • All Implemented Interfaces:
    com.vaadin.event.ContextClickEvent.ContextClickNotifier, com.vaadin.event.LayoutEvents.LayoutClickNotifier, com.vaadin.event.MethodEventSource, com.vaadin.event.SerializableEventListener, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.Component.Focusable, com.vaadin.ui.ComponentContainer, com.vaadin.ui.HasComponents, com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.Layout, com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler, com.vaadin.v7.data.Buffered, com.vaadin.v7.data.BufferedValidatable, com.vaadin.v7.data.Property<String>, com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer, com.vaadin.v7.data.Validatable, com.vaadin.v7.ui.Field<String>, Serializable, Iterable<com.vaadin.ui.Component>, EventListener

    public class TableTextFieldWrapper
    extends com.vaadin.v7.ui.HorizontalLayout
    implements com.vaadin.v7.ui.Field<String>
    This class wraps a TextField so it is laid out correctly inside a editable Table. Because by default a TextField inside an editable table does not show any error indicator on a failed validation. The Vertical- or HorizontalLayout does show an error indicator, so we wrap the layout around the text field.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.vaadin.v7.data.Buffered

        com.vaadin.v7.data.Buffered.SourceException
      • Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

        com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
      • Nested classes/interfaces inherited from interface com.vaadin.ui.Component

        com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
      • Nested classes/interfaces inherited from interface com.vaadin.v7.ui.Field

        com.vaadin.v7.ui.Field.ValueChangeEvent
      • Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents

        com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
      • Nested classes/interfaces inherited from interface com.vaadin.ui.Layout

        com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler
      • Nested classes/interfaces inherited from interface com.vaadin.v7.data.Property

        com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T extends Object>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
      • Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable

        com.vaadin.server.Sizeable.Unit
    • Field Summary

      • Fields inherited from class com.vaadin.ui.AbstractOrderedLayout

        ALIGNMENT_DEFAULT, components
      • Fields inherited from class com.vaadin.ui.AbstractComponent

        DESIGN_ATTR_PLAIN_TEXT
      • Fields inherited from interface com.vaadin.server.Sizeable

        SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
    • Constructor Summary

      Constructors 
      Constructor Description
      TableTextFieldWrapper​(com.vaadin.v7.ui.TextField field)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)  
      void addValidator​(com.vaadin.v7.data.Validator validator)  
      void addValueChangeListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)  
      void clear()  
      void commit()  
      void discard()  
      void focus()  
      com.vaadin.server.ErrorMessage getComponentError()  
      Object getData()  
      com.vaadin.v7.data.Property getPropertyDataSource()  
      String getRequiredError()  
      int getTabIndex()  
      Class<String> getType()  
      Collection<com.vaadin.v7.data.Validator> getValidators()  
      String getValue()  
      boolean isBuffered()  
      boolean isEmpty()  
      boolean isInvalidAllowed()  
      boolean isInvalidCommitted()  
      boolean isModified()  
      boolean isReadOnly()  
      boolean isRequired()  
      boolean isValid()  
      void removeAllValidators()  
      void removeListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)  
      void removeValidator​(com.vaadin.v7.data.Validator validator)  
      void removeValueChangeListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)  
      void setBuffered​(boolean readThrough)  
      void setComponentError​(com.vaadin.server.ErrorMessage componentError)  
      void setData​(Object data)  
      void setInvalidAllowed​(boolean invalidValueAllowed)  
      void setInvalidCommitted​(boolean isCommitted)  
      void setPropertyDataSource​(com.vaadin.v7.data.Property newDataSource)  
      void setReadOnly​(boolean b)  
      void setRequired​(boolean required)  
      void setRequiredError​(String requiredMessage)  
      void setTabIndex​(int tabIndex)  
      void setValue​(String newValue)  
      void validate()  
      void valueChange​(com.vaadin.v7.data.Property.ValueChangeEvent valueChangeEvent)  
      • Methods inherited from class com.vaadin.ui.HorizontalLayout

        addComponentsAndExpand, getState, getState
      • Methods inherited from class com.vaadin.ui.AbstractOrderedLayout

        addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getCustomAttributes, getDefaultComponentAlignment, getExpandRatio, getMargin, isSpacing, iterator, readDesign, removeComponent, removeLayoutClickListener, replaceComponent, setComponentAlignment, setDefaultComponentAlignment, setExpandRatio, setMargin, setMargin, setSpacing, writeDesign
      • Methods inherited from class com.vaadin.ui.AbstractLayout

        readMargin, writeMargin
      • Methods inherited from class com.vaadin.ui.AbstractComponentContainer

        addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth
      • Methods inherited from class com.vaadin.ui.AbstractComponent

        addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
      • Methods inherited from class com.vaadin.server.AbstractClientConnector

        addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
      • Methods inherited from interface com.vaadin.server.ClientConnector

        addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
      • Methods inherited from interface com.vaadin.ui.Component

        addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesign
      • Methods inherited from interface com.vaadin.ui.ComponentContainer

        addComponents, getComponentIterator, moveComponentsFrom, removeAllComponents
      • Methods inherited from interface com.vaadin.shared.Connector

        getConnectorId
      • Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier

        addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
      • Methods inherited from interface com.vaadin.server.Sizeable

        getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
    • Constructor Detail

      • TableTextFieldWrapper

        public TableTextFieldWrapper​(com.vaadin.v7.ui.TextField field)
    • Method Detail

      • isInvalidCommitted

        public boolean isInvalidCommitted()
        Specified by:
        isInvalidCommitted in interface com.vaadin.v7.data.BufferedValidatable
      • setInvalidCommitted

        public void setInvalidCommitted​(boolean isCommitted)
        Specified by:
        setInvalidCommitted in interface com.vaadin.v7.data.BufferedValidatable
      • commit

        public void commit()
                    throws com.vaadin.v7.data.Buffered.SourceException,
                           com.vaadin.v7.data.Validator.InvalidValueException
        Specified by:
        commit in interface com.vaadin.v7.data.Buffered
        Throws:
        com.vaadin.v7.data.Buffered.SourceException
        com.vaadin.v7.data.Validator.InvalidValueException
      • discard

        public void discard()
                     throws com.vaadin.v7.data.Buffered.SourceException
        Specified by:
        discard in interface com.vaadin.v7.data.Buffered
        Throws:
        com.vaadin.v7.data.Buffered.SourceException
      • isBuffered

        public boolean isBuffered()
        Specified by:
        isBuffered in interface com.vaadin.v7.data.Buffered
      • setBuffered

        public void setBuffered​(boolean readThrough)
                         throws com.vaadin.v7.data.Buffered.SourceException
        Specified by:
        setBuffered in interface com.vaadin.v7.data.Buffered
        Throws:
        com.vaadin.v7.data.Buffered.SourceException
      • isModified

        public boolean isModified()
        Specified by:
        isModified in interface com.vaadin.v7.data.Buffered
      • addValidator

        public void addValidator​(com.vaadin.v7.data.Validator validator)
        Specified by:
        addValidator in interface com.vaadin.v7.data.Validatable
      • removeValidator

        public void removeValidator​(com.vaadin.v7.data.Validator validator)
        Specified by:
        removeValidator in interface com.vaadin.v7.data.Validatable
      • removeAllValidators

        public void removeAllValidators()
        Specified by:
        removeAllValidators in interface com.vaadin.v7.data.Validatable
      • getValidators

        public Collection<com.vaadin.v7.data.Validator> getValidators()
        Specified by:
        getValidators in interface com.vaadin.v7.data.Validatable
      • isValid

        public boolean isValid()
        Specified by:
        isValid in interface com.vaadin.v7.data.Validatable
      • validate

        public void validate()
                      throws com.vaadin.v7.data.Validator.InvalidValueException
        Specified by:
        validate in interface com.vaadin.v7.data.Validatable
        Throws:
        com.vaadin.v7.data.Validator.InvalidValueException
      • isInvalidAllowed

        public boolean isInvalidAllowed()
        Specified by:
        isInvalidAllowed in interface com.vaadin.v7.data.Validatable
      • getValue

        public String getValue()
        Specified by:
        getValue in interface com.vaadin.v7.data.Property<String>
      • setValue

        public void setValue​(String newValue)
                      throws com.vaadin.v7.data.Property.ReadOnlyException
        Specified by:
        setValue in interface com.vaadin.v7.data.Property<String>
        Throws:
        com.vaadin.v7.data.Property.ReadOnlyException
      • getType

        public Class<String> getType()
        Specified by:
        getType in interface com.vaadin.v7.data.Property<String>
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in interface com.vaadin.v7.data.Property<String>
        Overrides:
        isReadOnly in class com.vaadin.ui.AbstractComponent
      • setReadOnly

        public void setReadOnly​(boolean b)
        Specified by:
        setReadOnly in interface com.vaadin.v7.data.Property<String>
        Overrides:
        setReadOnly in class com.vaadin.ui.AbstractComponent
      • addListener

        public void addListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)
        Specified by:
        addListener in interface com.vaadin.v7.data.Property.ValueChangeNotifier
      • addValueChangeListener

        public void addValueChangeListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)
        Specified by:
        addValueChangeListener in interface com.vaadin.v7.data.Property.ValueChangeNotifier
      • removeListener

        public void removeListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)
        Specified by:
        removeListener in interface com.vaadin.v7.data.Property.ValueChangeNotifier
      • removeValueChangeListener

        public void removeValueChangeListener​(com.vaadin.v7.data.Property.ValueChangeListener listener)
        Specified by:
        removeValueChangeListener in interface com.vaadin.v7.data.Property.ValueChangeNotifier
      • valueChange

        public void valueChange​(com.vaadin.v7.data.Property.ValueChangeEvent valueChangeEvent)
        Specified by:
        valueChange in interface com.vaadin.v7.data.Property.ValueChangeListener
      • setPropertyDataSource

        public void setPropertyDataSource​(com.vaadin.v7.data.Property newDataSource)
        Specified by:
        setPropertyDataSource in interface com.vaadin.v7.data.Property.Viewer
      • getPropertyDataSource

        public com.vaadin.v7.data.Property getPropertyDataSource()
        Specified by:
        getPropertyDataSource in interface com.vaadin.v7.data.Property.Viewer
      • getTabIndex

        public int getTabIndex()
        Specified by:
        getTabIndex in interface com.vaadin.ui.Component.Focusable
      • setTabIndex

        public void setTabIndex​(int tabIndex)
        Specified by:
        setTabIndex in interface com.vaadin.ui.Component.Focusable
      • isRequired

        public boolean isRequired()
        Specified by:
        isRequired in interface com.vaadin.v7.ui.Field<String>
      • setRequired

        public void setRequired​(boolean required)
        Specified by:
        setRequired in interface com.vaadin.v7.ui.Field<String>
      • setRequiredError

        public void setRequiredError​(String requiredMessage)
        Specified by:
        setRequiredError in interface com.vaadin.v7.ui.Field<String>
      • getRequiredError

        public String getRequiredError()
        Specified by:
        getRequiredError in interface com.vaadin.v7.ui.Field<String>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface com.vaadin.v7.ui.Field<String>
      • clear

        public void clear()
        Specified by:
        clear in interface com.vaadin.v7.ui.Field<String>
      • focus

        public void focus()
        Specified by:
        focus in interface com.vaadin.ui.Component.Focusable
        Overrides:
        focus in class com.vaadin.ui.AbstractComponent
      • setData

        public void setData​(Object data)
        Overrides:
        setData in class com.vaadin.ui.AbstractComponent
      • getData

        public Object getData()
        Overrides:
        getData in class com.vaadin.ui.AbstractComponent
      • setComponentError

        public void setComponentError​(com.vaadin.server.ErrorMessage componentError)
        Overrides:
        setComponentError in class com.vaadin.ui.AbstractComponent
      • getComponentError

        public com.vaadin.server.ErrorMessage getComponentError()
        Overrides:
        getComponentError in class com.vaadin.ui.AbstractComponent