Class 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

@Component public class InputCode extends InputText
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:
  • Java
  • Javascript
  • Css/Scss
  • XML
  • HTML
  • SQL
  • Properties
See Also:
  • Field Details

    • syntax

      protected String 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

      public String getSyntax()
      Gets the programming language with which editor will works.
      Returns:
      the programming language with which editor will works.
    • setSYNTAX

      public void setSYNTAX(String syntax)
      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:
      true editor use the autocompletion feature, false otherwise.
    • setAUTOCOMPLETION

      public void setAUTOCOMPLETION(String s)
      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 - true to use the autocompletion feature, false otherwise
    • getHeight

      public int getHeight()
      Gets the height of the component.
      Returns:
      the height of the component.
    • setHEIGHT

      public void setHEIGHT(String s)
      Sets the height of the component.
      Parameters:
      s - the height of the component.
    • setLINENUMBERS

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

      public void setWIDTH(String s)
      Sets the width of the component.
      Parameters:
      s - the width of the component.
    • setup

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

      public org.apache.ecs.Element getHtml(EntitySet es)
      Returns the html of the Input element
      Overrides:
      getHtml in class Input
      Parameters:
      es - The EntitySet
      Returns:
      The html of the Input element
    • 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