Platform: new scrollbars are supported on JBTabbedPane + inspection to always use JBTabbedPanes

This commit is contained in:
Anton Makeev
2014-04-01 13:42:15 +02:00
parent 97d9377b6c
commit 3526fe0af4
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<item class="com.intellij.ui.components.JBTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
@@ -2636,7 +2636,10 @@ public class UIUtil {
public static void setNotOpaqueRecursively(@NotNull Component component) {
if (!isUnderAquaLookAndFeel()) return;
if (component.getBackground().equals(getPanelBackground()) || component instanceof JScrollPane || component instanceof JViewport) {
if (component.getBackground().equals(getPanelBackground())
|| component instanceof JScrollPane
|| component instanceof JViewport
|| component instanceof JLayeredPane) {
if (component instanceof JComponent) {
((JComponent)component).setOpaque(false);
}
@@ -22,6 +22,7 @@ import com.intellij.openapi.ui.ComboBox;
import com.intellij.psi.*;
import com.intellij.ui.components.JBList;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.ui.components.JBTabbedPane;
import com.intellij.ui.table.JBTable;
import com.intellij.ui.treeStructure.Tree;
import com.intellij.util.QueryExecutor;
@@ -39,6 +40,7 @@ public class UndesirableClassUsageInspection extends InternalInspection {
CLASSES.put(JTable.class.getName(), JBTable.class.getName());
CLASSES.put(JTree.class.getName(), Tree.class.getName());
CLASSES.put(JScrollPane.class.getName(), JBScrollPane.class.getName());
CLASSES.put(JTabbedPane.class.getName(), JBTabbedPane.class.getName());
CLASSES.put(JComboBox.class.getName(), ComboBox.class.getName());
CLASSES.put(QueryExecutor.class.getName(), QueryExecutorBase.class.getName());
CLASSES.put(BufferedImage.class.getName(), "UIUtil.createImage()");