diff -r c68c3454328e o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusEditorTabCellRenderer.java --- a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusEditorTabCellRenderer.java Thu Jan 29 23:42:56 2009 +0300 +++ b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusEditorTabCellRenderer.java Fri Jan 30 10:12:16 2009 +0100 @@ -110,7 +110,7 @@ Object o = null; if (ren.isSelected()) { if (ren.isActive()) { - o = UIManager.get("TabbedPane:TabbedPaneTab[Pressed+Selected].backgroundPainter"); + o = UIManager.get("TabbedPane:TabbedPaneTab[MouseOver+Selected].backgroundPainter"); } else { o = UIManager.get("TabbedPane:TabbedPaneTab[Selected].backgroundPainter"); } @@ -145,12 +145,11 @@ Insets ins = getBorderInsets(c); Polygon p = new Polygon(); - int x = ren.isLeftmost() ? 1 : 0; - int y = 1; + int x = ren.isLeftmost() ? 3 : 0; + int y = 0; - int width = ren.isLeftmost() ? c.getWidth() - 1 : c.getWidth(); - int height = ren.isSelected() ? - c.getHeight() + 2 : c.getHeight() - 1; + int width = ren.isLeftmost() ? c.getWidth() - 3 : c.getWidth(); + int height = c.getHeight() - 4; //Modified to return rectangle p.addPoint(x, y); @@ -256,11 +255,10 @@ Insets ins = getBorderInsets(c); Polygon p = new Polygon(); int x = -3; - int y = 1; + int y = 0; int width = c.getWidth() + 3; - int height = ren.isSelected() ? - c.getHeight() + 2 : c.getHeight() - 1; + int height = c.getHeight() - 4; //Modified to return rectangle p.addPoint(x, y); @@ -315,11 +313,10 @@ Insets ins = getBorderInsets(c); Polygon p = new Polygon(); int x = 0; - int y = 1; + int y = 0; int width = c.getWidth() + 10; - int height = ren.isSelected() ? - c.getHeight() + 2 : c.getHeight() - 1; + int height = c.getHeight() - 4; //Modified to return rectangle p.addPoint(x, y); diff -r c68c3454328e o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusEditorTabDisplayerUI.java --- a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusEditorTabDisplayerUI.java Thu Jan 29 23:42:56 2009 +0300 +++ b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusEditorTabDisplayerUI.java Fri Jan 30 10:12:16 2009 +0100 @@ -46,17 +46,21 @@ package org.netbeans.swing.tabcontrol.plaf; +import com.sun.java.swing.Painter; +import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.FontMetrics; import java.awt.Graphics; +import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Rectangle; import java.util.HashMap; import java.util.Map; import javax.swing.Icon; import javax.swing.JComponent; +import javax.swing.UIManager; import org.netbeans.swing.tabcontrol.TabDisplayer; import javax.swing.plaf.ComponentUI; @@ -103,6 +107,26 @@ prefHeight = fm.getHeight() + ins.top + ins.bottom + 12; } return new Dimension(displayer.getWidth(), prefHeight); + } + + protected void paintBackground(Graphics g) { + Painter painter; + if (displayer.isActive()) { + painter = (Painter) UIManager.get("TabbedPane:TabbedPaneTabArea[Enabled+MouseOver].backgroundPainter"); + } + else { + painter = (Painter) UIManager.get("TabbedPane:TabbedPaneTabArea[Enabled].backgroundPainter"); + } + + Graphics2D g2d = (Graphics2D) g; + int w = displayer.getWidth(); + int h = displayer.getHeight(); + painter.paint(g2d, null, w, h); + + Color c = (Color) UIManager.get("nimbusBorder"); + g.setColor(c); + g.drawLine(0, h-5, 0, h); + g.drawLine(w-1, h-5, w-1, h); } protected void paintAfterTabs(Graphics g) { @@ -169,7 +193,7 @@ protected Rectangle getControlButtonsRectangle( Container parent ) { Component c = getControlButtons(); - return new Rectangle( parent.getWidth()-c.getWidth()-4, 4, c.getWidth(), c.getHeight() ); + return new Rectangle( parent.getWidth()-c.getWidth()-4, 2, c.getWidth(), c.getHeight() ); } public Insets getTabAreaInsets() { diff -r c68c3454328e o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusViewTabDisplayerUI.java --- a/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusViewTabDisplayerUI.java Thu Jan 29 23:42:56 2009 +0300 +++ b/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/plaf/NimbusViewTabDisplayerUI.java Fri Jan 30 10:12:16 2009 +0100 @@ -210,7 +210,7 @@ Object o = null; if (isSelected(index)) { if (isActive()) { - o = UIManager.get("TabbedPane:TabbedPaneTab[Pressed+Selected].backgroundPainter"); + o = UIManager.get("TabbedPane:TabbedPaneTab[MouseOver+Selected].backgroundPainter"); } else { o = UIManager.get("TabbedPane:TabbedPaneTab[Selected].backgroundPainter"); }