01: package org.romaframework.aspect.view.echo2.effects;
02:
03: import nextapp.echo2.app.Component;
04:
05: public class ModalDimmerEffect {
06:
07: /**
08: * Show the effect
09: *
10: * @param iComponent
11: * Component where to place the effect
12: */
13: public static synchronized void show(Component iComponent) {
14: // Integer alreadyUsed = (Integer) Echo2ApplicationContext.getActive().getContextProperty("_DIMMER");
15: //
16: // if (alreadyUsed == null)
17: // alreadyUsed = 0;
18: //
19: // if (alreadyUsed == 0) {
20: // ModalDimmer dimmer = new ModalDimmer();
21: // dimmer.setDimAnimationSpeed(0.7f);
22: // iComponent.add(dimmer);
23: // }
24: //
25: // Echo2ApplicationContext.getActive().setContextProperty("_DIMMER", alreadyUsed + 1);
26: }
27:
28: /**
29: * Hide the effect
30: *
31: * @param iComponent
32: * Component where to place the effect
33: */
34: public static synchronized void hide(Component iComponent) {
35: // Integer alreadyUsed = (Integer) Echo2ApplicationContext.getActive().getContextProperty("_DIMMER");
36: // if (alreadyUsed == null || alreadyUsed == 0)
37: // return;
38: //
39: // Echo2ApplicationContext.getActive().setContextProperty("_DIMMER", alreadyUsed - 1);
40: }
41: }
|