summaryrefslogtreecommitdiff
path: root/java/idea-ui
diff options
context:
space:
mode:
Diffstat (limited to 'java/idea-ui')
-rw-r--r--java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FacetLibrariesValidatorImpl.java3
-rw-r--r--java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FrameworkLibraryValidatorImpl.java4
-rw-r--r--java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTemplateList.java21
-rw-r--r--java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTypeStep.java10
-rw-r--r--java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java19
-rw-r--r--java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectTypesList.java10
-rw-r--r--java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java2
-rw-r--r--java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java18
8 files changed, 42 insertions, 45 deletions
diff --git a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FacetLibrariesValidatorImpl.java b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FacetLibrariesValidatorImpl.java
index 63ba7def99d5..bb5735d109e0 100644
--- a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FacetLibrariesValidatorImpl.java
+++ b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FacetLibrariesValidatorImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,6 +72,7 @@ public class FacetLibrariesValidatorImpl extends FacetLibrariesValidator {
onChange();
}
+ @NotNull
public ValidationResult check() {
if (myRequiredLibraries == null) {
return ValidationResult.OK;
diff --git a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FrameworkLibraryValidatorImpl.java b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FrameworkLibraryValidatorImpl.java
index be22534d2754..36a77fc7e18a 100644
--- a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FrameworkLibraryValidatorImpl.java
+++ b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/FrameworkLibraryValidatorImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescri
import com.intellij.openapi.roots.ui.configuration.libraries.LibraryPresentationManager;
import com.intellij.openapi.util.Ref;
import com.intellij.util.Processor;
+import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.util.Set;
@@ -50,6 +51,7 @@ public class FrameworkLibraryValidatorImpl extends FrameworkLibraryValidator {
myLibraryCategoryName = libraryCategoryName;
}
+ @NotNull
@Override
public ValidationResult check() {
final Set<? extends LibraryKind> libraryKinds = myLibraryDescription.getSuitableLibraryKinds();
diff --git a/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTemplateList.java b/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTemplateList.java
index 57918b1843d1..be586661f0d3 100644
--- a/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTemplateList.java
+++ b/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTemplateList.java
@@ -17,7 +17,7 @@ package com.intellij.ide.projectWizard;
import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.ui.Messages;
-import com.intellij.openapi.ui.popup.ListItemDescriptor;
+import com.intellij.openapi.ui.popup.ListItemDescriptorAdapter;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.IconLoader;
@@ -57,7 +57,7 @@ public class ProjectTemplateList extends JPanel {
super(new BorderLayout());
add(myPanel, BorderLayout.CENTER);
- GroupedItemsListRenderer renderer = new GroupedItemsListRenderer(new ListItemDescriptor<ProjectTemplate>() {
+ GroupedItemsListRenderer renderer = new GroupedItemsListRenderer(new ListItemDescriptorAdapter<ProjectTemplate>() {
@Nullable
@Override
public String getTextFor(ProjectTemplate value) {
@@ -66,26 +66,9 @@ public class ProjectTemplateList extends JPanel {
@Nullable
@Override
- public String getTooltipFor(ProjectTemplate value) {
- return null;
- }
-
- @Nullable
- @Override
public Icon getIconFor(ProjectTemplate value) {
return value.getIcon();
}
-
- @Override
- public boolean hasSeparatorAboveOf(ProjectTemplate value) {
- return false;
- }
-
- @Nullable
- @Override
- public String getCaptionAboveOf(ProjectTemplate value) {
- return null;
- }
}) {
@Override
diff --git a/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTypeStep.java b/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTypeStep.java
index 8fca04c7aa69..10e11f74077f 100644
--- a/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTypeStep.java
+++ b/java/idea-ui/src/com/intellij/ide/projectWizard/ProjectTypeStep.java
@@ -42,7 +42,7 @@ import com.intellij.openapi.roots.ui.configuration.ModulesProvider;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory;
import com.intellij.openapi.ui.Messages;
-import com.intellij.openapi.ui.popup.ListItemDescriptor;
+import com.intellij.openapi.ui.popup.ListItemDescriptorAdapter;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.Disposer;
@@ -143,7 +143,7 @@ public class ProjectTypeStep extends ModuleWizardStep implements SettingsStep, D
updateSelection();
}
});
- myProjectTypeList.setCellRenderer(new GroupedItemsListRenderer(new ListItemDescriptor<TemplatesGroup>() {
+ myProjectTypeList.setCellRenderer(new GroupedItemsListRenderer(new ListItemDescriptorAdapter<TemplatesGroup>() {
@Nullable
@Override
public String getTextFor(TemplatesGroup value) {
@@ -171,12 +171,6 @@ public class ProjectTypeStep extends ModuleWizardStep implements SettingsStep, D
return !Comparing.equal(upper.getParentGroup(), value.getParentGroup()) &&
!Comparing.equal(upper.getName(), value.getParentGroup());
}
-
- @Nullable
- @Override
- public String getCaptionAboveOf(TemplatesGroup value) {
- return null;
- }
}) {
@Override
protected JComponent createItemComponent() {
diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java
index 72e793e53903..2fee50a4301b 100644
--- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java
+++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/FrameworkSupportNodeBase.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2000-2014 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.intellij.ide.util.newProjectWizard;
import com.intellij.framework.FrameworkOrGroup;
@@ -47,7 +62,7 @@ public abstract class FrameworkSupportNodeBase<T extends FrameworkOrGroup> exten
}
});
for (FrameworkSupportNodeBase node : nodes) {
- sortByName(node.children, null);
+ sortByName((List)node.children, null);
}
}
@@ -68,7 +83,7 @@ public abstract class FrameworkSupportNodeBase<T extends FrameworkOrGroup> exten
@NotNull
public List<FrameworkSupportNodeBase> getChildren() {
- return children != null ? children : Collections.<FrameworkSupportNodeBase>emptyList();
+ return children != null ? (List)children : Collections.<FrameworkSupportNodeBase>emptyList();
}
public FrameworkSupportNodeBase getParentNode() {
diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectTypesList.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectTypesList.java
index 2872e0deff50..7a502443fcdb 100644
--- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectTypesList.java
+++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectTypesList.java
@@ -23,7 +23,7 @@ import com.intellij.openapi.actionSystem.CustomShortcutSet;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
-import com.intellij.openapi.ui.popup.ListItemDescriptor;
+import com.intellij.openapi.ui.popup.ListItemDescriptorAdapter;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.platform.ProjectTemplate;
@@ -114,7 +114,7 @@ public class ProjectTypesList implements Disposable {
}
});
- myList.setCellRenderer(new GroupedItemsListRenderer(new ListItemDescriptor() {
+ myList.setCellRenderer(new GroupedItemsListRenderer(new ListItemDescriptorAdapter() {
@Nullable
@Override
public String getTextFor(Object value) {
@@ -123,12 +123,6 @@ public class ProjectTypesList implements Disposable {
@Nullable
@Override
- public String getTooltipFor(Object value) {
- return null;
- }
-
- @Nullable
- @Override
public Icon getIconFor(Object value) {
return ((TemplateItem)value).getIcon();
}
diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java
index f24153739031..7554019e5473 100644
--- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java
+++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java
@@ -64,6 +64,8 @@ public class ProjectJdksConfigurable extends MasterDetailsComponent {
myProject = project;
myProjectJdksModel = sdksModel;
initTree();
+ myToReInitWholePanel = true;
+ reInitWholePanelIfNeeded();
}
@Override
diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java
index 355888b02a42..abe085cca457 100644
--- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java
+++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/SidePanel.java
@@ -20,10 +20,7 @@ import com.intellij.openapi.ui.GraphicsConfig;
import com.intellij.openapi.ui.popup.ListItemDescriptor;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.ui.Gray;
-import com.intellij.ui.JBColor;
-import com.intellij.ui.ScrollPaneFactory;
-import com.intellij.ui.SeparatorWithText;
+import com.intellij.ui.*;
import com.intellij.ui.components.JBList;
import com.intellij.ui.components.panels.NonOpaquePanel;
import com.intellij.ui.navigation.History;
@@ -118,9 +115,18 @@ public class SidePanel extends JPanel {
@Override
protected void paintComponent(Graphics g) {
if (Registry.is("ide.new.project.settings")) {
- g.setColor(new JBColor(POPUP_SEPARATOR_FOREGROUND, Gray._80));
+ final JBColor separatorColor = new JBColor(POPUP_SEPARATOR_FOREGROUND, Gray._80);
+ g.setColor(separatorColor);
if ("--".equals(getCaption())) {
- g.drawLine(0, getHeight()/ 2, getWidth(), getHeight() /2);
+ final GraphicsConfig config = GraphicsUtil.setupAAPainting(g);
+ final int h = getHeight() / 2;
+ g.drawLine(30, h, getWidth() - 30, h);
+ ((Graphics2D)g).setPaint(new GradientPaint(5, h, ColorUtil.toAlpha(separatorColor, 0), 30, h, separatorColor));
+ g.drawLine(5, h, 30, h);
+ ((Graphics2D)g).setPaint(
+ new GradientPaint(getWidth() - 5, h, ColorUtil.toAlpha(separatorColor, 0), getWidth() - 30, h, separatorColor));
+ g.drawLine(getWidth() - 5, h, getWidth() - 30, h);
+ config.restore();
return;
}
Rectangle viewR = new Rectangle(0, getVgap(), getWidth() - 1, getHeight() - getVgap() - 1);