Class NestedFormatViewerPanel.Renderer

    • Constructor Detail

      • Renderer

        public Renderer()
        Initializes the renderer.
    • Method Detail

      • getIcon

        protected ImageIcon getIcon​(String classname)
        Tries to obtain the icon for the given class.
        Parameters:
        classname - the class to obtain an icon for
        Returns:
        the associated icon or null if not found
      • 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