Class InputImage

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

@Component public class InputImage extends Input implements Arrangeable
This class extends Input and implements Arrangeable. This component aim to represent an InputLookUp (see InputLookup) with the InputOptions defined by several images associated with a particular value.
Choosing one of the images selects an option with that particular value.
See Also:
GCApi:
component
  • Field Details

    • _selected

      protected boolean _selected
    • _iColumns

      protected int _iColumns
    • _iCountRow

      protected int _iCountRow
    • _width

      protected int _width
    • _height

      protected int _height
    • _autoevent

      protected String _autoevent
    • _pathsrcimage

      protected String _pathsrcimage
    • ONE_ROW

      public static final int ONE_ROW
      See Also:
    • _filetype

      protected String _filetype
  • Constructor Details

    • InputImage

      public InputImage()
      Creates a new instance of InputImage
  • Method Details

    • setAUTOEVENT

      public void setAUTOEVENT(String s)
      Sets the event associated to the field, triggered when the user clicks on the input
      Parameters:
      s - A string that represents the name of the event associated to the field
    • setPATHSRCIMAGE

      public void setPATHSRCIMAGE(String s)
      Sets the path src of the image
      Parameters:
      s - A string containing the path src of the image
    • setVALUE

      public void setVALUE(String s)
      Description copied from class: Input
      Forcibly sets a value
      Overrides:
      setVALUE in class Input
      Parameters:
      s - The string that represent the value of the field
    • setSELECTED

      public void setSELECTED(String s)
      Defines if the image is the one selected or not.
      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
    • setCOLS

      public void setCOLS(String s)
      Sets the number of columns used to organize the image
      Parameters:
      s - The number of columns. The default value is 1.
    • setWIDTH

      public void setWIDTH(String s)
      Sets the width of the input image
      Parameters:
      s - The width
    • setHEIGHT

      public void setHEIGHT(String s)
      Sets the height of the input image
      Parameters:
      s - The height
    • setFILETYPE

      public void setFILETYPE(String s)
      Sets the file type of the image
      Parameters:
      s - The string with the extension
    • getEventButton

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

      protected String getImageList()
    • getContentHtml

      public org.apache.ecs.Element getContentHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. 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 handle of the generation
      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
    • addNonStandardAttributesOnIcon

      protected void addNonStandardAttributesOnIcon(IconHD i, boolean ro, boolean enabled, String valueimage, String sJavaScrOnClick)
    • getGenerationHandle

      public Object getGenerationHandle()
      Description copied from class: Input
      Implements the interface Arrangeable
      Specified by:
      getGenerationHandle in interface Arrangeable
      Overrides:
      getGenerationHandle in class Input
      Returns:
      null
    • getDescriptionHtml

      public org.apache.ecs.Element getDescriptionHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the html code that represents the component description i.e. the formatted label of the field
      Specified by:
      getDescriptionHtml in interface Arrangeable
      Overrides:
      getDescriptionHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the label, or null if the field don't have it or is hidden
    • getHiddenHtml

      public org.apache.ecs.Element getHiddenHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the hidden but active html part of an hidden input field.
      Specified by:
      getHiddenHtml in interface Arrangeable
      Overrides:
      getHiddenHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      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.
    • 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
    • getValueImage

      protected String getValueImage()
    • getDefaultSrcImage

      protected String getDefaultSrcImage()
    • getSrcImageFromValue

      protected String getSrcImageFromValue(String value, String def)
    • validate

      protected void validate(org.apache.ecs.html.Input hi, String inputid, EntitySet es, boolean ro)
    • getInput

      protected org.apache.ecs.html.Input getInput(String sName, String sValue)
    • isSelected

      protected boolean isSelected(String sCurrentValue, boolean oldSelection, String sName)
    • buildDisplayScript

      public void buildDisplayScript(StringBuilder sb)
      Description copied from class: Input
      Every 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:
      buildDisplayScript in class Input
      Parameters:
      sb - The StringBuilder on which we want to add the script