Skip to main content

An Havi Component Like JList

5 replies [Last post]
blackmage
Offline
Joined: 2007-08-28

Is there an having component similar to a JList or JTable? Basically I'm trying to make something like Itunes that puts information such as songs or movies into an list that can be scrolled.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
blackmage
Offline
Joined: 2007-08-28

Answered my own question, not implemented in XletView....sigh.

blackmage
Offline
Joined: 2007-08-28

Ok, so I got an HListGroup as my needed code. I read the API's and then implements but it doesn't seem to work, as in it doesn't show up. Here is some of my code;

[code]
/**
* createMusicMenu
* Searches through a list of songs stored in the music section. *Blank* method collects the
* meta-data of the songs and then add it to the list.
* @return
*/
public HContainer createMusicMenu(){
//Create and set the Container
HContainer container=new HContainer();
container.setLayout(new FlowLayout());
container.setSize(dim);

//Create the list of elemtns to be added to the HGroupList
HListElement songlist[] = new HListElement[10];

for (int i=0; i<10; i++) {
songlist[i] = new HListElement( "Image" + i);
}

//Create and set the HGroupList
HListGroup musicList = new HListGroup(songlist,100,140,500,500);
musicList.setBackground(Color.blue);
musicList.setForeground(Color.white);
musicList.setSize(600, 600);
musicList.setVisible(true);

//Add to the container and then validate,and then return to be added to the HScene
container.add(musicList);
container.validate();

return container;

}
[/code]

When it returns the container, the container is added to the HScene. And I know this has worked before because I use it to add these buttons and it works.

[code]
public HContainer createMainMenu(){
HContainer container=new HContainer();

HTextButton musicButton, photoButton, videosButton, internetButton;
musicButton=new HTextButton("Muisc");
photoButton=new HTextButton("Photos");
videosButton=new HTextButton("Videos");
internetButton=new HTextButton("Internet");

musicButton.setActionCommand("musicbutton");
photoButton.setActionCommand("photobutton");
videosButton.setActionCommand("videobutton");
internetButton.setActionCommand("internetbutton");

musicButton.setSize(buttonLength, buttonWidth);
photoButton.setSize(buttonLength, buttonWidth);
videosButton.setSize(buttonLength, buttonWidth);
internetButton.setSize(buttonLength, buttonWidth);

musicButton.addHActionListener(menu);
photoButton.addHActionListener(menu);
videosButton.addHActionListener(menu);
internetButton.addHActionListener(menu);

musicButton.addHActionListener(this);
photoButton.addHActionListener(this);
videosButton.addHActionListener(this);
internetButton.addHActionListener(this);

musicButton.setBackground(Color.blue);
photoButton.setBackground(Color.yellow);
videosButton.setBackground(Color.orange);
internetButton.setBackground(Color.red);

container.setSize(dim);
container.setLayout(new FlowLayout());

container.add(musicButton);
container.add(photoButton);
container.add(videosButton);
container.add(internetButton);

container.validate();

return container;

}
[/code]

So can anyone tell me what I could be doing wrong?

ashokabk
Offline
Joined: 2008-08-25

Hi from where you guys are getting the these HAVi classes. Is it from any bdj.jar. if you are getting these from bdj.jar, from which place you are getting this is it from nero 8 or powerdvd or which place... i 'm asking this because i tried the same this with bdj.jar from powerdvd 8. But it does't run.

Thanks for your reply in advance.

chihiro_saito
Offline
Joined: 2006-11-08

Hi,

bdj.jar that's been discussed in this forum is meant for your xlet compilation, and not for runtime. You can't just take the jar file out of a pc player (nero, powerdvd etc), stick it into a java runtime environment in some IDE like eclipse or netbeans, and expect it to work.

You essentially need some sort of an emulator or a bd-j runtime environment to test HAVi APIs on a PC. We've been recommending commercial BD PC players as an alternative to a bd-j emulator. Another popular choice seems to be XletView, which is an MHP runtime emulator. MHP impl won't have org.bluray APIs, obviously, but HAVi will be there (at least as a partial impl, as described in this thread).

Chihiro

ashokabk
Offline
Joined: 2008-08-25

Hi ,
Thanks for your reply.... I will investigate on this