Package overit.geocall.basic.ui.control
Class InputPicture
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.InputPicture
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Badgeable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
This class extends
A typical use of this component is the acquisition / modification of the user picture.
Control and implements the graphic user interface object that allows to capture an image from
the file system, position it in the field and trim it. The InputPicture consists of a square pane in which the scanned image
will be displayed and some buttons to the side for some basic editing operations. A typical use of this component is the acquisition / modification of the user picture.
- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected Stringprotected intprotected intprotected Pictureprotected floatprotected longprotected intstatic final intstatic final intstatic final intstatic final intFields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEvery component can add a script to the StringBuilder, script executed when the component is created.voidDeletes the pictureintSets the height, expressed in pixels, of the acquired image.intSets the width, expressed in pixels, of the acquired image.org.apache.ecs.ElementAbstract method that must be extended and returns the html code of the Componentprotected intReturns thePicturebooleanCalled when the user click the button to perform the crop actionbooleanManages the event of deleting a picturebooleanCalled when the user click the button to perform the upload of the imagevoidSets the default picturevoidSets the height, expressed in pixels, of the acquired image.voidSets the width, expressed in pixels, of the acquired image.voidSets the format in which the image will be acquired.voidSets the height of the acquisition panelprotected voidsetLastOperation(int operation) voidSets thePicturevoidsetQUALITY(String s) Sets the image quality to a value between 0 and 1.voidSets the width of the acquisition panelMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBASIC, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setup, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
SET_OPERATION
public static final int SET_OPERATION- See Also:
-
UPLOAD_OPERATION
public static final int UPLOAD_OPERATION- See Also:
-
DELETE_OPERATION
public static final int DELETE_OPERATION- See Also:
-
LOAD_DEFAULT_OPERATION
public static final int LOAD_DEFAULT_OPERATION- See Also:
-
_p
-
_lastOperation
protected int _lastOperation -
_width
protected int _width -
_height
protected int _height -
_finalWidth
protected int _finalWidth -
_finalHeight
protected int _finalHeight -
_version
protected long _version -
_quality
protected float _quality -
_format
-
-
Constructor Details
-
InputPicture
public InputPicture()
-
-
Method Details
-
setWIDTH
Sets the width of the acquisition panel- Parameters:
s- The width of the acquisition panel, expressed in pixel
-
setHEIGHT
Sets the height of the acquisition panel- Parameters:
s- The height of the acquisition panel, expressed in pixel
-
setFORMAT
Sets the format in which the image will be acquired.- Parameters:
s- Possible values are: "jpg" (that is the default one) and "png"
-
setQUALITY
Sets the image quality to a value between 0 and 1. A compression quality setting of 0.0 is most generically interpreted as "high compression is important," and therefore the produced image’s size will be low. Otherwise setting quality to 1.0 is most generically interpreted as "high image quality is important"- Parameters:
s- A value from 0 to 1 that defines the image quality
-
setFINALWIDTH
Sets the width, expressed in pixels, of the acquired image. If set to -1, that is the default value, will be considered the width value (setWIDTH(java.lang.String))- Parameters:
s- The width, in pixel, of the image
-
setFINALHEIGHT
Sets the height, expressed in pixels, of the acquired image. If set to -1, that is the default value, will be considered the height value (setHEIGHT(java.lang.String))- Parameters:
s- The height, in pixel, of the image
-
setPicture
Sets thePicture- Parameters:
p- The picture to set to the input
-
deletePicture
public void deletePicture()Deletes the picture -
getPicture
Returns thePicture- Returns:
- The picture set to the input
-
getFinalWidth
public int getFinalWidth()Sets the width, expressed in pixels, of the acquired image.- Returns:
- The width of the acquired image.
-
getFinalHeight
public int getFinalHeight()Sets the height, expressed in pixels, of the acquired image.- Returns:
- The height of the acquired image.
-
onCrop
Called when the user click the button to perform the crop action- Parameters:
evt- TheUIMessagepassed to the event- Returns:
false
-
onUp
Called when the user click the button to perform the upload of the image- Parameters:
evt- TheUIMessagepassed to the event- Returns:
true
-
onDelete
Manages the event of deleting a picture- Parameters:
evt- Not used- Returns:
true
-
getLastOperation
protected int getLastOperation() -
setLastOperation
protected void setLastOperation(int operation) -
setDefaultPicture
public void setDefaultPicture()Sets the default picture -
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
buildSetupScript
Description copied from class:ComponentEvery component can add a script to the StringBuilder, script executed when the component is created.- Overrides:
buildSetupScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-