The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » Blu-ray Disc Java

Thread: An Havi Component Like JList

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 5 - Last Post: Sep 17, 2008 11:42 PM by: ashokabk Threads: [ Previous | Next ]
blackmage

Posts: 17
An Havi Component Like JList
Posted: Nov 16, 2007 9:55 AM
  Click to reply to this thread Reply

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.

blackmage

Posts: 17
Re: An Havi Component Like JList
Posted: Nov 17, 2007 8:05 AM   in response to: blackmage
  Click to reply to this thread Reply

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;

	/**
	 * 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;
		
	}


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.

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;
		
	}


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

ashokabk

Posts: 27
Re: An Havi Component Like JList
Posted: Sep 17, 2008 9:05 PM   in response to: blackmage
  Click to reply to this thread Reply

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

Posts: 161
Re: An Havi Component Like JList
Posted: Sep 17, 2008 10:51 PM   in response to: ashokabk
  Click to reply to this thread Reply

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

Posts: 27
Re: An Havi Component Like JList
Posted: Sep 17, 2008 11:42 PM   in response to: chihiro_saito
  Click to reply to this thread Reply

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

blackmage

Posts: 17
Re: An Havi Component Like JList
Posted: Nov 17, 2007 8:58 AM   in response to: blackmage
  Click to reply to this thread Reply

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




 XML java.net RSS