Class TableTextFieldWrapper
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractComponentContainer
-
- com.vaadin.ui.AbstractLayout
-
- com.vaadin.ui.AbstractOrderedLayout
-
- com.vaadin.ui.HorizontalLayout
-
- com.vaadin.v7.ui.HorizontalLayout
-
- org.opennms.features.vaadin.jmxconfiggenerator.ui.mbeans.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<java.lang.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<java.lang.String>
,java.io.Serializable
,java.lang.Iterable<com.vaadin.ui.Component>
,java.util.EventListener
public class TableTextFieldWrapper extends com.vaadin.v7.ui.HorizontalLayout implements com.vaadin.v7.ui.Field<java.lang.String>
This class wraps aTextField
so it is laid out correctly inside a editable Table. Because by default aTextField
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 java.lang.Object>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewer
-
-
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()
java.lang.Object
getData()
com.vaadin.v7.data.Property
getPropertyDataSource()
java.lang.String
getRequiredError()
int
getTabIndex()
java.lang.Class<java.lang.String>
getType()
java.util.Collection<com.vaadin.v7.data.Validator>
getValidators()
java.lang.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(java.lang.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(java.lang.String requiredMessage)
void
setTabIndex(int tabIndex)
void
setValue(java.lang.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.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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
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
-
-
-
-
Method Detail
-
isInvalidCommitted
public boolean isInvalidCommitted()
- Specified by:
isInvalidCommitted
in interfacecom.vaadin.v7.data.BufferedValidatable
-
setInvalidCommitted
public void setInvalidCommitted(boolean isCommitted)
- Specified by:
setInvalidCommitted
in interfacecom.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 interfacecom.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 interfacecom.vaadin.v7.data.Buffered
- Throws:
com.vaadin.v7.data.Buffered.SourceException
-
isBuffered
public boolean isBuffered()
- Specified by:
isBuffered
in interfacecom.vaadin.v7.data.Buffered
-
setBuffered
public void setBuffered(boolean readThrough) throws com.vaadin.v7.data.Buffered.SourceException
- Specified by:
setBuffered
in interfacecom.vaadin.v7.data.Buffered
- Throws:
com.vaadin.v7.data.Buffered.SourceException
-
isModified
public boolean isModified()
- Specified by:
isModified
in interfacecom.vaadin.v7.data.Buffered
-
addValidator
public void addValidator(com.vaadin.v7.data.Validator validator)
- Specified by:
addValidator
in interfacecom.vaadin.v7.data.Validatable
-
removeValidator
public void removeValidator(com.vaadin.v7.data.Validator validator)
- Specified by:
removeValidator
in interfacecom.vaadin.v7.data.Validatable
-
removeAllValidators
public void removeAllValidators()
- Specified by:
removeAllValidators
in interfacecom.vaadin.v7.data.Validatable
-
getValidators
public java.util.Collection<com.vaadin.v7.data.Validator> getValidators()
- Specified by:
getValidators
in interfacecom.vaadin.v7.data.Validatable
-
isValid
public boolean isValid()
- Specified by:
isValid
in interfacecom.vaadin.v7.data.Validatable
-
validate
public void validate() throws com.vaadin.v7.data.Validator.InvalidValueException
- Specified by:
validate
in interfacecom.vaadin.v7.data.Validatable
- Throws:
com.vaadin.v7.data.Validator.InvalidValueException
-
isInvalidAllowed
public boolean isInvalidAllowed()
- Specified by:
isInvalidAllowed
in interfacecom.vaadin.v7.data.Validatable
-
setInvalidAllowed
public void setInvalidAllowed(boolean invalidValueAllowed) throws java.lang.UnsupportedOperationException
- Specified by:
setInvalidAllowed
in interfacecom.vaadin.v7.data.Validatable
- Throws:
java.lang.UnsupportedOperationException
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfacecom.vaadin.v7.data.Property<java.lang.String>
-
setValue
public void setValue(java.lang.String newValue) throws com.vaadin.v7.data.Property.ReadOnlyException
- Specified by:
setValue
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- Throws:
com.vaadin.v7.data.Property.ReadOnlyException
-
getType
public java.lang.Class<java.lang.String> getType()
- Specified by:
getType
in interfacecom.vaadin.v7.data.Property<java.lang.String>
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- Overrides:
isReadOnly
in classcom.vaadin.ui.AbstractComponent
-
setReadOnly
public void setReadOnly(boolean b)
- Specified by:
setReadOnly
in interfacecom.vaadin.v7.data.Property<java.lang.String>
- Overrides:
setReadOnly
in classcom.vaadin.ui.AbstractComponent
-
addListener
public void addListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
addListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
-
addValueChangeListener
public void addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
addValueChangeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
-
removeListener
public void removeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
removeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
-
removeValueChangeListener
public void removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
- Specified by:
removeValueChangeListener
in interfacecom.vaadin.v7.data.Property.ValueChangeNotifier
-
valueChange
public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent valueChangeEvent)
- Specified by:
valueChange
in interfacecom.vaadin.v7.data.Property.ValueChangeListener
-
setPropertyDataSource
public void setPropertyDataSource(com.vaadin.v7.data.Property newDataSource)
- Specified by:
setPropertyDataSource
in interfacecom.vaadin.v7.data.Property.Viewer
-
getPropertyDataSource
public com.vaadin.v7.data.Property getPropertyDataSource()
- Specified by:
getPropertyDataSource
in interfacecom.vaadin.v7.data.Property.Viewer
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndex
in interfacecom.vaadin.ui.Component.Focusable
-
setTabIndex
public void setTabIndex(int tabIndex)
- Specified by:
setTabIndex
in interfacecom.vaadin.ui.Component.Focusable
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
-
setRequired
public void setRequired(boolean required)
- Specified by:
setRequired
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
-
setRequiredError
public void setRequiredError(java.lang.String requiredMessage)
- Specified by:
setRequiredError
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
-
getRequiredError
public java.lang.String getRequiredError()
- Specified by:
getRequiredError
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
-
clear
public void clear()
- Specified by:
clear
in interfacecom.vaadin.v7.ui.Field<java.lang.String>
-
focus
public void focus()
- Specified by:
focus
in interfacecom.vaadin.ui.Component.Focusable
- Overrides:
focus
in classcom.vaadin.ui.AbstractComponent
-
setData
public void setData(java.lang.Object data)
- Overrides:
setData
in classcom.vaadin.ui.AbstractComponent
-
getData
public java.lang.Object getData()
- Overrides:
getData
in classcom.vaadin.ui.AbstractComponent
-
setComponentError
public void setComponentError(com.vaadin.server.ErrorMessage componentError)
- Overrides:
setComponentError
in classcom.vaadin.ui.AbstractComponent
-
getComponentError
public com.vaadin.server.ErrorMessage getComponentError()
- Overrides:
getComponentError
in classcom.vaadin.ui.AbstractComponent
-
-