import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.PopupHandler;
import com.intellij.ui.ScrollPaneFactory;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.ArrayUtil;
import com.intellij.util.containers.HashSet;
import org.jetbrains.annotations.NonNls;
private final PaletteItemProvider[] myProviders;
private final MyPropertyChangeListener myPropertyChangeListener = new MyPropertyChangeListener();
private final Set<PaletteGroup> myGroups = new HashSet<PaletteGroup>();
- private final JTabbedPane myTabbedPane = new JTabbedPane();
+ private final JTabbedPane myTabbedPane = new JBTabbedPane();
private final JScrollPane myScrollPane = ScrollPaneFactory.createScrollPane();
private final MyListSelectionListener myListSelectionListener = new MyListSelectionListener();
private PaletteGroupHeader myLastFocusedGroup;
import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.FieldPanel;
import com.intellij.ui.IdeBorderFactory;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.IJSwingUtilities;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.containers.ContainerUtil;
super(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0),0,0 );
add(createAdditionalJavadocTagsPanel(), gc);
- JTabbedPane tabs = new JTabbedPane(SwingConstants.BOTTOM);
+ JTabbedPane tabs = new JBTabbedPane(SwingConstants.BOTTOM);
@NonNls String[] tags = new String[]{"@author", "@version", "@since", "@param"};
tabs.add(InspectionsBundle.message("inspection.javadoc.option.tab.title"), createOptionsPanel(new String[]{NONE, PUBLIC, PACKAGE_LOCAL},
tags,
import com.intellij.psi.codeStyle.CodeStyleSettingsProvider;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
if (myTabs == null) {
myPanel = new JPanel();
myPanel.setLayout(new BorderLayout());
- myTabbedPane = new JTabbedPane();
+ myTabbedPane = new JBTabbedPane();
myTabs = new ArrayList<CodeStyleAbstractPanel>();
myPanel.add(myTabbedPane);
initTabs(getSettings());
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable;
import com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.Function;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.containers.ContainerUtil;
@Override
protected void installPreviewPanel(final JPanel previewPanel) {
if (getSettingsType() != LanguageCodeStyleSettingsProvider.SettingsType.LANGUAGE_SPECIFIC) {
- tabbedPane = new JTabbedPane();
+ tabbedPane = new JBTabbedPane();
tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
Language[] langs = LanguageCodeStyleSettingsProvider.getLanguagesWithSharedPreview();
if (langs.length == 0) return;
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.execution.impl.ConfigurationSettingsEditorWrapper">
<grid id="27dc6" binding="myWholePanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="5" left="8" bottom="5" right="5"/>
+ <margin top="5" left="8" bottom="5" right="0"/>
<constraints>
<xy x="124" y="274" width="276" height="150"/>
</constraints>
<children/>
</xy>
<grid id="bb10e" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="5" left="8" bottom="5" right="5"/>
+ <margin top="5" left="8" bottom="5" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
package com.intellij.openapi.options;
import com.intellij.openapi.util.Pair;
+import com.intellij.ui.components.JBTabbedPane;
import javax.swing.*;
import java.awt.*;
if (editors.size() == 0) return new JPanel();
if (editors.size() == 1) return editors.get(0).getSecond().getComponent();
- JTabbedPane tabs = new JTabbedPane();
+ JTabbedPane tabs = new JBTabbedPane();
for (int i = 0; i < editors.size(); i++) {
Pair<String, SettingsEditor<T>> pair = editors.get(i);
JPanel panel = new JPanel(new BorderLayout());
--- /dev/null
+package com.intellij.ui.components;
+
+import com.intellij.util.ui.UIUtil;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import java.awt.*;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+import java.awt.event.HierarchyEvent;
+import java.awt.event.HierarchyListener;
+import java.util.Arrays;
+
+/**
+ * @author evgeny.zakrevsky
+ */
+public class JBTabbedPane extends JTabbedPane implements HierarchyListener {
+ public JBTabbedPane() {
+ }
+
+ public JBTabbedPane(int tabPlacement) {
+ super(tabPlacement);
+ }
+
+ public JBTabbedPane(int tabPlacement, int tabLayoutPolicy) {
+ super(tabPlacement, tabLayoutPolicy);
+ }
+
+ @Override
+ public void setComponentAt(int index, Component component) {
+ super.setComponentAt(index, component);
+ component.addHierarchyListener(this);
+ UIUtil.setNotOpaqueRecursively(component);
+ }
+
+ @Override
+ public void insertTab(String title, Icon icon, Component component, String tip, int index) {
+ super.insertTab(title, icon, component, tip, index);
+ component.addHierarchyListener(this);
+ UIUtil.setNotOpaqueRecursively(component);
+ }
+
+ @Override
+ public void hierarchyChanged(HierarchyEvent e) {
+ UIUtil.setNotOpaqueRecursively(e.getComponent());
+ }
+}
package com.intellij.ide.dnd;
import com.intellij.openapi.util.Pair;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.ui.treeStructure.Tree;
import org.jetbrains.annotations.Nullable;
}, source);
- JTabbedPane tabs = new JTabbedPane();
+ JTabbedPane tabs = new JBTabbedPane();
JPanel delegates = new JPanel(new FlowLayout());
final JLabel delegate1Label = new JLabel("Delegate 1");
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.ui.components.JBTabbedPane;
import org.jetbrains.annotations.NonNls;
import javax.swing.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-public class TabbedPaneImpl extends JTabbedPane implements TabbedPane {
+public class TabbedPaneImpl extends JBTabbedPane implements TabbedPane {
private static final Logger LOG = Logger.getInstance("#com.intellij.ui.TabbedPaneImpl");
}
}
}
+
+ public static void setNotOpaqueRecursively(Component component) {
+ if (component == null) return;
+ if (!isUnderAquaLookAndFeel()) return;
+
+ if (component.getBackground().equals(getPanelBackground()) || component instanceof JScrollPane || component instanceof JViewport) {
+ if (component instanceof JComponent) {
+ ((JComponent)component).setOpaque(false);
+ }
+ if (component instanceof Container) {
+ for (Component c : ((Container)component).getComponents()) {
+ setNotOpaqueRecursively(c);
+ }
+ }
+ }
+ }
+
}
import com.intellij.openapi.vcs.versionBrowser.DateFilterComponent;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.IdeBorderFactory;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.AsynchConsumer;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
VcsCommittedViewAuxiliary auxiliary = provider.createActions(manager, location);
if (auxiliary != null) {
if (tabbedPane == null) {
- tabbedPane = new JTabbedPane();
+ tabbedPane = new JBTabbedPane();
actions = new ArrayList<AnAction>();
toolbarActions = new ArrayList<AnAction>();
}
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.vcs.AbstractVcs;
import com.intellij.openapi.vcs.VcsBundle;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.ui.OptionsDialog;
import javax.swing.*;
myMainPanel.add(Box.createVerticalStrut(10), BorderLayout.SOUTH);
}
else {
- myMainPanel = new JTabbedPane();
+ myMainPanel = new JBTabbedPane();
final ArrayList<AbstractVcs> vcses = new ArrayList<AbstractVcs>(confs.values());
Collections.sort(vcses, new Comparator<AbstractVcs>() {
public int compare(final AbstractVcs o1, final AbstractVcs o2) {
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
+import com.intellij.ui.components.JBTabbedPane;
import com.intellij.util.containers.ContainerUtil;
import org.intellij.plugins.intelliLang.inject.LanguageInjectionSupport;
import org.jetbrains.annotations.NotNull;
SettingsUI(@NotNull final Project project, Configuration configuration) {
- myTabbedPane = new JTabbedPane(JTabbedPane.TOP);
+ myTabbedPane = new JBTabbedPane(JTabbedPane.TOP);
myRoot.add(myTabbedPane);
final ArrayList<Configurable> configurables = new ArrayList<Configurable>();
<text resource-bundle="messages/AndroidBundle" key="android.facet.editor.is.library.checkbox"/>
</properties>
</component>
- <tabbedpane id="bec33">
+ <tabbedpane id="bec33" class="com.intellij.ui.components.JBTabbedPane">
<constraints>
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
</grid>
</constraints>
</vspacer>
- <tabbedpane id="f3a" binding="myTabbedPane">
+ <tabbedpane id="f3a" class="com.intellij.ui.components.JBTabbedPane">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
<properties/>
<border type="none"/>
<children>
- <grid id="37ff8" layout-manager="GridLayoutManager" row-count="5" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+ <grid id="37ff8" layout-manager="GridLayoutManager" row-count="4" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="7" left="7" bottom="7" right="7"/>
<constraints>
<tabbedpane title-resource-bundle="messages/AndroidBundle" title-key="android.run.configuration.general.tab.title"/>
</component>
<vspacer id="ff5d5">
<constraints>
- <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="a005a" class="javax.swing.JComboBox" binding="myModulesComboBox">
<grid id="e9e4a" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
- <grid row="2" column="0" row-span="2" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+ <grid row="2" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
</properties>
</component>
<grid id="4d07" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="28" bottom="0" right="0"/>
+ <margin top="0" left="26" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
private JComboBox myNetworkLatencyCombo;
private JCheckBox myDisableBootAnimationCombo;
private JCheckBox myClearLogCheckBox;
- private JTabbedPane myTabbedPane;
private JBLabel myModuleJBLabel;
private ComboboxWithBrowseButton myAvdBox;
private RawCommandLineEditor myCommandLineField;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
+import com.intellij.ui.components.JBTabbedPane;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.Nullable;
}
public JComponent createComponent() {
- tabbedPane = new JTabbedPane();
+ tabbedPane = new JBTabbedPane();
for (Configurable configurable : configurables) {
JComponent component = configurable.createComponent();
component.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
<properties/>
<border type="none"/>
<children>
- <tabbedpane id="b70bc" default-binding="true">
+ <tabbedpane id="b70bc" class="com.intellij.ui.components.JBTabbedPane" default-binding="true">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
<border type="none"/>
<children/>
</grid>
- <component id="a371c" class="javax.swing.JLabel">
+ <component id="9988" class="com.intellij.ui.components.JBLabel">
<constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
- <font size="10"/>
- <foreground color="-10066330"/>
+ <componentStyle value="SMALL"/>
+ <fontColor value="BRIGHTER"/>
<text resource-bundle="com/intellij/spellchecker/util/SpellCheckerBundle" key="dictionaries.panel.description"/>
</properties>
</component>
<border type="none"/>
<children/>
</grid>
- <component id="be7e9" class="javax.swing.JLabel">
+ <component id="114cf" class="com.intellij.ui.components.JBLabel">
<constraints>
- <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="9" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
- <font size="10"/>
- <foreground color="-10066330"/>
+ <componentStyle value="SMALL"/>
+ <fontColor value="BRIGHTER"/>
<text resource-bundle="com/intellij/spellchecker/util/SpellCheckerBundle" key="add.directory.description"/>
</properties>
</component>
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Ref;
+import com.intellij.ui.components.JBTabbedPane;
import org.jetbrains.idea.svn.SvnBundle;
import org.jetbrains.idea.svn.SvnConfiguration;
import org.jetbrains.idea.svn.SvnServerFileManager;
}
protected JComponent createCenterPanel() {
- myTabbedPane = new JTabbedPane();
+ myTabbedPane = new JBTabbedPane();
myTabbedPane.add(myUserTab.createComponent(), SvnBundle.message("dialog.edit.http.proxies.settings.tab.edit.user.file.title"));
myTabbedPane.add(mySystemTab.createComponent(), SvnBundle.message("dialog.edit.http.proxies.settings.tab.edit.system.file.title"));
myPanel.add(myTabbedPane, BorderLayout.NORTH);
</component>
</children>
</grid>
- <tabbedpane id="7ce0a" default-binding="true">
+ <tabbedpane id="7ce0a" class="com.intellij.ui.components.JBTabbedPane" default-binding="true">
<constraints>
<grid row="2" column="0" row-span="1" col-span="5" vsize-policy="0" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
<properties/>
<border type="none"/>
<children>
- <tabbedpane id="d5ff" binding="myTabbedPane">
+ <tabbedpane id="d5ff" class="com.intellij.ui.components.JBTabbedPane" binding="myTabbedPane">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="BindingTest">
- <tabbedpane id="2bb0a" binding="myRootComponent">
+ <tabbedpane id="2bb0a" class="com.intellij.ui.components.JBTabbedPane" binding="myRootComponent">
<constraints>
<xy x="159" y="99" width="200" height="200"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.intellij.lang.xpath.xslt.run.XsltRunSettingsEditor.Editor">
- <tabbedpane id="fb52f" binding="myComponent">
+ <tabbedpane id="fb52f" class="com.intellij.ui.components.JBTabbedPane" binding="myComponent">
<constraints>
<xy x="115" y="24" width="580" height="497"/>
</constraints>
</properties>
<border type="none" title-justification="2" title-position="1"/>
<children>
- <tabbedpane id="7b4c" binding="viewFileTab">
+ <tabbedpane id="7b4c" class="com.intellij.ui.components.JBTabbedPane" binding="viewFileTab">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="200" height="200"/>
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
+import com.intellij.ui.components.JBTabbedPane;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
protected JComponent createCenterPanel() {
JComponent root;
if (myInputOptions != null && myOutputOptions != null) {
- root = new JTabbedPane();
+ root = new JBTabbedPane();
((JTabbedPane)root).addTab("Input", myInputOptions.getRoot());
((JTabbedPane)root).addTab("Output", myOutputOptions.getRoot());
} else if (myInputOptions != null) {