[Nebula Gallery] Bug 197130 [message #666130] |
Tue, 19 April 2011 08:54 |
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds