Animator add-on

Hi,

I would like to use:

((VerticalLayout) mainWindow.getContent()).setExpandRatio(animatorProxy, 0);

but it doesn’t work. When I do the other one, everything looks great:

((VerticalLayout) mainWindow.getContent()).setExpandRatio(myAppLayout, 1);

[/quote]

I then made a test case, and even setting the expand ratio to 0 for a label didn’t work. Is this a bug or am I missing something?

Thanks,

Mark


public class EmptyApplication extends Application {
	@Override
	public void init() {
		
		
		Label label1 = new Label("Label 1");
		Label label2 = new Label("Label 2");
		Label label3 = new Label("Label 3");
		
		VerticalLayout vl = new VerticalLayout();
		vl.setSizeFull();
		vl.addComponent(label1);
		vl.addComponent(label2);
		vl.addComponent(label3);
		vl.setExpandRatio(label3, 0);
		
//		AnimatorProxy proxy = new AnimatorProxy();
//		vl.addComponent(proxy);
//		vl.setExpandRatio(proxy, 0);
		
		
		
		Window mainWindow = new Window("Empty Application");
		mainWindow.setSizeFull();
		mainWindow.getContent().setSizeFull();
		mainWindow.addComponent(vl);
		setMainWindow(mainWindow);
	}
	
}


Hi,

I guess I’ve misunderstood the layout specs a bit. Setting only one expand ratio will set all others to zero, so setting one to zero will in effect set every components ratio to zero. Which of course doesn’t do much.

So I guess the only option is to set the other ratio.

Ah, ok, np!

Hi Jouni,

I’ve revamped my gui view and removed some components such that I no longer use left and right animations, just the fade in and out ones. So I don’t need the additional roll right close and roll left open options. Would you like me to close the tickets that I opened for this?

Cheers,

Mark

No need to close them, I’ll keep them there as reminders. They would be nice additions. And others can also see them and comment and maybe even provide patches (gasp) :slight_smile:

Hi.

I am trying to animate a fade-in of a label where an icon is set.
If I fade-in a label with caption it works fine but when setting an icon to the label nothing happens (at least the icon is not to be seen)
The icon is set with the following call:

 delete.setIcon(new ThemeResource("images/delete.png/")); 

Is this possibly a problem with the addon or should the icon be loaded with a different Resource implementation (as StreamResource).

thx in advance

Sounds a bit strage, it shouldn’t have an effect if the icon is set. Haven’t tested that, though.

So you have a simple label with some value and some caption and also an icon, which you then fade in. And without the animation it works fine? Can you inspect the DOM after the animation to see if the img element is there and the size of it is correct?

Hi,
I’m facing a problem with this great addon, I add a disclousre to a verticalLayout and it works perfect it shows and hides its contents juss fine, then I added a second disclosure to the same verticallayout now the bottom disclosure works fine, but the top one only changes icon when its pressed but the content never appears, Is it something I’m doing or is it a bug?

Hello Jouni,
I’ve noticed the following problem with the version 1.6.4 of the animator addon.
I have a functioning “Vaadin GWT Maven” project. This project can be built with animator addon 1.6.3 and any Vaadin(GWT) version since 6.5. The project also works.
If I just change the version of the addon in the dependencies to version 1.6.4 and compiling the widgetset, the addon is still not found.

yazan:
Haven’t heard of such issue before, but I’ll check it out at some point. Could be a bug.

Martin:
Hmm, that’s odd, since 1.6.4 was specifically trying to fix some problem for Maven (see the release notes from the add-on page). I don’t know/use Maven enough to be able to guess where the problem is, sorry.

Can anyone else help?

Hello Jouni,

it seems to have been a local problem. After I compiled the project using Maven 2.2.1, it works with 1.6.4. Then try again with Maven 3.0.3, now it works too !?!?! :wink:

thanks Martin

Hi Jouni,

i have a requirement to have Disclosure inside a Disclosure component. But the height of the outer disclosure component is not calculated properly. But if i open and close the outer component its rendered correctly. I have attached the images of the problem. Could you please suggest some fix for this?

Regards,
Nedu
12286.png
12287.png

Hi All!

I just ported the Animator add-on to Vaadin 7 alpha 2. I have to inform that the Animator wrapper component didn’t survive the transition, so if you’re still using that, I encourage you to just use the AnimatorProxy, which should provide the same functionality, just in a different manner.

A couple of minor features and fixes are also there (for both Vaadin 6 and Vaadin 7 versions).

From now on version 1.7 will be dedicated to Vaadin 7 compatible version, and 1.6 will be for Vaadin 6.

Cheers,
Jouni

Hi,

Just started to use this component and noticed that in the latest jar (1.6.6) also the build directory is added to the root of the jar and thus duplicates all the class and other files. There might be some glitch in the ant build that causes this. It’s really a minor inconvenience but just so that you know.

cheers

Samuli

Hi Jouni,

can you give me an advice, how to use the AnimatorProxy on closing a window like this pseudo-code:


// somewhere in a Button-ClickListener
animatorProxy.animate(popupWindow, AnimType.FADE_OUT).setDuration(200).setDelay(100);
mainWindow.removeWindow(popupWindow);

Intended is to fade out the popupWindow on closing the popupWindow.

Cheers,
Dieter.

Hi,

You can use the AnimType.FADE_OUT_REMOVE for that. WIth the code you used, the window will be removed instantly before the animation is run (remember that your Java code is run on the server instantly line after line, but the actions they produce are applied in the client after the whole request is handled by the server).

Samuli: thanks for the heads-up, I’ll fix that in the next version.

I just noted that I have this exception in my logs. This prevents my session from being passivated/activated on restart.

WARNING: Error in serialization of the application: Class org.vaadin.jouni.animator.Disclosure$1 must implement serialization.

Has anyone successfully styled the disclosure panel to look different?

I want the top bar to have a gradient background and rather than the simple black and white icon I want to use a custom icon all the way on the right. I’ve been able to add the icon using an :after selector and content:, but whatever changes I make to the CSS for the regular disclosure styles in my Vaadin theme seem to be overridden by the CSS that comes built in with the Animator add-on. I’m not sure how add-ons are packaged or loaded or what the normal way of overriding add-on styles is, so feel free to tell me I’m doing it wrong.

Thanks,

Jason

The Animator add-on embeds the style sheet it uses in the widgetset (see
AnimatorWidgetset.gwt.xml
), which activates it automatically (no need for the user to import its theme) but makes it harder to override.

Try using “!important” in your CSS rules.

There are plans to improve packaging themes in add-ons in Vaadin 7.