This discussion is archived
2 Replies Latest reply: Apr 29, 2010 3:32 PM by 794459 RSS

Hulu Desktop Like Menu

843799 Newbie
Currently Being Moderated
Hello everyone,
I am trying to create a menu system for an Desktop Application I am writing that will resemble the look and feel of the Hulu Desktop menu. where the selected item is in a fixed position (Middle) but the list scrolls up and down and it looks like it is on a wheel like the wheel of fortune wheel when it spins the top most item disappears behind the wheel and the new items appear on the bottom. I have created a panel with the graphics in place I have added a jlist on top of the panel with a bunch of items in it. I just cannot figure out the following.

1. How to make the selected Item always be in the middle of the list.
2. How to make the list appear to be round.

Any help would be much appreciated.

Brian

Edited by: bbepristis on Mar 31, 2010 8:22 AM
  • 1. Re: Hulu Desktop Like Menu
    794459 Newbie
    Currently Being Moderated
    1. How to make the selected Item always be in the middle of the list.
    Rotate the wheel of fortune until the selected item is in the middle:
    while (frontItem != chosenItem)
    {
        frontItem += 1
        if (frontItem >= totalItems)
        {
            frontItem = frontItem - totalItems
        }
    }
    2. How to make the list appear to be round.
    What I think you want is to map the entire roll of menu items to a cylinder. Create a cylinder (I believe there's already a class for that in Java 3D), and then use texture mapping (look it up) to map each item number i to the section of the cylinder's surface identified by the polar coordinate angles between 2*Math.PI*i/totalItems and 2*Math.PI*((+i++1)%totalItems)/totalItems
  • 2. Re: Hulu Desktop Like Menu
    794459 Newbie
    Currently Being Moderated
    Whoops, didn't see the date on the post before I posted. Maybe it'll be useful for someone else :)