All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jetbrains.edu.coursecreator.ui.CreateCourseArchiveDialog Maven / Gradle / Ivy

Go to download

A packaging of the IntelliJ Community Edition course-creator library. This is release number 1 of trunk branch 142.

The newest version!
package com.jetbrains.edu.coursecreator.ui;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.jetbrains.edu.coursecreator.actions.CCCreateCourseArchive;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

public class CreateCourseArchiveDialog extends DialogWrapper {

  private CreateCourseArchivePanel myPanel;
  private CCCreateCourseArchive myAction;

  public CreateCourseArchiveDialog(@NotNull final  Project project, CCCreateCourseArchive 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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy