added checking - can only show modal dialog in event listener
This commit is contained in:
parent
ab7f59032b
commit
6d33a6c7e3
|
@ -230,7 +230,10 @@ public class Messagebox extends Window implements EventListener
|
||||||
this.setWidth("500px");
|
this.setWidth("500px");
|
||||||
this.setPosition("center");
|
this.setPosition("center");
|
||||||
this.setClosable(true);
|
this.setClosable(true);
|
||||||
|
if (Events.inEventListener())
|
||||||
this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
|
this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
|
||||||
|
else
|
||||||
|
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
|
||||||
this.setSizable(true);
|
this.setSizable(true);
|
||||||
|
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
|
|
Loading…
Reference in New Issue