Package io.imunity.webconsole.attribute
Class AttributeFieldWithEdit
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractField<T>
-
- com.vaadin.ui.CustomField<pl.edu.icm.unity.types.basic.Attribute>
-
- io.imunity.webconsole.attribute.AttributeFieldWithEdit
-
- All Implemented Interfaces:
com.vaadin.data.HasValue<pl.edu.icm.unity.types.basic.Attribute>,com.vaadin.event.ContextClickEvent.ContextClickNotifier,com.vaadin.event.MethodEventSource,com.vaadin.server.ClientConnector,com.vaadin.server.Sizeable,com.vaadin.shared.Connector,com.vaadin.ui.Component,com.vaadin.ui.Component.Focusable,com.vaadin.ui.HasComponents,java.io.Serializable,java.lang.Iterable<com.vaadin.ui.Component>
public class AttributeFieldWithEdit extends com.vaadin.ui.CustomField<pl.edu.icm.unity.types.basic.Attribute>Custom component displaying a simple, textual attribute and its values, additionally allowing to edit the attribute after clicking an edit button.- Author:
- K. Benedyczak
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
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.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
-
-
Field Summary
Fields Modifier and Type Field Description protected pl.edu.icm.unity.webui.common.attributes.AttributeHandlerRegistryattrHandlerRegistryprotected java.util.Collection<pl.edu.icm.unity.types.basic.AttributeType>attributeTypesprotected java.lang.Stringgroup
-
Constructor Summary
Constructors Constructor Description AttributeFieldWithEdit(pl.edu.icm.unity.MessageSource msg, java.lang.String caption, pl.edu.icm.unity.webui.common.attributes.AttributeHandlerRegistry attrHandlerRegistry, java.util.Collection<pl.edu.icm.unity.types.basic.AttributeType> attributeTypes, java.lang.String group, pl.edu.icm.unity.types.basic.Attribute initial, boolean valuesRequired)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoSetValue(pl.edu.icm.unity.types.basic.Attribute value)pl.edu.icm.unity.types.basic.AttributegetAttribute()pl.edu.icm.unity.types.basic.AttributegetValue()protected com.vaadin.ui.ComponentinitContent()voidsetAttribute(pl.edu.icm.unity.types.basic.Attribute attribute)Sets an attribute to be editedvoidsetError(com.vaadin.server.ErrorMessage message)voidsetFixedType(pl.edu.icm.unity.types.basic.AttributeType attributeType)After call the class will allow to edit only the selected attribute type-
Methods inherited from class com.vaadin.ui.CustomField
attach, focus, getContent, getState, getState, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractField
addValueChangeListener, createValueChange, getCustomAttributes, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, readDesign, setReadOnly, setRequiredIndicatorVisible, setValue, setValue, writeDesign
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, 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, 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, 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
-
-
-
-
Constructor Detail
-
AttributeFieldWithEdit
public AttributeFieldWithEdit(pl.edu.icm.unity.MessageSource msg, java.lang.String caption, pl.edu.icm.unity.webui.common.attributes.AttributeHandlerRegistry attrHandlerRegistry, java.util.Collection<pl.edu.icm.unity.types.basic.AttributeType> attributeTypes, java.lang.String group, pl.edu.icm.unity.types.basic.Attribute initial, boolean valuesRequired)
-
-
Method Detail
-
initContent
protected com.vaadin.ui.Component initContent()
- Specified by:
initContentin classcom.vaadin.ui.CustomField<pl.edu.icm.unity.types.basic.Attribute>
-
getAttribute
public pl.edu.icm.unity.types.basic.Attribute getAttribute() throws pl.edu.icm.unity.webui.common.FormValidationException- Throws:
pl.edu.icm.unity.webui.common.FormValidationException
-
setAttribute
public void setAttribute(pl.edu.icm.unity.types.basic.Attribute attribute)
Sets an attribute to be edited- Parameters:
attribute-
-
setFixedType
public void setFixedType(pl.edu.icm.unity.types.basic.AttributeType attributeType)
After call the class will allow to edit only the selected attribute type- Parameters:
attributeType-
-
setError
public void setError(com.vaadin.server.ErrorMessage message)
-
getValue
public pl.edu.icm.unity.types.basic.Attribute getValue()
-
doSetValue
protected void doSetValue(pl.edu.icm.unity.types.basic.Attribute value)
- Specified by:
doSetValuein classcom.vaadin.ui.AbstractField<pl.edu.icm.unity.types.basic.Attribute>
-
-