From: FutureScalper on
I'd like to over-ride Nimbus JTabbedPane behavior of shuffling the
tabs. I want every tab to stay where it is, and not to shuffle when a
tab is selected. This is on Windows.

I want each tabs to "stay put" and not have tabs reorient themselves
when a tab is selected.

Could someone put me on the right track of somehow disabling that
behavior?

Otherwise, I think Nimbus is pretty good.



From: John B. Matthews on
In article
<d554a06f-5884-44db-900b-a3902e5dd238(a)j8g2000yqd.googlegroups.com>,
FutureScalper <futurescalper(a)gmail.com> wrote:

> I'd like to over-ride Nimbus JTabbedPane behavior of shuffling the
> tabs. I want every tab to stay where it is, and not to shuffle when
> a tab is selected. This is on Windows.
>
> I want each tabs to "stay put" and not have tabs reorient themselves
> when a tab is selected.
>
> Could someone put me on the right track of somehow disabling that
> behavior?
>
> Otherwise, I think Nimbus is pretty good.

Try setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT).

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
From: FutureScalper on
On Jul 1, 9:05 pm, "John B. Matthews" <nos...(a)nospam.invalid> wrote:
> In article
> <d554a06f-5884-44db-900b-a3902e5dd...(a)j8g2000yqd.googlegroups.com>,
>
>  FutureScalper <futurescal...(a)gmail.com> wrote:
> > I'd like to over-ride Nimbus JTabbedPane behavior of shuffling the
> > tabs.  I want every tab to stay where it is, and not to shuffle when
> > a tab is selected.  This is on Windows.
>
> > I want each tabs to "stay put" and not have tabs reorient themselves
> > when a tab is selected.
>
> > Could someone put me on the right track of somehow disabling that
> > behavior?
>
> > Otherwise, I think Nimbus is pretty good.
>
> Try setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT).
>
> --
> John B. Matthews
> trashgod at gmail dot com
> <http://sites.google.com/site/drjohnbmatthews>

Thanks for the tips, but I want the tabs to wrap and stack. I just
don't want the row stacking order to change.

I suppose it's trying to emulate the behavior on Windows, where tabbed
rows reorganize themselves, but I want to disable that behavior.

I just want it to work like the older plafs and not change tab
placement on tab selection.

I need the tabs to be visible at all times, so scrolling tabs won't
work in this application.
From: markspace on
FutureScalper wrote:

> Thanks for the tips, but I want the tabs to wrap and stack. I just
> don't want the row stacking order to change.

Huh, how does that actually work? If you have some rows of tabs and one
is displaying:


/ Tab 1 \/ Tab 2 \/ Tab 3\
/ Tab 4 longer name \ |
/ Tab 5 \/ Tab 6 \ |
| -----------------|
| |
| Tab 5 |
| |
| |
+-------------------------+


Now you want to see tab two, it won't be connected to the display pane
if you display it it without reordering. I think this would be very
confusing to the users.

/ Tab 1 \/ Tab 2?\/ Tab 3\
/ Tab 4 longer name \ |
/ Tab 5 \/ Tab 6 \ |
|-------------------------|
| |
| Tab 2 |
| |
| |
+-------------------------+


Not sure I like that. And I don't think anyone would write code to make
it work that way, so I think you're on your own. Maybe subclass tabbed
pane and redo the tabs. Might be able to fake them with buttons and a Box.

From: John B. Matthews on
In article
<b761d588-2804-4c0f-a91c-9f604ee447c4(a)20g2000vbi.googlegroups.com>,
FutureScalper <futurescalper(a)gmail.com> wrote:

> On Jul 1, 9:05 pm, "John B. Matthews" <nos...(a)nospam.invalid> wrote:
> > In article
> > <d554a06f-5884-44db-900b-a3902e5dd...(a)j8g2000yqd.googlegroups.com>,
> >
> >  FutureScalper <futurescal...(a)gmail.com> wrote:
> > > I'd like to over-ride Nimbus JTabbedPane behavior of shuffling
> > > the tabs.  I want every tab to stay where it is, and not to
> > > shuffle when a tab is selected.  This is on Windows.
> >
> > > I want each tabs to "stay put" and not have tabs reorient
> > > themselves when a tab is selected.
> >
> > > Could someone put me on the right track of somehow disabling that
> > > behavior?
> >
> > > Otherwise, I think Nimbus is pretty good.
> >
> > Try setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT).
>
> Thanks for the tips, but I want the tabs to wrap and stack. I just
> don't want the row stacking order to change.
>
> I suppose it's trying to emulate the behavior on Windows, where
> tabbed rows reorganize themselves, but I want to disable that
> behavior.

Nimbus' WRAP_TAB_LAYOUT is like that on Mac OS X and Ubuntu, too. It
looks like it's trying to make the "last" selected tab appear in the
"last" row and column, perhaps as a navigational aid.

I guess you'd have to replace BasicTabbedPaneUI.TabbedPaneLayout by
overriding createLayoutManager().

> I just want it to work like the older plafs and not change tab
> placement on tab selection.
>
> I need the tabs to be visible at all times, so scrolling tabs won't
> work in this application.