package _VisualDVM.GlobalData.RemoteFile.UI;
import Common.Visual.Trees.TreeForm;
import Common.Visual.Windows.Dialog.DialogFields;
import _VisualDVM.Global;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class RemoteFileChooserFields implements DialogFields {
    public JPanel MainPanel;
    public JLabel lCurrentFolder;
    public JLabel lCurrentFile;
    public TreeForm treeForm;
    private JPanel TreePanel;
    private JButton bBack;
    private JButton bHome;
    public RemoteFileChooserFields() {
        treeForm = new TreeForm(RemoteFilesTree.class, TreePanel);
        bBack.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Global.mainModule.getUI().getRemoteFileChooser().goUp();
            }
        });
        bHome.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Global.mainModule.getUI().getRemoteFileChooser().goHome();
            }
        });
    }
    private void createUIComponents() {
        // TODO: place custom component creation code here
    }
    @Override
    public Component getContent() {
        return MainPanel;
    }
}
