2024-10-14 11:48:44 +03:00
|
|
|
package _VisualDVM.Visual.Windows;
|
2024-10-09 20:35:18 +03:00
|
|
|
import Common.Visual.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;
|
2024-10-13 22:08:13 +03:00
|
|
|
import _VisualDVM.Global;
|
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() {
|
2024-10-13 22:08:13 +03:00
|
|
|
tfName.setText(Global.mainModule.getProject().name + "_copy");
|
2023-09-17 22:13:42 +03:00
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|