Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » [Nebula Gallery] Update existing items, name of group when empty field was clicked
[Nebula Gallery] Update existing items, name of group when empty field was clicked [message #989286] Wed, 05 December 2012 14:38 Go to next message
Piotr Czajka is currently offline Piotr CzajkaFriend
Messages: 4
Registered: November 2012
Junior Member
When I click on empty field between images I have nullPointerException but when I click there I would like to get name of this group, Can I do this ?

code:
gallery.addSelectionListener(new SelectionListener() {
			
	@Override
	public void widgetSelected(SelectionEvent arg0) 
	{
		GalleryItem item = (GalleryItem)arg0.item;		
								
		try
		{		
		actualPath = item.getParentItem().getText()+"/";
		actualPath += item.getText();
                //....
                //.... other operations
                catch(NullPointerException e)
		{
		System.out.println("Null selection");
                //..
                }
    }


and second question related with updating existing groups / items ..

I wrote code which removes one group when I load the same directory again and add new at first position but then index of group is changing and I have problem with identification .. so I think update group at the same position will be better
but It doesn't work for me Smile

 // code.... search the same name of group
 // if find secondly the same group in arrayList delete first group from gallery
 for(int j = 0; j < gallery.getItemCount(); j++)
 {				 
    if(actualFolderPath.equals(gallery.getItem(j).getText()))
     {
       gallery.remove(j);
     }
 }
  //....
//..

And it works .. but how can I update ? when I add gallery.refresh(j); It's doesn't work ...in Java doc I saw Gallery#updateStructuralValues(GalleryItem changedGroup, boolean keepLocation) but I don't see this method, Thanks

[Updated on: Wed, 05 December 2012 14:39]

Report message to a moderator

Re: [Nebula Gallery] Update existing items, name of group when empty field was clicked [message #990085 is a reply to message #989286] Mon, 10 December 2012 19:40 Go to previous message
Piotr Czajka is currently offline Piotr CzajkaFriend
Messages: 4
Registered: November 2012
Junior Member
anyone ? Confused
Previous Topic:[Nebula Gallery] Reload images from directory in the same group
Next Topic:[GanttChart] Custom Text Formating Parameters
Goto Forum:
  


Current Time: Fri Apr 19 22:42:19 GMT 2024

Powered by FUDForum. Page generated in 0.03535 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top