Package overit.geocall.ui
Class Control
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
- 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
- Direct Known Subclasses:
Button,Captcha,ChartBase,Col,Column,Container,Gap,GeneratorApyKey,Grid,GridFrame,IFrame,Input,InputOption,InputPicture,JFCMessage,Label,LocalizationStringHelper,NullComponent,Output,OutputColor,PlainButton,ResponsiveGrid,ResponsiveGridFrame,Row,RowMessage,SearchBoxMenu,Section,ServerMultiForm,SortableGridComponents,TableMessage,TableOrder,TaskBox,TaskBoxFavoritesMenu,TaskMessage,Title,Transform
@Configurable
@ConfigurableAttribute(name="LABEL",label="Label") @ConfigurableAttribute(name="LABELINLINE",label="Label Inline",type="BOOLEAN")
public abstract class Control
extends Component
implements Badgeable, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
This class implements the Control, which purpose is to provide a single graphic element that implements
a specific functionality. This is the fundamental unit for the realization of the graphic interface whose
aggregation inside the container contributes to realize the application pages.
- 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 Cleanerprotected booleanprotected SetPredicateprotected SetPredicateprotected Stringprotected ListAttributeprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringstatic final Stringstatic final Stringstatic final intDefines the blank state of the Controlstatic final intDefines the normal state of the Control (not read only and not blank)static final intDefines the read only state of the Controlstatic final intDefines the read only and blank state of the ControlFields 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 TypeMethodDescriptionstatic StringUtility that returns en empty string if the string passed as parameters isnullprotected StringReturns the current badge format of this element.Returns the current badge value of this element.booleangetBLANK()Returns the blank state of the ControlCollection<overit.geocall.ux.configurability.UIProperty> Gets a set ofUIPropertyobject that represents the configurable UI properties that the object can handle.
EachUIPropertyobject, can be used to retrieve some information about the configurable property, for example it can be used to design the ui xml objects to inject into the properties configurability section of the ResponsiveGrids and TableVies configurability panels.
The property section are those section placed on the left side of the panel and shown when user click on the settings icon of a field to customize its properties.Returns the DA values of the ControlbooleanChecks if the Control has a direct reference to the databaseReturns the key label of the componentgetLABEL()Returns the label of the componentbooleangetRO()Returns the read only state of the ControlintgetState()Returns the state of the ControlgetTITLE()Returns the title of the ControlReturns the values of the ControlgetWM()Returns theWindowManagerto which belongs theWindowcontaining the ControlbooleanChecks if the Control is enabled for the user currently logged in the application.booleanGets if the enabled attribute is based on a function instead of a boolean value.booleanDeprecated.booleanGets if this Control is important or not.booleanGets if the read only attribute is based on a function instead of a boolean value.protected StringnameWithNoFilterPrefix(String name) voidsetALTEVENTICON(String altEventIcon) Sets one (or more) alternative text string for the icon that is associated to the button of an event
For the association event icon - alt attribute, it counts the position in which the strings appear.voidsetALTICON(String alt) Sets the alt's attribute string for the image that is associated to component.voidSets the aria-description attribute for the component.
If no ariaDescription attribute is set, the aria-description attribute will be equivalent with the title of the component if present.voidsetARIALABEL(String aLabel) Sets the aria-label attribute for the component.
If no ariaLabel is set, the aria-label attribute will be equivalent with the label of the component.voidsetBADGEFORMAT(String badgeformat) Sets badge definiing format of this element.voidsetBADGEVALUE(String badge) Sets badge value of this element.voidSets the blank state of the ControlvoidsetCLEANER(String name) Sets theCleanerthat will perform the sanitization of the ControlvoidsetConfiguredProperty(Map<String, Serializable> properties) Apply the user's properties customization into the component.voidDefines if the Control has a direct reference to the databasevoidsetENABLED(String s) Sets a predicate expression over the identity functions.voidDeprecated.usesetENABLED(java.lang.String)insteadvoidsetModelProperties(@NotNull DataAttribute dataAttribute) Sets the model properties based on the providedDataAttribute.voidSets the read only states of the ControlvoidSets the title of the ControlvoidSets the title of the ControlMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, buildSetupScript, 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, getHtml, 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
-
STATE_NORMAL
public static final int STATE_NORMALDefines the normal state of the Control (not read only and not blank)- See Also:
-
STATE_RO
public static final int STATE_RODefines the read only state of the Control- See Also:
-
STATE_BLANK
public static final int STATE_BLANKDefines the blank state of the Control- See Also:
-
STATE_ROBLANK
public static final int STATE_ROBLANKDefines the read only and blank state of the Control- See Also:
-
LABEL_IN_LINE_ATTRIBUTE
- See Also:
-
LABEL_ATTRIBUTE
- See Also:
-
_ro
-
_blank
protected boolean _blank -
_dblink
protected boolean _dblink -
_enabled
-
_title
-
_cleaner
-
badge
-
badgeformat
-
altEventIconsList
-
altIcon
-
ariaLabel
-
ariaDescription
-
FILTER_PREFIXES
-
-
Constructor Details
-
Control
public Control()
-
-
Method Details
-
setBADGEVALUE
Sets badge value of this element.
Any values different than "" wil be rendered at a corner of the underlying icon, if any such icon exists.- Parameters:
badge- A string that represents the message to be displayed as a badge
-
setBADGEFORMAT
Sets badge definiing format of this element.- Parameters:
badgeformat- The value can be c[x] ir d[y] respectively for x characters or y digits
-
setARIALABEL
Sets the aria-label attribute for the component.
If no ariaLabel is set, the aria-label attribute will be equivalent with the label of the component. SeeComponent.setLABEL(java.lang.String)- Parameters:
aLabel- The aria-label attribute to set on the component.
-
setARIADESCRIPTION
Sets the aria-description attribute for the component.
If no ariaDescription attribute is set, the aria-description attribute will be equivalent with the title of the component if present. SeesetTITLE(java.lang.String)- Parameters:
s- The aria-description attribute to set on the component.
-
getBadgeValue
Description copied from interface:BadgeableReturns the current badge value of this element.- Specified by:
getBadgeValuein interfaceBadgeable- Returns:
- The string that represents the current value of the badge
-
getBadgeFormat
Description copied from interface:BadgeableReturns the current badge format of this element.- Specified by:
getBadgeFormatin interfaceBadgeable- Returns:
- The string that represents the current format of the badge
-
setCLEANER
Sets theCleanerthat will perform the sanitization of the Control- Parameters:
name- "none" to obtain aNoneCleaner, "text" to obtain aTextCleaner, "rtf" to obtain aRtfCleaner, "html" to obtain anHtmlCleaner
-
clean
-
getCleaner
-
setTITLE
Sets the title of the Control- Parameters:
s- The string that will be used as title for the Control. Using this method the string will be translated by theTeacher
-
setRO
Sets the read only states of the Control- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0") or a function.
If the string is not recognized as a boolean value, it is considered as a user function with this meaning: if the user currently logged in the application has the function, the component will be rendered, otherwise it will not. The default value isfalse. SeeComponent.getBoolean(String, Identity, boolean)
-
getRO
public boolean getRO()Returns the read only state of the Control- Returns:
trueif the control is read only,falseotherwise
-
isRoBasedOnFunction
public boolean isRoBasedOnFunction()Gets if the read only attribute is based on a function instead of a boolean value.- Returns:
trueif the read only attribute is based on a function instead of a boolean value,falseotherwise.
-
isImportant
public boolean isImportant()Gets if this Control is important or not. A Control object is considered important if has a registryName attribute set or if it's read only or not enabled.- Overrides:
isImportantin classComponent- Returns:
trueif this Control is important,falseotherwise.
-
getTITLE
Returns the title of the Control- Returns:
- The string that will be used as title for the Control.
-
setBLANK
Sets the blank state of the Control- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default value, that isfalse
-
getBLANK
public boolean getBLANK()Returns the blank state of the Control- Returns:
trueif the control is in blank state,falseotherwise
-
getState
public int getState()Returns the state of the Control- Returns:
- One of
STATE_NORMAL,STATE_RO,STATE_BLANKorSTATE_ROBLANK
-
setDBLINK
Defines if the Control has a direct reference to the database- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default value, that isfalse
-
getDBLINK
public boolean getDBLINK()Checks if the Control has a direct reference to the database- Returns:
trueif there is a reference,falseotherwise
-
setENABLED
Sets a predicate expression over the identity functions. If the predicate over the functionsIdentity.getFunctions()of the logged user is true then the Control will be enabled for the user, otherwise it will not- Parameters:
s- A string that defines a function
-
setFUNCTION
Deprecated.usesetENABLED(java.lang.String)insteadSets a function (a privilege). If the user currently logged in the application has the function in hisIdentity, then the Control will be enabled for the user, otherwise it will not- Parameters:
s- A string that defines a function
-
setALTEVENTICON
Sets one (or more) alternative text string for the icon that is associated to the button of an event
For the association event icon - alt attribute, it counts the position in which the strings appear.- Parameters:
altEventIcon- AListAttributeof strings (separated by the character | ) each of which represents the alt attribute associated to an icon of a button of an event on the field.
-
setALTICON
Sets the alt's attribute string for the image that is associated to component.- Parameters:
alt- A String that represents the alt attribute associated to the image associated to the component.
-
isEnabled
public boolean isEnabled()Checks if the Control is enabled for the user currently logged in the application. SeesetFUNCTION(java.lang.String)- Returns:
trueif the control is enabled,falseotherwise
-
isEnabledBasedOnFunction
public boolean isEnabledBasedOnFunction()Gets if the enabled attribute is based on a function instead of a boolean value.- Returns:
trueif the enabled attribute is based on a function instead of a boolean value,falseotherwise.
-
isFunctionEnabled
Deprecated.useisEnabled()insteadChecks if the Control is enabled for the user currently logged in the application. SeesetFUNCTION(java.lang.String)- Returns:
trueif the control is enabled,falseotherwise
-
getValues
Returns the values of the Control- Returns:
- The
HashGetterthat contains the values of the Control
-
getDAValues
Returns the DA values of the Control- Returns:
- The
HashGetterthat contains the DA values of the Control
-
getWM
Returns theWindowManagerto which belongs theWindowcontaining the Control- Returns:
- The instance of the WindowManager
-
avoidNull
Utility that returns en empty string if the string passed as parameters isnull- Parameters:
s- The string that we want is notnull- Returns:
- The same string passed as parameter is the string is not
nullor an empty string otherwise
-
setTitle
Sets the title of the Control- Parameters:
s- The string that will be used as title for the Control. Using this method the string will not be translated.
-
nameWithNoFilterPrefix
-
getConfigurableProperties
Description copied from interface:overit.geocall.ux.configurability.UIConfigurableGets a set ofUIPropertyobject that represents the configurable UI properties that the object can handle.
EachUIPropertyobject, can be used to retrieve some information about the configurable property, for example it can be used to design the ui xml objects to inject into the properties configurability section of the ResponsiveGrids and TableVies configurability panels.
The property section are those section placed on the left side of the panel and shown when user click on the settings icon of a field to customize its properties.- Specified by:
getConfigurablePropertiesin interfaceoverit.geocall.ux.configurability.UIConfigurable- Returns:
- object that represents the configurable UI properties that the object can handle.
-
setModelProperties
Description copied from interface:overit.geocall.ux.edm.ModelConfigurableSets the model properties based on the providedDataAttribute.- Specified by:
setModelPropertiesin interfaceoverit.geocall.ux.edm.ModelConfigurable- Parameters:
dataAttribute- a non-nullDataAttributeused to set model properties
-
setConfiguredProperty
Description copied from interface:overit.geocall.ux.configurability.UIConfigurableApply the user's properties customization into the component.- Specified by:
setConfiguredPropertyin interfaceoverit.geocall.ux.configurability.UIConfigurable- Parameters:
properties- The map containing the configured properties to set
-
getLABEL
Description copied from class:ComponentReturns the label of the component -
getKEYLABEL
Description copied from class:ComponentReturns the key label of the component- Overrides:
getKEYLABELin classComponent- Returns:
- The string that defines the label of the component
-
isEnabled()instead