Class 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:
  • Field Details

    • STATE_NORMAL

      public static final int STATE_NORMAL
      Defines the normal state of the Control (not read only and not blank)
      See Also:
    • STATE_RO

      public static final int STATE_RO
      Defines the read only state of the Control
      See Also:
    • STATE_BLANK

      public static final int STATE_BLANK
      Defines the blank state of the Control
      See Also:
    • STATE_ROBLANK

      public static final int STATE_ROBLANK
      Defines the read only and blank state of the Control
      See Also:
    • LABEL_IN_LINE_ATTRIBUTE

      public static final String LABEL_IN_LINE_ATTRIBUTE
      See Also:
    • LABEL_ATTRIBUTE

      public static final String LABEL_ATTRIBUTE
      See Also:
    • _ro

      protected SetPredicate _ro
    • _blank

      protected boolean _blank
    • _enabled

      protected SetPredicate _enabled
    • _title

      protected String _title
    • _cleaner

      protected Cleaner _cleaner
    • badge

      protected String badge
    • badgeformat

      protected String badgeformat
    • altEventIconsList

      protected ListAttribute altEventIconsList
    • altIcon

      protected String altIcon
    • ariaLabel

      protected String ariaLabel
    • ariaDescription

      protected String ariaDescription
    • FILTER_PREFIXES

      public static final Set<String> FILTER_PREFIXES
  • Constructor Details

    • Control

      public Control()
  • Method Details

    • setBADGEVALUE

      public void setBADGEVALUE(String badge)
      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

      public void setBADGEFORMAT(String badgeformat)
      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

      public void setARIALABEL(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. See Component.setLABEL(java.lang.String)
      Parameters:
      aLabel - The aria-label attribute to set on the component.
    • setARIADESCRIPTION

      public void setARIADESCRIPTION(String s)
      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. See setTITLE(java.lang.String)
      Parameters:
      s - The aria-description attribute to set on the component.
    • getBadgeValue

      public String getBadgeValue()
      Description copied from interface: Badgeable
      Returns the current badge value of this element.
      Specified by:
      getBadgeValue in interface Badgeable
      Returns:
      The string that represents the current value of the badge
    • getBadgeFormat

      public String getBadgeFormat()
      Description copied from interface: Badgeable
      Returns the current badge format of this element.
      Specified by:
      getBadgeFormat in interface Badgeable
      Returns:
      The string that represents the current format of the badge
    • setCLEANER

      public void setCLEANER(String name)
      Sets the Cleaner that will perform the sanitization of the Control
      Parameters:
      name - "none" to obtain a NoneCleaner, "text" to obtain a TextCleaner, "rtf" to obtain a RtfCleaner, "html" to obtain an HtmlCleaner
    • clean

      protected String clean(String html)
    • getCleaner

      public Cleaner getCleaner()
    • setTITLE

      public void setTITLE(String s)
      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 the Teacher
    • setRO

      public void setRO(String s)
      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 is false. See Component.getBoolean(String, Identity, boolean)
    • getRO

      public boolean getRO()
      Returns the read only state of the Control
      Returns:
      true if the control is read only, false otherwise
    • isRoBasedOnFunction

      public boolean isRoBasedOnFunction()
      Gets if the read only attribute is based on a function instead of a boolean value.
      Returns:
      true if the read only attribute is based on a function instead of a boolean value, false otherwise.
    • 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:
      isImportant in class Component
      Returns:
      true if this Control is important, false otherwise.
    • getTITLE

      public String getTITLE()
      Returns the title of the Control
      Returns:
      The string that will be used as title for the Control.
    • setBLANK

      public void setBLANK(String s)
      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 is false
    • getBLANK

      public boolean getBLANK()
      Returns the blank state of the Control
      Returns:
      true if the control is in blank state, false otherwise
    • getState

      public int getState()
      Returns the state of the Control
      Returns:
      One of STATE_NORMAL, STATE_RO, STATE_BLANK or STATE_ROBLANK
    • setDBLINK

      public void setDBLINK(String s)
      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 is false
    • getDBLINK

      public boolean getDBLINK()
      Checks if the Control has a direct reference to the database
      Returns:
      true if there is a reference, false otherwise
    • setENABLED

      public void setENABLED(String s)
      Sets a predicate expression over the identity functions. If the predicate over the functions Identity.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 public void setFUNCTION(String s)
      Deprecated.
      Sets a function (a privilege). If the user currently logged in the application has the function in his Identity, then the Control will be enabled for the user, otherwise it will not
      Parameters:
      s - A string that defines a function
    • setALTEVENTICON

      public void setALTEVENTICON(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.
      Parameters:
      altEventIcon - A ListAttribute of 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

      public void setALTICON(String alt)
      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. See setFUNCTION(java.lang.String)
      Returns:
      true if the control is enabled, false otherwise
    • isEnabledBasedOnFunction

      public boolean isEnabledBasedOnFunction()
      Gets if the enabled attribute is based on a function instead of a boolean value.
      Returns:
      true if the enabled attribute is based on a function instead of a boolean value, false otherwise.
    • isFunctionEnabled

      @Deprecated public boolean isFunctionEnabled()
      Deprecated.
      use isEnabled() instead
      Checks if the Control is enabled for the user currently logged in the application. See setFUNCTION(java.lang.String)
      Returns:
      true if the control is enabled, false otherwise
    • getValues

      public HashGetter getValues()
      Returns the values of the Control
      Returns:
      The HashGetter that contains the values of the Control
    • getDAValues

      public HashGetter getDAValues()
      Returns the DA values of the Control
      Returns:
      The HashGetter that contains the DA values of the Control
    • getWM

      public WindowManager getWM()
      Returns the WindowManager to which belongs the Window containing the Control
      Returns:
      The instance of the WindowManager
    • avoidNull

      public static String avoidNull(String s)
      Utility that returns en empty string if the string passed as parameters is null
      Parameters:
      s - The string that we want is not null
      Returns:
      The same string passed as parameter is the string is not null or an empty string otherwise
    • setTitle

      public void setTitle(String s)
      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

      protected String nameWithNoFilterPrefix(String name)
    • getConfigurableProperties

      public Collection<overit.geocall.ux.configurability.UIProperty> getConfigurableProperties()
      Description copied from interface: overit.geocall.ux.configurability.UIConfigurable
      Gets a set of UIProperty object that represents the configurable UI properties that the object can handle.
      Each UIProperty object, 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:
      getConfigurableProperties in interface overit.geocall.ux.configurability.UIConfigurable
      Returns:
      object that represents the configurable UI properties that the object can handle.
    • setModelProperties

      public void setModelProperties(@NotNull @NotNull DataAttribute dataAttribute)
      Description copied from interface: overit.geocall.ux.edm.ModelConfigurable
      Sets the model properties based on the provided DataAttribute.
      Specified by:
      setModelProperties in interface overit.geocall.ux.edm.ModelConfigurable
      Parameters:
      dataAttribute - a non-null DataAttribute used to set model properties
    • setConfiguredProperty

      public void setConfiguredProperty(Map<String,Serializable> properties)
      Description copied from interface: overit.geocall.ux.configurability.UIConfigurable
      Apply the user's properties customization into the component.
      Specified by:
      setConfiguredProperty in interface overit.geocall.ux.configurability.UIConfigurable
      Parameters:
      properties - The map containing the configured properties to set
    • getLABEL

      public String getLABEL()
      Description copied from class: Component
      Returns the label of the component
      Overrides:
      getLABEL in class Component
      Returns:
      The string that defines the label of the component
    • getKEYLABEL

      public String getKEYLABEL()
      Description copied from class: Component
      Returns the key label of the component
      Overrides:
      getKEYLABEL in class Component
      Returns:
      The string that defines the label of the component