/** Last known positiony read from UIDL or updated to application connection */
private int uidlPositionY = -1;
- private boolean modal = false;
+ private boolean vaadinModality = false;
private boolean resizable = true;
private boolean immediate;
public IWindow() {
- super(false, false, true); // no autohide, not modal, shadow
+ super(false, false, true); // no autohide, not vaadinModality, shadow
// Different style of shadow for windows
setShadowStyle("window");
@Override
protected void setZIndex(int zIndex) {
super.setZIndex(zIndex);
- if (modal) {
+ if (vaadinModality) {
DOM.setStyleAttribute(modalityCurtain, "zIndex", "" + zIndex);
}
}
}
if (!uidl.hasAttribute("cached")) {
- if (uidl.getBooleanAttribute("modal") != modal) {
- setModal(!modal);
+ if (uidl.getBooleanAttribute("vaadinModality") != vaadinModality) {
+ setVaadinModality(!vaadinModality);
}
if (!isAttached()) {
show();
@Override
public void show() {
- if (modal) {
+ if (vaadinModality) {
showModalityCurtain();
}
super.show();
@Override
public void hide() {
- if (modal) {
+ if (vaadinModality) {
hideModalityCurtain();
}
super.hide();
}
- private void setModal(boolean modality) {
- modal = modality;
- if (modal) {
+ private void setVaadinModality(boolean modality) {
+ vaadinModality = modality;
+ if (vaadinModality) {
modalityCurtain = DOM.createDiv();
DOM.setElementProperty(modalityCurtain, "className", CLASSNAME
+ "-modalitycurtain");
} else {
DeferredCommand.addCommand(new Command() {
public void execute() {
- // modal window must on top of others
+ // vaadinModality window must on top of others
bringToFront();
}
});
} else if (resizing) {
onResizeEvent(event);
return false;
- } else if (modal) {
- // return false when modal and outside window
+ } else if (vaadinModality) {
+ // return false when vaadinModality and outside window
final Element target = event.getTarget().cast();
if (!DOM.isOrHasChild(getElement(), target)) {
return false;