diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java index dbe5d13a980b..d78a589e7ab3 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -48,6 +48,7 @@ import com.intellij.ui.SideBorder; import com.intellij.ui.components.JBScrollPane; import com.intellij.util.Consumer; import com.intellij.util.containers.HashMap; +import com.intellij.util.ui.GraphicsUtil; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -162,7 +163,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr @Override protected void paintComponent(Graphics g) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); super.paintComponent(g); } }; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java index 47a5c901cb7e..95ab479bd92d 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -20,7 +20,6 @@ import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupElementPresentation; import com.intellij.codeInsight.lookup.LookupValueWithUIHint; import com.intellij.codeInsight.lookup.RealLookupElementPresentation; -import com.intellij.ide.ui.UISettings; import com.intellij.openapi.editor.colors.EditorColorsScheme; import com.intellij.openapi.editor.colors.EditorFontType; import com.intellij.openapi.util.TextRange; @@ -32,6 +31,7 @@ import com.intellij.ui.SimpleColoredComponent; import com.intellij.ui.SimpleTextAttributes; import com.intellij.ui.speedSearch.SpeedSearchUtil; import com.intellij.util.ui.EmptyIcon; +import com.intellij.util.ui.GraphicsUtil; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -331,7 +331,7 @@ public class LookupCellRenderer implements ListCellRenderer { @Override protected void applyAdditionalHints(Graphics g) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); } } diff --git a/platform/lang-impl/src/com/intellij/find/editorHeaderActions/VariantsCompletionAction.java b/platform/lang-impl/src/com/intellij/find/editorHeaderActions/VariantsCompletionAction.java index d5440bfa5a03..2e99826284fc 100644 --- a/platform/lang-impl/src/com/intellij/find/editorHeaderActions/VariantsCompletionAction.java +++ b/platform/lang-impl/src/com/intellij/find/editorHeaderActions/VariantsCompletionAction.java @@ -1,8 +1,22 @@ +/* + * Copyright 2000-2012 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.find.editorHeaderActions; import com.intellij.featureStatistics.FeatureUsageTracker; import com.intellij.find.EditorSearchComponent; -import com.intellij.ide.ui.UISettings; import com.intellij.openapi.actionSystem.ActionManager; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -16,6 +30,7 @@ import com.intellij.psi.impl.cache.impl.id.IdTableBuilding; import com.intellij.ui.components.JBList; import com.intellij.util.ArrayUtil; import com.intellij.util.text.Matcher; +import com.intellij.util.ui.GraphicsUtil; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -60,7 +75,7 @@ public class VariantsCompletionAction extends AnAction { final JList list = new JBList(array) { @Override protected void paintComponent(final Graphics g) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); super.paintComponent(g); } }; diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index c61365ea1ade..2c6a2efee411 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -22,7 +22,6 @@ import com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl; import com.intellij.find.findUsages.PsiElement2UsageTargetAdapter; import com.intellij.ide.IdeBundle; import com.intellij.ide.actions.CopyReferenceAction; -import com.intellij.ide.ui.UISettings; import com.intellij.openapi.Disposable; import com.intellij.openapi.MnemonicHelper; import com.intellij.openapi.actionSystem.*; @@ -68,6 +67,7 @@ import com.intellij.util.text.Matcher; import com.intellij.util.text.MatcherHolder; import com.intellij.util.ui.AsyncProcessIcon; import com.intellij.util.ui.EmptyIcon; +import com.intellij.util.ui.GraphicsUtil; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -1301,7 +1301,7 @@ public abstract class ChooseByNameBase { } protected void paintComponent(final Graphics g) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); super.paintComponent(g); } diff --git a/platform/platform-api/src/com/intellij/ui/table/JBTable.java b/platform/platform-api/src/com/intellij/ui/table/JBTable.java index 48d2e4a2fce1..b1b259be43b0 100644 --- a/platform/platform-api/src/com/intellij/ui/table/JBTable.java +++ b/platform/platform-api/src/com/intellij/ui/table/JBTable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -16,7 +16,6 @@ package com.intellij.ui.table; import com.intellij.Patches; -import com.intellij.ide.ui.UISettings; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.wm.IdeFocusManager; import com.intellij.ui.ComponentWithExpandableItems; @@ -192,7 +191,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component @Override public void paint(Graphics g) { if (myEnableAntialiasing) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); } super.paint(g); } @@ -251,7 +250,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component @Override protected void paintComponent(Graphics g) { if (myEnableAntialiasing) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); } super.paintComponent(g); myEmptyText.paint(this, g); @@ -260,7 +259,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component @Override protected void paintChildren(Graphics g) { if (myEnableAntialiasing) { - UISettings.setupAntialiasing(g); + GraphicsUtil.setupAntialiasing(g); } super.paintChildren(g); } diff --git a/platform/platform-impl/src/com/intellij/help/impl/IdeaHelpContentViewUI.java b/platform/platform-impl/src/com/intellij/help/impl/IdeaHelpContentViewUI.java index d8fa6efcd2a7..53ef59036659 100644 --- a/platform/platform-impl/src/com/intellij/help/impl/IdeaHelpContentViewUI.java +++ b/platform/platform-impl/src/com/intellij/help/impl/IdeaHelpContentViewUI.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -16,11 +16,13 @@ package com.intellij.help.impl; import com.intellij.ide.BrowserUtil; +import com.intellij.util.ui.GraphicsUtil; import javax.help.JHelpContentViewer; import javax.help.plaf.basic.BasicContentViewerUI; import javax.swing.*; import javax.swing.plaf.ComponentUI; +import java.awt.*; import java.net.URL; /** @@ -44,8 +46,14 @@ class IdeaHelpContentViewUI extends BasicContentViewerUI{ String url=u.toExternalForm(); if(url.startsWith("http") || url.startsWith("ftp")){ BrowserUtil.launchBrowser(url); - }else{ + } else{ super.linkActivated(u); } } + + @Override + public void paint(Graphics g, JComponent c) { + GraphicsUtil.setupAntialiasing(g); + super.paint(g, c); + } } diff --git a/platform/platform-impl/src/com/intellij/help/impl/IdeaJHelpContentViewer.java b/platform/platform-impl/src/com/intellij/help/impl/IdeaJHelpContentViewer.java index 983211b814db..720a3e07d116 100644 --- a/platform/platform-impl/src/com/intellij/help/impl/IdeaJHelpContentViewer.java +++ b/platform/platform-impl/src/com/intellij/help/impl/IdeaJHelpContentViewer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 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. @@ -15,14 +15,8 @@ */ package com.intellij.help.impl; -import com.intellij.ide.ui.UISettings; -import com.intellij.util.ui.UIUtil; -import sun.swing.SwingUtilities2; - import javax.help.JHelpContentViewer; import javax.help.TextHelpModel; -import javax.swing.*; -import java.awt.*; /** * It a dirty patch! Help system is so ugly that it hangs when it open some "external" links. @@ -49,14 +43,4 @@ class IdeaJHelpContentViewer extends JHelpContentViewer{ setUI(new IdeaHelpContentViewUI(this)); invalidate(); } - - @Override - public void paint(Graphics g) { - final JEditorPane editorPane = UIUtil.findComponentOfType(this, JEditorPane.class); - if (editorPane != null) { - editorPane.putClientProperty(SwingUtilities2.AA_TEXT_PROPERTY_KEY, SwingUtilities2.AATextInfo.getAATextInfo(true)); - } - UISettings.setupAntialiasing(g); - super.paint(g); - } } \ No newline at end of file