Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » [Nebula Gallery] Bug 197130
[Nebula Gallery] Bug 197130 [message #666130] Tue, 19 April 2011 04:54 Go to next message
Issueis  is currently offline Issueis
Messages: 14
Registered: April 2011
Junior Member
Hello,

iam trying to zoom my GalleryItems on mouseHover. Same workflow as the Bugeport tells.

My current code:


gallery.addMouseTrackListener(new MouseTrackListener() {

			@Override
			public void mouseHover(MouseEvent e) {
				Gallery g = (Gallery) e.widget;
				GalleryItem item = g.getItem(new Point(e.x, e.y));
				
				addEffect(e, item);
				
				

			}

.....

	private void addEffect(MouseEvent e, GalleryItem item) {
		runner = new AnimationRunner();

		Rectangle src = item.getBounds();
		Rectangle dest = src;
		long lengthMilli = 700;
		IMovement movement = new LinearInOut();
		Runnable onStop = null, onCancel = null;

		GrowEffect effect = new GrowEffect(gallery, src, dest, lengthMilli, movement, onStop, onCancel);
		
		runner.runEffect(effect);
		

	}


The issue i've got - i can only put Classes which inherit Control to the effect. The code above grows the gallery to the size of the hovered item.

Currenty i've got no additional ideas, to put in the galleryitem to the GrowEffect.

i tried to resize myself the item, without the effect, but there is no suiteable way (at the moment) to enlarge the Hovered and resize smaller the whole rest of items.


Any suggestion?

If i'am able to get this to work, i will post here.


Thankful issueis

Re: [Nebula Gallery] Bug 197130 [message #669550 is a reply to message #666130] Tue, 10 May 2011 13:28 Go to previous messageGo to next message
Nicolas Richeton is currently offline Nicolas Richeton
Messages: 179
Registered: July 2009
Senior Member
Hi Issueis,

Items cannot be resized independently because this is the way the Gallery widget works. If all items have the same size, the layout gets very fast because the number of items is the only input required (no need to load and check each item)

The ability to zoom the current item have to be implemented directly in the gallery widget, in the layout part.
It could be done this way :
- trigger layout on mouse hover (this will be resource intensive)
- During the layout, if an item is hovered : start an animation to increase the size of this item and of the current group. Trigger layout on each frame.

--
Nicolas
Re: [Nebula Gallery] Bug 197130 [message #671225 is a reply to message #669550] Tue, 17 May 2011 03:46 Go to previous message
Issueis  is currently offline Issueis
Messages: 14
Registered: April 2011
Junior Member
Thanks four your reply - Nicolas,

i'am trying to do that.
Previous Topic:CDateTime status?
Next Topic:extra pixel/padding on tableviewer/gridtableviewer
Goto Forum:
  


Current Time: Mon Sep 01 03:46:10 EDT 2014

Powered by FUDForum. Page generated in 0.02141 seconds