-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6
-
x86
-
windows_xp
FULL PRODUCT VERSION :
5.0-6.0
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Scroll buttons on wrapped tabbed panes in RTL layout not showing. This is a bug in BasicTabbedPaneUI.TabbedPaneScrollLayout class (see below for a fix)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a tabbed pane in WRAP_TAB_LAYOUT mode with RTL orientation and a number of tabs. Under *all* core LAFs (Metal, Windows, Motif) the scroller buttons (on TOP and BOTTOM placement) are not showing.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Scroller buttons showing on the left-hand side of the tabbed pane on TOP and BOTTOM placement
ACTUAL -
No scroller buttons
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
The code from line 2756 as
case BOTTOM:
case TOP:
default:
int totalTabWidth = rects[tabCount-1].x + rects[tabCount-1].width;
if (totalTabWidth > tw) {
visible = true;
bx = (child == tabScroller.scrollForwardButton)?
bounds.width - insets.left - bsize.width :
bounds.width - insets.left - 2*bsize.width;
by = (tabPlacement == TOP? ty + th - bsize.height : ty);
}
is correct only for LTR orientation. For RTL, it should check the rects[tabCount-1].x, and if it's negative, set visible to true and bx to either insets.left or insets.left + bsize.width.
This is impossible to do in custom LAF since almost everything (including the layout class) is private.
5.0-6.0
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Scroll buttons on wrapped tabbed panes in RTL layout not showing. This is a bug in BasicTabbedPaneUI.TabbedPaneScrollLayout class (see below for a fix)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a tabbed pane in WRAP_TAB_LAYOUT mode with RTL orientation and a number of tabs. Under *all* core LAFs (Metal, Windows, Motif) the scroller buttons (on TOP and BOTTOM placement) are not showing.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Scroller buttons showing on the left-hand side of the tabbed pane on TOP and BOTTOM placement
ACTUAL -
No scroller buttons
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
The code from line 2756 as
case BOTTOM:
case TOP:
default:
int totalTabWidth = rects[tabCount-1].x + rects[tabCount-1].width;
if (totalTabWidth > tw) {
visible = true;
bx = (child == tabScroller.scrollForwardButton)?
bounds.width - insets.left - bsize.width :
bounds.width - insets.left - 2*bsize.width;
by = (tabPlacement == TOP? ty + th - bsize.height : ty);
}
is correct only for LTR orientation. For RTL, it should check the rects[tabCount-1].x, and if it's negative, set visible to true and bx to either insets.left or insets.left + bsize.width.
This is impossible to do in custom LAF since almost everything (including the layout class) is private.
- duplicates
-
JDK-4726740 JTabbedPane(SCROLL_TAB_LAYOUT) doesn't work properly in right-to-left mode.
- Closed