2023-11-19 02:12:44 +03:00
|
|
|
package Visual_DVM_2021.Passes.UI;
|
2024-10-07 00:58:29 +03:00
|
|
|
import Common_old.Current;
|
|
|
|
|
import Common_old.UI.TextField.StyledTextField;
|
2024-10-08 22:33:49 +03:00
|
|
|
import Common.Visual.Windows.Dialog.DialogFields;
|
2024-10-08 23:45:06 +03:00
|
|
|
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
|
|
|
|
import javax.swing.*;
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
|
import java.awt.event.ActionListener;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
public class CopyProjectFields implements DialogFields {
|
|
|
|
|
public JTextField tfParent;
|
|
|
|
|
public JTextField tfName;
|
|
|
|
|
public JCheckBox MigrateData;
|
|
|
|
|
VDirectoryChooser directoryChooser = new VDirectoryChooser("Выбор целевой папки для копии проекта");
|
|
|
|
|
private JPanel content;
|
|
|
|
|
private JButton bBrowse;
|
|
|
|
|
public CopyProjectFields() {
|
|
|
|
|
tfName.setText(Current.getProject().name + "_copy");
|
|
|
|
|
bBrowse.addActionListener(new ActionListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
|
File file = directoryChooser.ShowDialog();
|
|
|
|
|
if (file != null)
|
|
|
|
|
tfParent.setText(file.getAbsolutePath());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public Component getContent() {
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
private void createUIComponents() {
|
|
|
|
|
// TODO: place custom component creation code here
|
|
|
|
|
tfParent = new StyledTextField();
|
|
|
|
|
tfName = new StyledTextField();
|
|
|
|
|
}
|
|
|
|
|
}
|