ListSelect - how to move items?

I have a ListSelect with a few buttons next to it - Add, Edit, Delete, Up,Down. While the first three were straight-forward to implement, moving items up/down does not appear to be as straight-forward as I hoped as I don’t see an API to insert an item at a desired index. Does anyone have a suggestion? I would hate to have to do this “brute force” (remove all items and recreate with the item moved).

Before I started the above, I looked around for any third-party widgets that did this, but couldn’t find any. If there is no solution to the above but you know of a 3rd-party widget that does this, please do let me know.

You can move selection component items quite freely at the container level, for example if you are using IndexedContainer, which is default for ListSelect. The ListSelect API itself is more restricted about such manipulations, as it works on more abstract Containers that are not necessarily indexed or such.

Thanks Marko! Worked like a charm.