Class JsonTreeWithPreview

    • Field Detail

      • m_SplitPane

        protected BaseSplitPane m_SplitPane
        the split pane.
      • m_Tree

        protected JsonTree m_Tree
        the JSON tree.
      • m_TextArea

        protected BaseTextArea m_TextArea
        the preview.
      • m_ButtonCopy

        protected BaseButton m_ButtonCopy
        the button for copying.
    • Constructor Detail

      • JsonTreeWithPreview

        public JsonTreeWithPreview()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • finishInit

        protected void finishInit()
        Finalizes the initialization.
        Overrides:
        finishInit in class BasePanel
      • getTree

        public JsonTree getTree()
        Returns the underlying tree.
        Returns:
        the tree
      • getTextArea

        public BaseTextArea getTextArea()
        Returns the underlying text area.
        Returns:
        the text area
      • setJSON

        public void setJSON​(net.minidev.json.JSONAware value)
        Sets the JSON object to display.
        Specified by:
        setJSON in interface JsonSupporter
        Parameters:
        value - the JSON object to display
      • getJSON

        public net.minidev.json.JSONAware getJSON()
        Returns the JSON object on display.
        Specified by:
        getJSON in interface JsonSupporter
        Returns:
        the JSON object, null if none displayed
      • updateButtons

        protected void updateButtons()
        Updates the enabled state of the buttons.
      • setSortKeys

        public void setSortKeys​(boolean value)
        Sets whether to sort the keys of JSONObject objects. Triggers a re-build of the tree.
        Parameters:
        value - true if to sort the keys
      • getSortKeys

        public boolean getSortKeys()
        Returns whether the keys of JSONObject objects are sorted.
        Returns:
        true if keys get sorted