aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2007-10-21 16:22:39 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2007-10-21 16:22:39 +0000
commit541ca111b0540309a78f8e2a8d15f93d00176bdf (patch)
treec428327c122c2e09d4ca57d67297af695706c5db
parent7e5f5ce69a52562740aec9a94632ca2086cf359d (diff)
downloadvaadin-framework-541ca111b0540309a78f8e2a8d15f93d00176bdf.tar.gz
vaadin-framework-541ca111b0540309a78f8e2a8d15f93d00176bdf.zip
Deprecated dependency-framework. Fixes #871
svn changeset:2574/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/terminal/VariableOwner.java20
-rw-r--r--src/com/itmill/toolkit/ui/AbstractComponent.java41
-rw-r--r--src/com/itmill/toolkit/ui/CustomComponent.java42
3 files changed, 15 insertions, 88 deletions
diff --git a/src/com/itmill/toolkit/terminal/VariableOwner.java b/src/com/itmill/toolkit/terminal/VariableOwner.java
index 4564ceec58..b730125d34 100644
--- a/src/com/itmill/toolkit/terminal/VariableOwner.java
+++ b/src/com/itmill/toolkit/terminal/VariableOwner.java
@@ -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);
diff --git a/src/com/itmill/toolkit/ui/AbstractComponent.java b/src/com/itmill/toolkit/ui/AbstractComponent.java
index 13d40bc23d..62a34ba453 100644
--- a/src/com/itmill/toolkit/ui/AbstractComponent.java
+++ b/src/com/itmill/toolkit/ui/AbstractComponent.java
@@ -114,11 +114,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 *************************************** */
diff --git a/src/com/itmill/toolkit/ui/CustomComponent.java b/src/com/itmill/toolkit/ui/CustomComponent.java
index 56615a61c1..2c5267e033 100644
--- a/src/com/itmill/toolkit/ui/CustomComponent.java
+++ b/src/com/itmill/toolkit/ui/CustomComponent.java
@@ -73,11 +73,6 @@ public class CustomComponent implements Component {
private Component parent = null;
/**
- * Dependencies of the component, or null.
- */
- private HashSet dependencies = null;
-
- /**
* Type of the component.
*/
private String componentType = null;
@@ -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 -------------------- */