pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: Accordion like Component that allows multiple open panels
Date Fri, 15 Jul 2011 14:28:39 GMT
I really must stop replying to myself....

I suppose this is all leading to a question of whether it would be
beneficial to add a 'SelectMode' enum property to Accordion similar to
the ones in ListView & TableView?
The 2 obvious modes would be
- SINGLE
- MULTI

SINGLE would just be the current Accordion behaviour.
MULTI would work something like I mentioned before but probably only
when Edvin's suggested SHIFT modifier is pressed.

There is already a JIRA issue concerning allowing Accordions to have 0
selected panels.
https://issues.apache.org/jira/browse/PIVOT-572

Perhaps that would be controlled by a separate boolean property,
'closeable', which would be independent of the SelectMode enum

Alternatively the SelectMode enum might just cover all 4 permutations
public enum SelectMode {
    SINGLE_OR_NONE,    // 0 or 1 open panels
    SINGLE,    // Exactly 1 open panel at all times
    MULTI,    // At least 1 open panel, but no upper limit
    MULTI_OR_NONE    // 0 or more open panels
}

Just thinking out loud...

Chris


On 15 July 2011 21:09, Chris Bartlett <cbartlett.x@gmail.com> wrote:
> On 15 July 2011 20:59, SYSE | Edvin <es@syse.no> wrote:
>> Den 15.07.2011 15:37, skrev Chris Bartlett:
>>>
>>> Does such a component exist in other GUI toolkits or have a name?
>>> Is even the suggestion of having multiple expanded panels in an
>>> Accordion considered heresy?  :)
>>
>> I know it's easy to do with many JQuery accordions, here's an example:
>>
>> http://jsbin.com/inawa4/2
> That looks like a 4 Pivot Rollups, each wrapped in a Border - but yes,
> it is pretty much the same thing.
>
>
>> What I would really like, is to be able to open a new accordion tab without
>> closing the previous one if I hold down shift for example.
> I was thinking about keeping the basic mouse click behaviour of
> Accordion, but making each click on the 'title bar' explicitly open or
> close that panel.  So if the first panel is open, clicking on the
> second one would leave the first open, but expand the second one.
> I do like the idea of the SHIFT modifier key as a clean way to allow
> 'enhanced' Accordion behaviour (multiple open panels) alongside
> traditional Accordion behaviour (single open panel).
>

Mime
View raw message