changeset 9667:b8c4fd770967

7034619: Scrollable Tabs don't appear with JDK7 Synth based LaF, different from Java 5/6 Reviewed-by: alexp
author kizune
date Tue, 10 May 2011 17:06:26 +0400
parents b373390818b7
children 13c8e69958e6
files jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java	Fri May 06 16:01:17 2011 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java	Tue May 10 17:06:26 2011 +0400
@@ -488,6 +488,18 @@
         paintContentBorder(tabContentContext, g, tabPlacement, selectedIndex);
     }
 
+    protected void paintTabArea(Graphics g, int tabPlacement,
+                                int selectedIndex) {
+        // This can be invoked from ScrollabeTabPanel
+        Insets insets = tabPane.getInsets();
+        int x = insets.left;
+        int y = insets.top;
+        int width = tabPane.getWidth() - insets.left - insets.right;
+        int height = tabPane.getHeight() - insets.top - insets.bottom;
+
+        paintTabArea(tabAreaContext, g, tabPlacement, selectedIndex,
+                     new Rectangle(x, y, width, height));
+    }
 
     private void paintTabArea(SynthContext ss, Graphics g,
                                 int tabPlacement, int selectedIndex,