Class JsonDisplay

    • Field Detail

      • m_Tree

        protected JsonSupporter m_Tree
        the tree displaying the JSON object.
      • m_Preview

        protected boolean m_Preview
        whether to offer preview.
      • m_Expand

        protected boolean m_Expand
        whether to fully expand the tree.
      • m_SortKeys

        protected boolean m_SortKeys
        whether to sort the keys of JSONObject objects.
    • Constructor Detail

      • JsonDisplay

        public JsonDisplay()
    • Method Detail

      • setPreview

        public void setPreview​(boolean value)
        Sets whether to show a preview text area.
        Parameters:
        value - if true then text area is displayed
      • getPreview

        public boolean getPreview()
        Returns whether to show a preview text area.
        Returns:
        true if text area is displayed
      • previewTipText

        public String previewTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setExpand

        public void setExpand​(boolean value)
        Sets whether to fully expand the tree or not.
        Parameters:
        value - if true then the tree gets fully expanded
      • getExpand

        public boolean getExpand()
        Returns whether to fully expand the tree or not.
        Returns:
        true if text area is displayed
      • expandTipText

        public String expandTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSortKeys

        public void setSortKeys​(boolean value)
        Sets whether to sort the keys of JSONObject objects.
        Parameters:
        value - if true then keys get sorted
      • getSortKeys

        public boolean getSortKeys()
        Returns whether to sort the keys of JSONObject objects.
        Returns:
        true if keys get sorted
      • sortKeysTipText

        public String sortKeysTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        the Class of objects that can be processed
      • display

        protected void display​(Token token)
        Displays the token (the panel and dialog have already been created at this stage).
        Specified by:
        display in class AbstractDisplay
        Parameters:
        token - the token to display
      • createDisplayPanel

        public DisplayPanel createDisplayPanel​(Token token)
        Creates a new display panel for the token.
        Specified by:
        createDisplayPanel in interface DisplayPanelProvider
        Parameters:
        token - the token to display in a new panel, can be null
        Returns:
        the generated panel
      • displayPanelRequiresScrollPane

        public boolean displayPanelRequiresScrollPane()
        Returns whether the created display panel requires a scroll pane or not.
        Specified by:
        displayPanelRequiresScrollPane in interface DisplayPanelProvider
        Returns:
        true if the display panel requires a scroll pane