update copyright
[fedora-idea.git] / java / idea-ui / src / com / intellij / openapi / roots / ui / configuration / ContentEntriesEditor.java
blob3bc48aa59d46867dcbfcbb4b2c7b99dd24ba04d7
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.
16 package com.intellij.openapi.roots.ui.configuration;
18 import com.intellij.openapi.options.ConfigurationException;
19 import com.intellij.openapi.project.Project;
20 import com.intellij.openapi.roots.ModifiableRootModel;
22 import javax.swing.*;
23 import java.awt.*;
25 /**
26 * @author Eugene Zhuravlev
27 * Date: Oct 4, 2003
28 * Time: 6:54:57 PM
30 public class ContentEntriesEditor extends JavaContentEntriesEditor {
31 private LanguageLevelConfigurable myLanguageLevelConfigurable;
33 public ContentEntriesEditor(Project project, String moduleName, ModifiableRootModel model, ModulesProvider modulesProvider) {
34 super(project, moduleName, model, modulesProvider);
37 public void disposeUIResources() {
38 myLanguageLevelConfigurable.disposeUIResources();
39 super.disposeUIResources();
42 public boolean isModified() {
43 return super.isModified() || myLanguageLevelConfigurable != null && myLanguageLevelConfigurable.isModified();
46 protected void addAdditionalSettingsToPanel(final JPanel mainPanel) {
47 myLanguageLevelConfigurable = new LanguageLevelConfigurable(myModel);
48 mainPanel.add(myLanguageLevelConfigurable.createComponent(), BorderLayout.NORTH);
49 myLanguageLevelConfigurable.reset();
52 public void apply() throws ConfigurationException {
53 myLanguageLevelConfigurable.apply();
54 super.apply();