public class SignatureField extends com.vaadin.ui.CustomField<String>
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
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
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
Constructor and Description |
---|
SignatureField()
Creates a new SignatureField instance
|
SignatureField(String caption) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the field.
|
protected void |
doSetValue(String newValue) |
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.
|
String |
getValue() |
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 |
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 |
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 |
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) |
attach, focus, getState, getState, getTabIndex, iterator, setFocusDelegate, setHeight, setTabIndex, setWidth
addValueChangeListener, createValueChange, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, setRequiredIndicatorVisible, setValue, setValue
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, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthUndefined
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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidthUndefined
forEach, spliterator
public SignatureField()
public SignatureField(String caption)
protected final com.vaadin.ui.Component initContent()
null
initContent
in class com.vaadin.ui.CustomField<String>
null
protected com.vaadin.ui.Component getContent()
null
getContent
in class com.vaadin.ui.CustomField<String>
null
public void setReadOnly(boolean readOnly)
public String getValue()
public boolean isEmpty()
null
public void clear()
AbstractField.setValue(java.lang.Object)
public void readDesign(org.jsoup.nodes.Element design, com.vaadin.ui.declarative.DesignContext designContext)
readDesign
in interface com.vaadin.ui.Component
readDesign
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.Component
writeDesign
in class com.vaadin.ui.AbstractField<String>
protected Collection<String> getCustomAttributes()
getCustomAttributes
in class com.vaadin.ui.AbstractField<String>
protected void doSetValue(String newValue)
doSetValue
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.SignatureField
public double getMinWidth()
public void setMinWidth(double minWidth)
minWidth
- Minimum width of a line.public SignatureField withMinWidth(double minWidth)
minWidth
- Minimum width of a line.SignatureField
public double getMaxWidth()
public void setMaxWidth(double maxWidth)
maxWidth
- Maximum width of a line.public SignatureField withMaxWidth(double maxWidth)
maxWidth
- Maximum width of a line.SignatureField
public String getBackgroundColor()
SampleColors
public void setBackgroundColor(String backgroundColor)
SampleColors
backgroundColor
- Color used to clear the background.public SignatureField withBackgroundColor(String backgroundColor)
SampleColors
backgroundColor
- Color used to clear the background.SignatureField
public String getPenColor()
SampleColors
public void setPenColor(String penColor)
SampleColors
penColor
- The color used to draw the lines.public SignatureField withPenColor(String penColor)
SampleColors
penColor
- The color used to draw the lines.SignatureField
public double getVelocityFilterWeight()
public void setVelocityFilterWeight(double velocityFilterWeight)
velocityFilterWeight
- The velocity filter weightpublic SignatureField withVelocityFilterWeight(double velocityFilterWeight)
velocityFilterWeight
- The velocity filter weightSignatureField
public 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 imagesSignatureField
public boolean isClearButtonEnabled()
SignatureField
public void setClearButtonEnabled(boolean clearButtonEnabled)
clearButtonEnabled
- Should show a clear button in the
SignatureField
public SignatureField withClearButtonEnabled(boolean clearButtonEnabled)
clearButtonEnabled
- Should show a clear button in the
SignatureField
SignatureField
public SignatureField withFullWidth()
SignatureField
CustomField.setWidth(float, com.vaadin.server.Sizeable.Unit)
public SignatureField withFullHeight()
SignatureField
CustomField.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 notSignatureField
setReadOnly(boolean)
public SignatureField withWidth(float width, com.vaadin.server.Sizeable.Unit unit)
width
- the width of the object.unit
- the unit used for the width.SignatureField
CustomField.setWidth(float, com.vaadin.server.Sizeable.Unit)
public SignatureField withWidth(String width)
width
- in CSS style string representation, null or empty string to
resetSignatureField
AbstractComponent.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.SignatureField
CustomField.setHeight(float, com.vaadin.server.Sizeable.Unit)
public SignatureField withHeight(String height)
height
- Height of the componentSignatureField
AbstractComponent.setHeight(java.lang.String)
Copyright © 2020 Hocine AMROUCHE. All rights reserved.