grouped list / 'card' list

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

grouped list / 'card' list

Merki Fabian (KETO 41)
grouped list / 'card' list

hi guys

currently i'm implementing a group list which groups rows together like a sql group by statement does.
i really think this list type is missing in the framework at all... it might not be too easy since my requirements might differ from others. what i did since now

Reply | Threaded
Open this post in threaded view
|

grouped list / 'card' list (real mail)

Merki Fabian (KETO 41)
[sorry - mail got sent too early...]

hi guys
 
currently i'm implementing a group list which groups rows together like a sql group by statement does.
i really think this list type is missing in the framework at all... it might not be too easy since my requirements might differ from others.
what i did since now: a data object (in my case some thing like a map) is cloned and all others rows which meet the group criteria are 'added' to this (this is done by doing sums, counts, averages, null-outs if not the same value). it works but is coded quite much towards my other classes... if anyone wants it just ask...

but now i have the problem that i would like to have a button on the gui to activate/deactivate the grouping - well this of course isn't the problem (*smile*) - the problem is that i need a list which is based on list A or on list B (like the java.awt.CardLayout where you can switch the current displayed component -> CardList sounds dumm - FlipList?). i think this one might be very easy to build and could easly be reused by others. the problem is that glazedlists is totally build on constructors - i've seen that CollectionList might serve all req. features but i think i could be built much easier for that purpose. i could imagine something like this:

final FlipList fl = new FlipList(listA); // will use listA lock
// switch to list a button code (incomplete)...
public void actionPerformed(ActionEvent e) {
        fl.switch(listA);
}
// switch to list b button code (incomplete)...
public void actionPerformed(ActionEvent e) {
        fl.switch(listB);
}

so if anyone could do this for the galzedlists it would be very cool!

thanks
fabian

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]