blob: d6c3bdb24af3ebef0d70a8c40bf164843299b971 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package org.jetbrains.plugins.coursecreator.ui;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.coursecreator.actions.CreateCourseArchive;
import javax.swing.*;
public class CreateCourseArchiveDialog extends DialogWrapper {
private CreateCourseArchivePanel myPanel;
private CreateCourseArchive myAction;
public CreateCourseArchiveDialog(@NotNull final Project project, CreateCourseArchive action) {
super(project);
setTitle("Create Course Archive");
myPanel = new CreateCourseArchivePanel(project, this);
myAction = action;
init();
}
@Nullable
@Override
protected JComponent createCenterPanel() {
return myPanel;
}
public void enableOKAction(boolean isEnabled) {
myOKAction.setEnabled(isEnabled);
}
@Override
protected void doOKAction() {
myAction.setZipName(myPanel.getZipName());
myAction.setLocationDir(myPanel.getLocationPath());
super.doOKAction();
}
}
|