class TreeStatusPane implements TreeSelectionListener
{
    private TreeStatus statusObj;
    private final JTree tree;

    private JTextField statusField;
    private JPanel panel;
    private Border defaultBorder;
    private Border errorBorder;
    private final Action textInputAction = new AbstractAction()
    {
        private static final long serialVersionUID = 3547209849264145654L;

        @Override
        public void actionPerformed(ActionEvent actionEvent)
        {
            TreePath path = statusObj.getPathForString(statusField.getText());
            if (path != null)
            {
                tree.setSelectionPath(path);
                tree.scrollPathToVisible(path);
                tree.requestFocusInWindow();
            }
            else
            {
                statusField.setBorder(errorBorder);
            }
        }
    };

    /**
     * Constructor.
     * @param targetTree The tree instance that this status pane will correspond.
     */
    public TreeStatusPane(JTree targetTree)
    {
        tree = targetTree;
        init();
    }

    private void init()
    {<FILL_FUNCTION_BODY>}

    /**
     * Return the panel of this TreeStatusPane.
     * @return JPanel instance.
     */
    public JPanel getPanel()
    {
        return panel;
    }

    /**
     * In case of document changing this should be called to update TreeStatus value of the pane.
     * @param statusObj TreeStatus instance.
     */
    public void updateTreeStatus(TreeStatus statusObj)
    {
        statusField.setEditable(true);
        this.statusObj = statusObj;
        updateText(null);
    }

    private void updateText(String statusString)
    {
        statusField.setText(statusString);
        if (!statusField.getBorder().equals(defaultBorder))
        {
            statusField.setBorder(defaultBorder);
        }
    }

    /**
     * Tree selection change listener which updates status string.
     * 
     * @param treeSelectionEvent the selection event
     */

    @Override
    public void valueChanged(TreeSelectionEvent treeSelectionEvent)
    {
        TreePath path = treeSelectionEvent.getPath();
        updateText(statusObj.getStringForPath(path));
    }
}

        panel = new JPanel(new BorderLayout());
        statusField = new JTextField();
        statusField.setEditable(false);
        int treePathFontHeight = Integer.parseInt(PDFDebugger.configuration.getProperty(
                                    "treePathFontHeight", Integer.toString(statusField.getFont().getSize())));
        statusField.setFont(statusField.getFont().deriveFont((float) treePathFontHeight));
        panel.add(statusField);
        defaultBorder = new BevelBorder(BevelBorder.LOWERED);
        errorBorder = new BevelBorder(BevelBorder.LOWERED, Color.RED, Color.RED);
        statusField.setAction(textInputAction);
        tree.addTreeSelectionListener(this);
    
<no_super_class>