update copyright
[fedora-idea.git] / java / idea-ui / src / com / intellij / projectImport / ProjectFormatPanel.java
blob9be5e895ef4a08a79361e867391f52823d65d67b
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * User: anna
19 * Date: 09-Feb-2009
21 package com.intellij.projectImport;
23 import com.intellij.ide.util.projectWizard.WizardContext;
24 import com.intellij.openapi.components.StorageScheme;
26 import javax.swing.*;
28 public class ProjectFormatPanel {
29 private static final String DIR_BASED = ".idea (directory based)";
30 private static final String FILE_BASED = ".ipr (file based)";
31 private JComboBox myStorageFormatCombo;
32 private JPanel myWholePanel;
34 public ProjectFormatPanel() {
35 myStorageFormatCombo.insertItemAt(DIR_BASED, 0);
36 myStorageFormatCombo.insertItemAt(FILE_BASED, 1);
37 myStorageFormatCombo.setSelectedItem(DIR_BASED);
41 public JPanel getPanel() {
42 return myWholePanel;
45 public JComboBox getStorageFormatComboBox() {
46 return myStorageFormatCombo;
49 public void updateData(WizardContext context) {
50 context.setProjectStorageFormat(
51 FILE_BASED.equals(myStorageFormatCombo.getSelectedItem()) ? StorageScheme.DEFAULT : StorageScheme.DIRECTORY_BASED);