]> source.dussan.org Git - vaadin-framework.git/commitdiff
renamed setModal to setToolkitModality to avoid naming collision with GWT 1.6
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 28 Apr 2009 08:56:54 +0000 (08:56 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 28 Apr 2009 08:56:54 +0000 (08:56 +0000)
svn changeset:7545/svn branch:6.0

src/com/itmill/toolkit/terminal/gwt/client/ui/IWindow.java

index e329d410c0b90bad364b7353aafcedcfdd6dae25..ddb2c7f6a0003c5efa70ff05335e8aefbc076966 100644 (file)
@@ -104,7 +104,7 @@ public class IWindow extends IToolkitOverlay implements Container,
     /** 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;
 
@@ -135,7 +135,7 @@ public class IWindow extends IToolkitOverlay implements Container,
     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");
 
@@ -175,7 +175,7 @@ public class IWindow extends IToolkitOverlay implements Container,
     @Override
     protected void setZIndex(int zIndex) {
         super.setZIndex(zIndex);
-        if (modal) {
+        if (vaadinModality) {
             DOM.setStyleAttribute(modalityCurtain, "zIndex", "" + zIndex);
         }
     }
@@ -239,8 +239,8 @@ public class IWindow extends IToolkitOverlay implements Container,
         }
 
         if (!uidl.hasAttribute("cached")) {
-            if (uidl.getBooleanAttribute("modal") != modal) {
-                setModal(!modal);
+            if (uidl.getBooleanAttribute("vaadinModality") != vaadinModality) {
+                setVaadinModality(!vaadinModality);
             }
             if (!isAttached()) {
                 show();
@@ -485,7 +485,7 @@ public class IWindow extends IToolkitOverlay implements Container,
 
     @Override
     public void show() {
-        if (modal) {
+        if (vaadinModality) {
             showModalityCurtain();
         }
         super.show();
@@ -529,15 +529,15 @@ public class IWindow extends IToolkitOverlay implements Container,
 
     @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");
@@ -547,7 +547,7 @@ public class IWindow extends IToolkitOverlay implements Container,
             } else {
                 DeferredCommand.addCommand(new Command() {
                     public void execute() {
-                        // modal window must on top of others
+                        // vaadinModality window must on top of others
                         bringToFront();
                     }
                 });
@@ -900,8 +900,8 @@ public class IWindow extends IToolkitOverlay implements Container,
         } 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;