All Implemented Interfaces:
Serializable, overit.geocall.clipboard.XClip, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, AjaxableComponent, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

@Component public class TemplateJsonTreeEditor extends TreeEditor
Builder responsible for design the html tree view of the data collection node
Since:
19.0
See Also:
GCApi:
component
  • Constructor Details

    • TemplateJsonTreeEditor

      public TemplateJsonTreeEditor()
  • Method Details

    • onOpen

      public void onOpen(Object o)
      Method init tree without anything
      Overrides:
      onOpen in class TreeEditor
      Parameters:
      o - the Object
    • getNewNode

      public Tree getNewNode()
      Method to get a new template json tree
      Overrides:
      getNewNode in class TreeEditor
      Returns:
      return a tree , a new template json treee
    • fillNode

      protected void fillNode(Tree tree, org.apache.ecs.html.Div d)
      Method handler to design html tree view using TemplateHtmlJsonTree.
      Overrides:
      fillNode in class TreeEditor
      Parameters:
      tree - the TemplateJsonTree
    • setBorder

      protected void setBorder(boolean isSelected, org.apache.ecs.html.Div div)
      Method to set the border according the node is selected or not * @param isSelected the
      invalid reference
      boolean
      * @param div the Div
    • buildDescription

      protected void buildDescription(Tree tree, org.apache.ecs.html.Div div)
      Method to add the description to the node
      Parameters:
      tree - the Tree
      div - the Div
    • getOriginalDescription

      protected String getOriginalDescription(String originalDescription)
      Method to create a new Div with the color set in the color properties of the node
      Parameters:
      originalDescription - the String
      Returns:
      the string with br according to the length of the text
    • getColorWrapper

      protected org.apache.ecs.html.Div getColorWrapper(Tree tree, org.apache.ecs.html.Div div)
      Method to create a new Dib with the color set in the color properties of the node
      Parameters:
      tree - the Tree
      div - the Div
      Returns:
      the div with the style and color by node type
    • buildType

      protected void buildType(Tree tree, org.apache.ecs.html.Div div)
      Method to add the icon a text by the node type
      Parameters:
      tree - the Tree
      div - the Div
    • buildCode

      protected void buildCode(Tree tree, org.apache.ecs.html.Div div)
      Method to add a new node by a code string
      Parameters:
      tree - the Tree
      div - the Div
    • buildTextWithBr

      protected String buildTextWithBr(String label, String value)
      Method to add a
      Parameters:
      label - the String
      value - the String
    • addCustomNodeInfo

      protected void addCustomNodeInfo(TemplateJsonTree tree, org.apache.ecs.html.Div div)
      Method to add custom info in each node
      Parameters:
      tree - the TemplateJsonTree
      div - the Div
    • onSelectHtmlTreeNode

      public boolean onSelectHtmlTreeNode(UIMessage uim)
      UI event handler to select a node in the tree view
      Parameters:
      uim - the UIMessage
      Returns:
      false to propagate the responsibility chain.
    • unSelectAllTree

      protected void unSelectAllTree(TemplateJsonTree tree)
      Method that clean all selections in the tree model
      Parameters:
      tree - the TemplateJsonTree
    • setOnClickNodeAction

      protected void setOnClickNodeAction(Tree t, org.apache.ecs.html.Div d)
      Method that add the event SelectHtmlTreeNode (onClick) in each node
      Parameters:
      t - the TemplateJsonTree
      d - the Div