package jp.sourceforge.acerola3d.a3editor;

import java.awt.event.*;
import javax.swing.*;

class A3eDirButton extends JButton implements ActionListener {
    private static final long serialVersionUID = 1L;
    A3eFileManagerGUI fileManagerGUI;
    A3eFile file;
    A3eDirButton(A3eFile f,A3eFileManagerGUI fmGUI) {
        super(f.name.equals("")?"[root]":f.name);
        fileManagerGUI = fmGUI;
        file = f;
        this.addActionListener(this);
    }

    public void actionPerformed(ActionEvent e) {
        fileManagerGUI.currentDir=file;
        fileManagerGUI.refresh();
    }
}
