Hello, Im building a big application that uses a lot of DialogBoxes,
so I decided to made a new class who extends DialogBox, showing both
DialogBox and glassPanel:
public class FadedDialogBox extends DialogBox {
private GlassPanel _gpFade;
public FadedDialogBox() {
super();
}
public FadedDialogBox(boolean autoHide, boolean modal) {
super(autoHide, modal);
}
public FadedDialogBox(boolean autoHide) {
super(autoHide);
}
@Override
public void center() {
_gpFade = new GlassPanel(false);
RootPanel.get().add(_gpFade, 0, 0);
super.center();
}
@Override
public void show() {
_gpFade = new GlassPanel(false);
RootPanel.get().add(_gpFade, 0, 0);
super.show();
}
@Override
public void hide() {
super.hide();
_gpFade.removeFromParent();
}
@Override
public void hide(boolean autoClosed) {
super.hide(autoClosed);
_gpFade.removeFromParent();
}
public String getFadeStyleName() {
return _gpFade.getStyleName();
}
public void setFadeStyleName(String style) {
_gpFade.setStyleName(style);
}
}
My EntryPoint testing class:
public class Menu implements EntryPoint {
public void onModuleLoad() {
Alert a = new Alert("probando", "mucho");
a.show();
Alert b = new Alert("probando", "mucho mas de lo que te crees");
b.show();
}
}
When I show just one "FadedDialogBox" everything works fine, the
problem appears when I show two or more, then, the glassPanel shows
over both DialogBoxes. I tried to fix it changing show() method:
RootPanel.get().add(_gpFade, 0, 0);
to
RootPanel.get().add(_gpFade);
But in this case everything looks worse, the second "FadedDialogBox"
turns background to black.
Any ideas or suggestions? I'm quite lost.
(Sorry for my bad english).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---