The calculation code is not only buried deeply, it is also unfactored and
complex. The protected method that does the tab run calculation
(calculateTabRects) is not a method of BasicTabbedPaneUI. It's a mathod of
an Layout mgr which is an inner class layout of BasicTabbedPaneUI. That's
two subclasses already, in addition to the subclass of JTabbedPane (which we
needed for other reasons).

-----Original Message-----
From: Greg Munt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 5:36 AM
To: Farwell, Paul; [EMAIL PROTECTED]
Subject: Re: forcing a single 'row' of tabs in a JTabbedPane


If you don't like what BasicTabbedPaneUI implements, extend
javax.swing.plaf.TabbedPaneUI, or override the public/protected method(s)
that calculate the number of runs. Of course, you'll need to add arrow
buttons to scroll your tabbed pane, now. This may warrant a custom
component, I don't know.

As for "create three subclass", I don't know what you mean by that.

Personally, I have my own LookAndFeel, which extends MetalLookAndFeel. Some
components have had metal UIs replaced with basic ones, others use
extensions of metal UIs, others use extensions of basic ones.

-----Original Message-----
From: Farwell, Paul <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, April 03, 2001 05:58
Subject: forcing a single 'row' of tabs in a JTabbedPane


>Does anyone know how to prevent the tabs of a JTabbedPane from stacking in
>multiple 'runs' when the layout shrinks?  I want to keep all of the tabs on
>a single row, even if the layout can't show them all at once.
>
>Unfortunately, the code that calculates the number of runs is buried deep
in
>the lower intestine of the BasicTabbedPaneUI. Looks like I will have to
>create three subclass to get to it...
>
>Any thoughts?
>_______________________________________________
>Advanced-swing mailing list
>[EMAIL PROTECTED]
>http://eos.dk/mailman/listinfo/advanced-swing

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to