< prev index next >

src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneUI.java

Print this page
rev 17489 : Fix tabbed pane title for lengthy title - JDK-8004029
rev 17490 : Fix the tabbed pane test

*** 1,7 **** /* ! * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 328,338 **** rotateGraphics(g2d, tabRect, textRect, iconRect, tabPlacement); } // not for the scrolling tabs if (component == null && tabIndex >= 0) { ! paintTitle(g2d, font, metrics, textRect, tabIndex, title); } if (icon != null) { paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected); } --- 328,340 ---- rotateGraphics(g2d, tabRect, textRect, iconRect, tabPlacement); } // not for the scrolling tabs if (component == null && tabIndex >= 0) { ! String clippedTitle = SwingUtilities2.clipStringIfNecessary(tabPane, metrics, ! title, textRect.width); ! paintTitle(g2d, font, metrics, textRect, tabIndex, clippedTitle); } if (icon != null) { paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected); }
< prev index next >