Package org.dellroad.stuff.vaadin7
Class FieldLayout<T>
-
- Type Parameters:
T- field type
- All Implemented Interfaces:
Buffered,BufferedValidatable,Property<T>,Property.Editor,Property.ValueChangeListener,Property.ValueChangeNotifier,Property.Viewer,Validatable,ContextClickEvent.ContextClickNotifier,LayoutEvents.LayoutClickNotifier,MethodEventSource,ClientConnector,Sizeable,Connector,Component,Component.Focusable,ComponentContainer,Field<T>,HasComponents,HasComponents.ComponentAttachDetachNotifier,Layout,Layout.AlignmentHandler,Layout.MarginHandler,Layout.SpacingHandler,Serializable,Iterable<Component>
public class FieldLayout<T> extends HorizontalLayout implements Field<T>
AHorizontalLayoutthat also exposes an internally wrappedField. This is useful when you have an existingFieldand want to display it differently and/or with additionalComponents but still need it to function as aFieldfrom a data perspective.The layout is initially empty; use
HorizontalLayout.addComponent()to add content.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
Buffered.SourceException
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
Field.ValueChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
Layout.AlignmentHandler, Layout.MarginHandler, Layout.SpacingHandler
-
Nested classes/interfaces inherited from interface com.vaadin.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T extends Object>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
Fields Modifier and Type Field Description protected Field<T>field-
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 FieldLayout(Field<T> field)Constructor.
-
Method Summary
-
Methods inherited from class com.vaadin.ui.HorizontalLayout
getState
-
Methods inherited from class com.vaadin.ui.AbstractOrderedLayout
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, addListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getCustomAttributes, getDefaultComponentAlignment, getExpandRatio, getMargin, getState, isSpacing, iterator, readDesign, removeComponent, removeLayoutClickListener, removeListener, 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, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, 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, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
-
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, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.ui.ComponentContainer
addComponents, addListener, addListener, getComponentIterator, moveComponentsFrom, removeAllComponents, removeListener, removeListener
-
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 java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
-
-
-
-
Method Detail
-
getRequiredError
public String getRequiredError()
- Specified by:
getRequiredErrorin interfaceField<T>
-
setRequiredError
public void setRequiredError(String requiredError)
- Specified by:
setRequiredErrorin interfaceField<T>
-
isRequired
public boolean isRequired()
- Specified by:
isRequiredin interfaceField<T>
-
setRequired
public void setRequired(boolean required)
- Specified by:
setRequiredin interfaceField<T>
-
focus
public void focus()
- Specified by:
focusin interfaceComponent.Focusable- Overrides:
focusin classAbstractComponent
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndexin interfaceComponent.Focusable
-
setTabIndex
public void setTabIndex(int index)
- Specified by:
setTabIndexin interfaceComponent.Focusable
-
isInvalidCommitted
public boolean isInvalidCommitted()
- Specified by:
isInvalidCommittedin interfaceBufferedValidatable
-
setInvalidCommitted
public void setInvalidCommitted(boolean invalidCommitted)
- Specified by:
setInvalidCommittedin interfaceBufferedValidatable
-
commit
public void commit() throws Buffered.SourceException- Specified by:
commitin interfaceBuffered- Throws:
Buffered.SourceException
-
discard
public void discard() throws Buffered.SourceException- Specified by:
discardin interfaceBuffered- Throws:
Buffered.SourceException
-
setBuffered
public void setBuffered(boolean buffered)
- Specified by:
setBufferedin interfaceBuffered
-
isBuffered
public boolean isBuffered()
- Specified by:
isBufferedin interfaceBuffered
-
isModified
public boolean isModified()
- Specified by:
isModifiedin interfaceBuffered
-
addValidator
public void addValidator(Validator validator)
- Specified by:
addValidatorin interfaceValidatable
-
removeValidator
public void removeValidator(Validator validator)
- Specified by:
removeValidatorin interfaceValidatable
-
removeAllValidators
public void removeAllValidators()
- Specified by:
removeAllValidatorsin interfaceValidatable
-
getValidators
public Collection<Validator> getValidators()
- Specified by:
getValidatorsin interfaceValidatable
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceValidatable
-
validate
public void validate() throws Validator.InvalidValueException- Specified by:
validatein interfaceValidatable- Throws:
Validator.InvalidValueException
-
isInvalidAllowed
public boolean isInvalidAllowed()
- Specified by:
isInvalidAllowedin interfaceValidatable
-
setInvalidAllowed
public void setInvalidAllowed(boolean invalidAllowed)
- Specified by:
setInvalidAllowedin interfaceValidatable
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin interfaceComponent- Specified by:
isReadOnlyin interfaceProperty<T>- Overrides:
isReadOnlyin classAbstractComponent
-
setReadOnly
public void setReadOnly(boolean readOnly)
- Specified by:
setReadOnlyin interfaceComponent- Specified by:
setReadOnlyin interfaceProperty<T>- Overrides:
setReadOnlyin classAbstractComponent
-
addValueChangeListener
public void addValueChangeListener(Property.ValueChangeListener listener)
- Specified by:
addValueChangeListenerin interfaceProperty.ValueChangeNotifier
-
removeValueChangeListener
public void removeValueChangeListener(Property.ValueChangeListener listener)
- Specified by:
removeValueChangeListenerin interfaceProperty.ValueChangeNotifier
-
addListener
public void addListener(Property.ValueChangeListener listener)
- Specified by:
addListenerin interfaceProperty.ValueChangeNotifier
-
removeListener
public void removeListener(Property.ValueChangeListener listener)
- Specified by:
removeListenerin interfaceProperty.ValueChangeNotifier
-
valueChange
public void valueChange(Property.ValueChangeEvent event)
- Specified by:
valueChangein interfaceProperty.ValueChangeListener
-
setPropertyDataSource
public void setPropertyDataSource(Property newDataSource)
- Specified by:
setPropertyDataSourcein interfaceProperty.Viewer
-
getPropertyDataSource
public Property getPropertyDataSource()
- Specified by:
getPropertyDataSourcein interfaceProperty.Viewer
-
-