]> source.dussan.org Git - vaadin-framework.git/commitdiff
Deprecated dependency-framework. Fixes #871
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Sun, 21 Oct 2007 16:22:39 +0000 (16:22 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Sun, 21 Oct 2007 16:22:39 +0000 (16:22 +0000)
svn changeset:2574/svn branch:trunk

src/com/itmill/toolkit/terminal/VariableOwner.java
src/com/itmill/toolkit/ui/AbstractComponent.java
src/com/itmill/toolkit/ui/CustomComponent.java

index 4564ceec58428f3cd89b685d8ee49937007190a7..b730125d34e8446371234146ea5eef1e384df33a 100644 (file)
@@ -62,14 +62,12 @@ import java.util.Set;
 public interface VariableOwner {
 
        /**
-        * Gets the variable change listeners this <code>VariableOwner</code>
-        * directly depends on. This list does not contain any indirect
-        * dependencies, for example, if A depends on B and B depends on C, the
-        * dependency list of A does not include C.
-        * 
+        * Dependencies are not needed anymore as HTML-mode is deprecated in Toolkit 5.
+        *       * 
         * @return Set of <code>VariableOwners</code> this component directly
         *         depend on, <code>null</code> if this component does not depend
         *         on anybody.
+        * @deprecated
         */
        public Set getDirectDependencies();
 
@@ -86,26 +84,22 @@ public interface VariableOwner {
        public void changeVariables(Object source, Map variables);
 
        /**
-        * Makes this <code>VariableOwner</code> depend on the given
-        * <code>VariableOwner</code>. This means that any variable change events
-        * relating to <code>depended</code> must be sent before any such events
-        * that relate to this object.
+        * Dependencies are not needed anymore as HTML-mode is deprecated in Toolkit 5.
         * 
         * @param depended
         *            the <code>VariableOwner</code> component who this component
         *            depends on.
+        * @deprecated
         */
        public void dependsOn(VariableOwner depended);
 
        /**
-        * Removes the given component from this component's dependency list. After
-        * the call this component will no longer depend on <code>depended</code>
-        * wdepende direct dependency from the component. Indirect dependencies are
-        * not removed.
+        * Dependencies are not needed anymore as HTML-mode is deprecated in Toolkit 5.
         * 
         * @param depended
         *            the component to be removed from this component's dependency
         *            list.
+        * @deprecated
         */
        public void removeDirectDependency(VariableOwner depended);
 
index 13d40bc23d35261b18066f5449f2094346950b93..62a34ba453f0c6f76ec3a54adb5c7ea2fe17846e 100644 (file)
@@ -113,11 +113,6 @@ public abstract class AbstractComponent implements Component, MethodEventSource
         */
        private ErrorMessage componentError = null;
 
-       /**
-        * List of event variable change event handling dependencies.
-        */
-       private Set dependencies = null;
-
        /**
         * Immediate mode: if true, all variable changes are required to be sent
         * from the terminal immediately.
@@ -692,39 +687,11 @@ public abstract class AbstractComponent implements Component, MethodEventSource
 
        }
 
-       /*
-        * Adds a variable-change dependency to this component. Don't add a JavaDoc
-        * comment here, we use the default documentation from implemented
-        * interface.
-        */
-       public void dependsOn(VariableOwner depended) {
-
-               // Assure that the list exists
-               if (dependencies == null)
-                       dependencies = new HashSet();
-
-               // Add to the list of dependencies
-               if (depended != null)
-                       dependencies.add(depended);
-       }
-
-       /*
-        * Removes a dependency from the component. Don't add a JavaDoc comment
-        * here, we use the default documentation from implemented interface.
-        */
-       public void removeDirectDependency(VariableOwner depended) {
-
-               // Removes the listener if necessary
-               if (dependencies != null && depended != null)
-                       dependencies.remove(depended);
-       }
-
-       /*
-        * Gets the set of depended components. Don't add a JavaDoc comment here, we
-        * use the default documentation from implemented interface.
-        */
+       /* Dependency -framework is deprecated */
+       public void dependsOn(VariableOwner depended) {}
+       public void removeDirectDependency(VariableOwner depended) {}
        public Set getDirectDependencies() {
-               return dependencies;
+               return null;
        }
 
        /* General event framework *************************************** */
index 56615a61c13dab28ab7ec5d337ae48a0ebff9796..2c5267e03396150f353112edae33c534cb9ea55f 100644 (file)
@@ -72,11 +72,6 @@ public class CustomComponent implements Component {
         */
        private Component parent = null;
 
-       /**
-        * Dependencies of the component, or null.
-        */
-       private HashSet dependencies = null;
-
        /**
         * Type of the component.
         */
@@ -437,42 +432,13 @@ public class CustomComponent implements Component {
        public void changeVariables(Object source, Map variables) {
        }
 
-       /**
-        * Makes this <code>VariableOwner</code> depend on the given
-        * <code>VariableOwner</code>.
-        * 
-        * @see com.itmill.toolkit.terminal.VariableOwner#dependsOn(com.itmill.toolkit.terminal.VariableOwner)
-        */
-       public void dependsOn(VariableOwner depended) {
-               if (depended == null)
-                       return;
-               if (dependencies == null)
-                       dependencies = new HashSet();
-               dependencies.add(depended);
-       }
-
-       /**
-        * Gets the variable change listeners this <code>VariableOwner</code>
-        * directly depends on.
-        * 
-        * @see com.itmill.toolkit.terminal.VariableOwner#getDirectDependencies()
-        */
+       /* Dependency -framework is deprecated */
+       public void dependsOn(VariableOwner depended) {}
+       public void removeDirectDependency(VariableOwner depended) {}
        public Set getDirectDependencies() {
-               return dependencies;
+               return null;
        }
 
-       /**
-        * Removes the given component from this component's dependency list.
-        * 
-        * @see com.itmill.toolkit.terminal.VariableOwner#removeDirectDependency(com.itmill.toolkit.terminal.VariableOwner)
-        */
-       public void removeDirectDependency(VariableOwner depended) {
-               if (dependencies == null)
-                       return;
-               dependencies.remove(depended);
-               if (dependencies.isEmpty())
-                       dependencies = null;
-       }
 
        /* Event functions are not implemented by default -------------------- */