Class InputTime

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
Direct Known Subclasses:
InputTimeDataCollection

The class implements a textual Input field for the time
See Also:
GCApi:
component
  • Field Details

    • SDF

      public static final String SDF
      standard time format accepted as input (see SimpleDateFormat and setSDF(s) )
      See Also:
    • LOG

      protected static LogChannel LOG
    • _strSdf

      protected String _strSdf
    • _sdf

      protected SimpleDateFormat _sdf
    • _menuhourrange

      protected String _menuhourrange
    • _menuminuterange

      protected String _menuminuterange
    • _menuminutestep

      protected String _menuminutestep
    • _hourSystem

      protected String _hourSystem
    • _range

      protected int _range
    • _accept00

      protected boolean _accept00
    • _accept24

      protected boolean _accept24
    • _msgConstraintsError

      protected String _msgConstraintsError
    • _constrainedHours

      protected boolean _constrainedHours
    • _constrainedMinutes

      protected boolean _constrainedMinutes
    • _msg2

      protected String _msg2
    • _iconPicker

      protected Icon _iconPicker
  • Constructor Details

    • InputTime

      public InputTime()
  • Method Details

    • setup

      protected void setup()
      Description copied from class: Component
      Setup the Component
      Overrides:
      setup in class InputRegExp
    • setupTimeFormat

      protected void setupTimeFormat()
    • setINTERVAL

      public void setINTERVAL(String interval)
      Sets the interval in minutes for the time picker dropdown. This determines the granularity of time selection in the picker.
      Parameters:
      interval - String representation of the interval value in minutes
      Throws:
      NumberFormatException - if the provided string cannot be parsed as an integer
    • getINTERVAL

      public int getINTERVAL()
      Gets the current interval setting for the time picker.
      Returns:
      The interval value in minutes
    • setSDF

      public void setSDF(String s)
      Set the time format with the string passed as input (see SimpleDateFormat)
      Parameters:
      s - String rappresenting the new format
    • setMENUHOURRANGE

      public void setMENUHOURRANGE(String s)
      Sets the range of hours that can be set for the time
      Parameters:
      s - The string that determines a range using the from-to format or separating the values using commas
    • setMENUMINUTERANGE

      public void setMENUMINUTERANGE(String s)
      Sets the range of minutes that can be set for the time
      Parameters:
      s - the string that determines a range using the from-to format or separating the values using commas
    • setMENUMINUTESTEP

      public void setMENUMINUTESTEP(String s)
      Sets the step for the creation of the minute's item in the picker; determines which values are acceptable for minutes
      Parameters:
      s - Possible values are: 30 (means that the minutes can be :00 or :30), 15 (means that the minutes can be :00, :15, :30 or :45), 10(means that the minutes can be :00, :10, :20, :30, :40, :50) and 5 (means that the minutes can be :00, :05, :10, :15, :20, :25, :30, :35, :40, :45, :50, :55); if the value is not among these, it will be forced to 5
    • setRANGE

      public void setRANGE(String s)
      Set the field as a part of a time range.
      Parameters:
      s - String to define which type of range you are defining. Below are the allowed values:
      • "FROM": set the start of the time range. If the time isn't set, it is automatically set to TIME_MIN
      • "TO": set the end of the time range. If the time isn't set, it is automatically set to TIME_MAX
      • "FULL": set the range (both start and end) as hour passed.
    • validate

      protected void validate(org.apache.ecs.html.Input i, EntitySet es, boolean ro)
      Overrides:
      validate in class InputRegExp
    • getEventButton

      protected org.apache.ecs.Element getEventButton(boolean ro, String script)
    • getOreList

      protected String getOreList()
    • getMinList

      protected String getMinList()
    • getHiddenHtml

      public org.apache.ecs.Element getHiddenHtml(Object generationhandle, EntitySet es)
      Override the method getHiddenHtml(generationhandle, es). Before to return hidden html, set the active components of the InputTime element.
      Specified by:
      getHiddenHtml in interface Arrangeable
      Overrides:
      getHiddenHtml in class Input
      Parameters:
      generationhandle - the unique generating handle
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the hidden part of the field or null if the field is visible.
    • getContentHtml

      public org.apache.ecs.Element getContentHtml(Object generationhandle, EntitySet es)
      Override the method getContentHtml(generationhandle, es). It returns the html code that represents the active part of the input field, i.e. the field and the validation scripts.
      Specified by:
      getContentHtml in interface Arrangeable
      Overrides:
      getContentHtml in class Input
      Parameters:
      generationhandle - the unique generating handle
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the input field or null if the field don't have a graphical representation
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Description copied from class: Input
      Returns the html of the Input element
      Overrides:
      getHtml in class Input
      Parameters:
      es - The EntitySet
      Returns:
      The html of the Input element
    • prepareName

      protected String prepareName()
      Overrides:
      prepareName in class Input
    • prepareValue

      protected String prepareValue()
      Overrides:
      prepareValue in class Input
    • staticValue

      protected Date staticValue()
    • validateConcreteValue

      protected void validateConcreteValue(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Overrides:
      validateConcreteValue in class InputRegExp
      Throws:
      ValidationException
    • getDefaultValue

      public Object getDefaultValue()
      Description copied from class: Input
      Gets the default value set for this component.
      The default value of the component is the value set for the attribute value into the xml. See Input.setVALUE(String)
      Overrides:
      getDefaultValue in class Input
      Returns:
      The default value set for this component