Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Is it possible to use slide effect in RAP?
icon5.gif  Is it possible to use slide effect in RAP? [message #879890] Fri, 01 June 2012 04:05 Go to next message
ZungNV Abel is currently offline ZungNV Abel
Messages: 16
Registered: November 2010
Junior Member
Hello everyone,
I'm building a demo site about server management, I have a requirement as following:
- User can search servers when he input an IP certain range, the site will list all information of available servers respectively (Server name, IP , status, usage...).
I used a TableViewer to show the search result, and I also used pagination. I have 2 buttons Next ans Previous to move among pages.
The problem I'm facing is how to move automatically among pages with slide effect ( similar as we see photos of an album). When I click Next and Previous buttons, the effect must be the same.
I don't know if RAP can do it and how to do it?
I'd appreciate for any suggestion or answer. Thanks so much.
Re: Is it possible to use slide effect in RAP? [message #880115 is a reply to message #879890] Fri, 01 June 2012 13:01 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 386
Registered: July 2009
Senior Member
Hi.

> name, IP , status, usage...). I used a TableViewer to show the search
> result, and I also used pagination. I have 2 buttons Next ans Previous
> to move among pages. The problem I'm facing is how to move automatically
> among pages with slide effect ( similar as we see photos of an album).


If i understand you correctly, then yes, i think this should be possible
as of RAP 1.5. However, i haven't tried it yet in the way you want to
use it.

The theming for composite widget supports flyIn/flyOut animations. You
need at least two tables (as two are visible at the same time during
animation) that you put in two different composites that you assign
custom variants. Make a theme contribution where you define a rule for
composites using that custom variant. (You can find all that in the
developers guide.)

The animations are called flyIn[direction] and flyOut[direction], where
[direction] can be Top, Left, Bottom and Right. They are played when the
composite is created/shown or hidden/disposed. When you change page,
change the visibility of the composite, and the animation should play.

If your tables can move in either direction (left or right) and you
don't know that beforehand, that might be problem. Let me know if you
run into this.

Greetings,
Tim


--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Is it possible to use slide effect in RAP? [message #881183 is a reply to message #880115] Mon, 04 June 2012 04:19 Go to previous messageGo to next message
ZungNV Abel is currently offline ZungNV Abel
Messages: 16
Registered: November 2010
Junior Member
Hi Tim,
Thanks for your suggestion, at least I can make an attempt for that now. I will let you know the result after try with that.
I'm working on Eclipse RCP&RAP (Indigo 3.7) + RAP 1.4.2
First of all, I need to download and install Eclipse 4.2 with RAP 1.5


Re: Is it possible to use slide effect in RAP? [message #882354 is a reply to message #881183] Wed, 06 June 2012 09:42 Go to previous messageGo to next message
ZungNV Abel is currently offline ZungNV Abel
Messages: 16
Registered: November 2010
Junior Member
Hi Tim,
Today I implemented the idea that you suggested. It works great Very Happy.
I used a main composite (with Stacklayout) to contain 2 sub-composites. Each time when user click Prev or Next buttons, stacklayout will change its topControl--> animation also works in this case.
And I faced the problem you mentioned too. I could only define rule for theme once by a specific direction. So if animation happens from left to right, when user click on button "Previous", the animation still run from left to right --> looks not logically.
I defined theme for my Composite as following:
Composite.myComp {
   animation: flyInLeft 2000ms linear, flyOutRight 2000ms linear;
}


One more question, how I could do the slide run automatically (e.g after each 5s), or user can manually move pages before this time ?

Thank you so much!
Re: Is it possible to use slide effect in RAP? [message #884993 is a reply to message #882354] Tue, 12 June 2012 08:28 Go to previous message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 386
Registered: July 2009
Senior Member
Hi! Sorry, for the long wait!

> One more question, how I could do the slide run automatically (e.g after
> each 5s), or user can manually move pages before this time ?

I think this requires the UICallback:
http://eclipse.org/rap/developers-guide/devguide.php?topic=advanced/server-push.html

Greetings,
Tim

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Displaying static HTML content
Next Topic:JSExecutor.executeJS with result
Goto Forum:
  


Current Time: Thu Oct 23 22:10:27 GMT 2014

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

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