Package overit.geocall.basic.ui.control
Class InputCode
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.Input
overit.geocall.basic.ui.control.InputText
overit.geocall.basic.ui.control.InputCode
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Arrangeable,Badgeable,ValueValidator,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
This component provides a text editor for coding.
It's based on CodeMirror v 5.65.1 and it usefull for many programming languages like:
It's based on CodeMirror v 5.65.1 and it usefull for many programming languages like:
- Java
- Javascript
- Css/Scss
- XML
- HTML
- SQL
- Properties
- See Also:
-
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 booleanprotected intprotected booleanprotected Stringprotected intFields inherited from class overit.geocall.basic.ui.control.InputText
_cols, _max, _min, _rows, _spellcheck, COLS_ATTRIBUTE, configuredCols, configuredRows, ROWS_ATTRIBUTEFields inherited from class overit.geocall.basic.ui.control.Input
_autofocus, _da, _dao, _dao0, _defaultFocus, _event, _eventicon, _eventmsg, _eventparam, _eventprompt, _eventsnumber, _eventtitle, _ff, _fullSize, _hidden, _hinter, _hints, _hintsCache, _key, _label2, _letterCase, _maxlength, _msg, _msgCampoObbligatorio, _msgErroreCampo, _notnull, _numeric, _placeholder, _query, _roevent, _size, _value, autocomplete, configuredFullSize, configuredNotNull, configuredSize, FILTER_CRITERION_ATTRIBUTE, filterCriteria, FULL_SIZE_ATTRIBUTE, NOT_NULL_ATTRIBUTE, promptEmpty, SIZE_ATTRIBUTEFields 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 displayed.booleanGets if editor is allowed to use "autocompletion" feature, pressing ctrl+space.intGets the height of the component.org.apache.ecs.ElementReturns the html of the Input elementGets the programming language with which editor will works.intgetWidth()Gets the width of the component.voidSets if editor must allow to use "autocompletion" feature, pressing ctrl+space.
The autocompletion fature is allowed only for javascript, css/scss, html, sql and xml syntxes.voidSets the height of the component.voidSets if the editor must diplay the line numbers.voidSets the programming language with which editor will works.protected voidsetup()Setup the ComponentvoidSets the width of the component.Methods inherited from class overit.geocall.basic.ui.control.InputText
control, getCols, getContentHtml, getRows, normalization, setCOLS, setConfiguredProperty, setMAX, setMIN, setModelProperties, setROWS, validate, validateUnchangingValueMethods inherited from class overit.geocall.basic.ui.control.Input
addEventButtons, addHint, addHint, addHintsButton, ajaxQuery, connect, control, getClassStyle, getConfigurableProperties, getDefaultValue, getDescriptionHtml, getFilterCriteriaToRemove, getFullSize, getGenerationHandle, getHIDDEN, getHiddenHtml, getHintsEventButton, getHintsFieldName, getInsideEventButton, getInsideEventButton, getLetterCase, getNOTNULL, getSize, getVisibleDescriptionHtml, isImportant, isNotNull, isValueIgnoredByCriterion, prepareName, prepareValue, queryHints, registerValidators, setAUTOCOMPLETE, setAUTOFOCUS, setDA, setDAO, setDAO0, setDEFAULTFOCUS, setEVENT, setEVENTMSG, setEVENTPARAM, setEVENTPROMPT, setEVENTTITLE, setFILTERCRITERIA, setFULLSIZE, setHIDDEN, setHints, setHINTS, setHINTSCACHE, setICON, setIMPORTANT, setKEY, setLABEL2, setLETTERCASE, setMAXLENGTH, setMSG, setNAME, setNOTNULL, setNUMERIC, setPARAM, setPLACEHOLDER, setPROMPT, setPROMPTEMPTY, setQUERY, setROEVENT, setSIZE, setupAutocomplete, setVALUE, validate, validateChangingValue, validateConcreteValue, validateNotNull, validateValueMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setDBLINK, setENABLED, setFUNCTION, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, appendAttribute, buildSetupScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, 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, setIdentity, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setREGISTRYNAME, setTooltip, 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
-
syntax
-
height
protected int height -
width
protected int width -
autocompletion
protected boolean autocompletion -
lineNumbers
protected boolean lineNumbers
-
-
Constructor Details
-
InputCode
public InputCode()
-
-
Method Details
-
getSyntax
Gets the programming language with which editor will works.- Returns:
- the programming language with which editor will works.
-
setSYNTAX
Sets the programming language with which editor will works. Possible syntax value could be:- java
- javascript
- css/scss
- xml
- html
- sql
- Properties
- Parameters:
syntax- the programming language with which editor will works.
-
getAutocompletion
public boolean getAutocompletion()Gets if editor is allowed to use "autocompletion" feature, pressing ctrl+space.- Returns:
trueeditor use the autocompletion feature,falseotherwise.
-
setAUTOCOMPLETION
Sets if editor must allow to use "autocompletion" feature, pressing ctrl+space.
The autocompletion fature is allowed only for javascript, css/scss, html, sql and xml syntxes.- Parameters:
s-trueto use the autocompletion feature,falseotherwise
-
getHeight
public int getHeight()Gets the height of the component.- Returns:
- the height of the component.
-
setHEIGHT
Sets the height of the component.- Parameters:
s- the height of the component.
-
setLINENUMBERS
Sets if the editor must diplay the line numbers.- Parameters:
s- true or false.
-
getWidth
public int getWidth()Gets the width of the component.- Returns:
- the width of the component.
-
setWIDTH
Sets the width of the component.- Parameters:
s- the width of the component.
-
setup
protected void setup()Description copied from class:ComponentSetup the Component -
getHtml
Returns the html of the Input element -
buildDisplayScript
Description copied from class:InputEvery component can add a script to the StringBuilder, script executed when the component is displayed. The method add the script that controls the focus on the input field.- Overrides:
buildDisplayScriptin classInput- Parameters:
sb- The StringBuilder on which we want to add the script
-