public class SignatureField extends com.vaadin.ui.CustomField<String>
Field to capture user signatures as data url String.StringToDataUrlConverter that converts the String value to
DataUrl that allows access to the binary contents of the data url.
StringToDataUrlConverter,
DataUrl,
signature_pad,
Serialized Formcom.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEventcom.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenercom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listenercom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListenercom.vaadin.server.Sizeable.Unitcom.vaadin.ui.Field.ValueChangeEventcom.vaadin.data.Buffered.SourceExceptioncom.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer| Constructor and Description |
|---|
SignatureField()
Creates a new SignatureField instance
|
SignatureField(com.vaadin.data.Property<?> dataSource)
Creates a new SignatureField instance with a data source
|
SignatureField(String caption)
Creates a new SignatureField instance with a caption
|
SignatureField(String caption,
com.vaadin.data.Property<?> dataSource)
Creates a new SignatureField instance with a caption and data source
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the field.
|
String |
getBackgroundColor()
Gets the color used to clear the background.
|
protected com.vaadin.ui.Component |
getContent()
Allways returns
null |
protected Collection<String> |
getCustomAttributes() |
Double |
getDotSize()
Gets the radius of a single dot.
|
double |
getMaxWidth()
Gets the maximum width of a line.
|
MimeType |
getMimeType()
Sets the
MimeType of generated images |
double |
getMinWidth()
Gets the minimum width of a line.
|
String |
getPenColor()
Sets the color used to draw the lines.
|
Class<? extends String> |
getType() |
double |
getVelocityFilterWeight()
Gets the velocity filter weight
|
protected com.vaadin.ui.Component |
initContent()
Allways returns
null |
boolean |
isClearButtonEnabled()
Gets the visibility of the clear button
|
boolean |
isEmpty()
Is the field empty?
|
void |
readDesign(org.jsoup.nodes.Element design,
com.vaadin.ui.declarative.DesignContext designContext) |
void |
setBackgroundColor(String backgroundColor)
Sets the color used to clear the background.
|
void |
setClearButtonEnabled(boolean clearButtonEnabled)
Sets the visibility of the clear button
|
void |
setDotSize(Double dotSize)
Sets the radius of a single dot.
|
void |
setImmediate(boolean immediate) |
protected void |
setInternalValue(String newValue)
Sets the internal field value.
|
protected void |
setInternalValue(String newValue,
boolean repaintIsNotNeeded)
Sets the internal field value.
|
void |
setMaxWidth(double maxWidth)
Sets the maximum width of a line.
|
void |
setMimeType(MimeType mimeType)
Sets the
MimeType of generated images |
void |
setMinWidth(double minWidth)
Sets the minimum width of a line.
|
void |
setPenColor(String penColor)
Sets the color used to draw the lines.
|
void |
setReadOnly(boolean readOnly) |
void |
setVelocityFilterWeight(double velocityFilterWeight)
Sets the velocity filter weight
|
SignatureField |
withBackgroundColor(String backgroundColor)
Sets the color used to clear the background.
|
SignatureField |
withClearButtonEnabled(boolean clearButtonEnabled)
Sets the visibility of the clear button
|
SignatureField |
withConversionError(String valueConversionError)
Sets the error that is shown if the field value cannot be converted to
the data source type.
|
SignatureField |
withConverter(com.vaadin.data.util.converter.Converter<String,?> converter)
Sets the converter used to convert the field value to property data
source type.
|
SignatureField |
withDotSize(Double dotSize)
Sets the radius of a single dot.
|
SignatureField |
withFullHeight()
Sets the height of the object to "100%".
|
SignatureField |
withFullWidth()
Sets the width of the object to "100%".
|
SignatureField |
withHeight(float height,
com.vaadin.server.Sizeable.Unit unit)
Sets the height of the object.
|
SignatureField |
withHeight(String height)
Sets the height of the component using String presentation.
|
SignatureField |
withMaxWidth(double maxWidth)
Sets the maximum width of a line.
|
SignatureField |
withMimeType(MimeType mimeType)
Sets the
MimeType of generated images |
SignatureField |
withMinWidth(double minWidth)
Sets the minimum width of a line.
|
SignatureField |
withPenColor(String penColor)
Sets the color used to draw the lines.
|
SignatureField |
withReadOnly(boolean readOnly)
Changes the readonly state and throw read-only status change events.
|
SignatureField |
withValidator(com.vaadin.data.Validator validator)
Adds a new validator for the field's value.
|
SignatureField |
withVelocityFilterWeight(double velocityFilterWeight)
Sets the velocity filter weight
|
SignatureField |
withWidth(float width,
com.vaadin.server.Sizeable.Unit unit)
Sets the width of the object.
|
SignatureField |
withWidth(String width)
Sets the width of the component using String presentation.
|
void |
writeDesign(org.jsoup.nodes.Element design,
com.vaadin.ui.declarative.DesignContext designContext) |
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getTabIndex, getValidators, getValue, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, shouldHideErrors, toString, validate, validate, valueChangeaddListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthUndefinedaddAttachListener, 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, setResourceclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthUndefinedforEach, spliteratorpublic SignatureField()
public SignatureField(String caption)
caption - Field captionpublic SignatureField(com.vaadin.data.Property<?> dataSource)
dataSource - Property data sourcepublic SignatureField(String caption, com.vaadin.data.Property<?> dataSource)
caption - Field captiondataSource - Property data sourceprotected final com.vaadin.ui.Component initContent()
nullinitContent in class com.vaadin.ui.CustomField<String>nullprotected com.vaadin.ui.Component getContent()
nullgetContent in class com.vaadin.ui.CustomField<String>nullpublic void setReadOnly(boolean readOnly)
public void setImmediate(boolean immediate)
setImmediate in class com.vaadin.ui.AbstractComponentpublic boolean isEmpty()
nullprotected void setInternalValue(String newValue)
setInternalValue in class com.vaadin.ui.AbstractField<String>newValue - the new value to be set.protected void setInternalValue(String newValue, boolean repaintIsNotNeeded)
newValue - the new value to be set.repaintIsNotNeeded - the new value should not be send to the client-sidepublic void clear()
public void readDesign(org.jsoup.nodes.Element design,
com.vaadin.ui.declarative.DesignContext designContext)
readDesign in interface com.vaadin.ui.ComponentreadDesign in class com.vaadin.ui.AbstractField<String>public void writeDesign(org.jsoup.nodes.Element design,
com.vaadin.ui.declarative.DesignContext designContext)
writeDesign in interface com.vaadin.ui.ComponentwriteDesign in class com.vaadin.ui.AbstractField<String>protected Collection<String> getCustomAttributes()
getCustomAttributes in class com.vaadin.ui.AbstractField<String>public Double getDotSize()
public void setDotSize(Double dotSize)
dotSize - Radius of a single dot.public SignatureField withDotSize(Double dotSize)
dotSize - Radius of a single dot.SignatureFieldpublic double getMinWidth()
public void setMinWidth(double minWidth)
minWidth - Minimum width of a line.public SignatureField withMinWidth(double minWidth)
minWidth - Minimum width of a line.SignatureFieldpublic double getMaxWidth()
public void setMaxWidth(double maxWidth)
maxWidth - Maximum width of a line.public SignatureField withMaxWidth(double maxWidth)
maxWidth - Maximum width of a line.SignatureFieldpublic String getBackgroundColor()
SampleColorspublic void setBackgroundColor(String backgroundColor)
SampleColorsbackgroundColor - Color used to clear the background.public SignatureField withBackgroundColor(String backgroundColor)
SampleColorsbackgroundColor - Color used to clear the background.SignatureFieldpublic String getPenColor()
SampleColorspublic void setPenColor(String penColor)
SampleColorspenColor - The color used to draw the lines.public SignatureField withPenColor(String penColor)
SampleColorspenColor - The color used to draw the lines.SignatureFieldpublic double getVelocityFilterWeight()
public void setVelocityFilterWeight(double velocityFilterWeight)
velocityFilterWeight - The velocity filter weightpublic SignatureField withVelocityFilterWeight(double velocityFilterWeight)
velocityFilterWeight - The velocity filter weightSignatureFieldpublic MimeType getMimeType()
MimeType of generated imagesMimeType of generated imagespublic void setMimeType(MimeType mimeType)
MimeType of generated imagesmimeType - The MimeType of generated imagespublic SignatureField withMimeType(MimeType mimeType)
MimeType of generated imagesmimeType - The MimeType of generated imagesSignatureFieldpublic boolean isClearButtonEnabled()
SignatureFieldpublic void setClearButtonEnabled(boolean clearButtonEnabled)
clearButtonEnabled - Should show a clear button in the
SignatureFieldpublic SignatureField withClearButtonEnabled(boolean clearButtonEnabled)
clearButtonEnabled - Should show a clear button in the
SignatureFieldSignatureFieldpublic SignatureField withConversionError(String valueConversionError)
valueConversionError - Message to be shown when conversion of the
value failsSignatureFieldAbstractField.setConversionError(java.lang.String),
setImmediate(boolean)public SignatureField withConverter(com.vaadin.data.util.converter.Converter<String,?> converter)
converter - The new converter to use.SignatureFieldAbstractField.setConverter(com.vaadin.data.util.converter.Converter),
setImmediate(boolean)public SignatureField withFullWidth()
SignatureFieldCustomField.setWidth(float, com.vaadin.server.Sizeable.Unit)public SignatureField withFullHeight()
SignatureFieldCustomField.setHeight(float, com.vaadin.server.Sizeable.Unit)public SignatureField withReadOnly(boolean readOnly)
readOnly - a boolean value specifying whether the component is put
read-only mode or notSignatureFieldsetReadOnly(boolean)public SignatureField withValidator(com.vaadin.data.Validator validator)
validator - the new validator to be added.SignatureFieldAbstractField.addValidator(com.vaadin.data.Validator)public SignatureField withWidth(float width, com.vaadin.server.Sizeable.Unit unit)
width - the width of the object.unit - the unit used for the width.SignatureFieldCustomField.setWidth(float, com.vaadin.server.Sizeable.Unit)public SignatureField withWidth(String width)
width - in CSS style string representation, null or empty string to
resetSignatureFieldAbstractComponent.setWidth(java.lang.String)public SignatureField withHeight(float height, com.vaadin.server.Sizeable.Unit unit)
height - the height of the object.unit - the unit used for the width.SignatureFieldCustomField.setHeight(float, com.vaadin.server.Sizeable.Unit)public SignatureField withHeight(String height)
height - Height of the componentSignatureFieldAbstractComponent.setHeight(java.lang.String)Copyright © 2015 Max Schuster. All Rights Reserved.