Class StanfordRenderer

    • Field Detail

      • m_IconObject

        protected Icon m_IconObject
        the icon for JSON objects.
      • m_IconArray

        protected Icon m_IconArray
        the icon for JSON arrays.
      • m_IconOther

        protected Icon m_IconOther
        the icon for other objects.
      • m_IconNum

        protected Icon m_IconNum
        the icon for other numbers.
      • m_IconStr

        protected Icon m_IconStr
        the icon for other strings.
      • m_IconBool

        protected Icon m_IconBool
        the icon for other booleans.
    • Constructor Detail

      • StanfordRenderer

        public StanfordRenderer()
        Initializes the renderer.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
      • getTreeCellRendererComponent

        public Component getTreeCellRendererComponent​(JTree tree,
                                                      Object value,
                                                      boolean sel,
                                                      boolean expanded,
                                                      boolean leaf,
                                                      int row,
                                                      boolean hasFocus)
        For rendering the cell.
        Specified by:
        getTreeCellRendererComponent in interface TreeCellRenderer
        Overrides:
        getTreeCellRendererComponent in class DefaultTreeCellRenderer
        Parameters:
        tree - the tree
        value - the node
        sel - whether the element is selected
        expanded - whether the node is expanded
        leaf - whether the node is a leaf
        row - the row in the tree
        hasFocus - whether the node is focused
        Returns:
        the rendering component