1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.support.components;
14
15 import java.awt.FontMetrics;
16 import java.awt.Insets;
17
18 import javax.swing.Icon;
19 import javax.swing.plaf.metal.MetalTabbedPaneUI;
20
21 public class VerticalTabbedPaneUI extends MetalTabbedPaneUI
22 {
23 protected void installDefaults()
24 {
25 super.installDefaults();
26
27 textIconGap = 0;
28 tabInsets = new Insets( 0, 0, 0, 0 );
29 }
30
31 protected int calculateTabWidth( int tabPlacement, int tabIndex, FontMetrics metrics )
32 {
33 Icon icon = getIconForTab( tabIndex );
34 return icon == null ? 2 : icon.getIconWidth() + 2;
35 }
36 }