]> source.dussan.org Git - vaadin-framework.git/commitdiff
Deprecated
authorJani Laakso <jani.laakso@itmill.com>
Fri, 1 Feb 2008 08:20:20 +0000 (08:20 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Fri, 1 Feb 2008 08:20:20 +0000 (08:20 +0000)
 * public Button(String caption, Object target, String methodName)
 * public CheckBox(String caption, Object target, String methodName)
Reason: Using this method is discouraged because it cannot be checked during compilation. Java reflect is done through string variable. Error prone and this does not survive re-factoring (=> applications brake).

Typo fixes.

svn changeset:3693/svn branch:trunk

src/com/itmill/toolkit/event/MethodEventSource.java
src/com/itmill/toolkit/ui/AbstractComponentContainer.java
src/com/itmill/toolkit/ui/Button.java
src/com/itmill/toolkit/ui/CheckBox.java

index 9718bfcd6806b6f4e2a66cf568093d5643300cbe..e80cf80fcf107a41db76385d838f87bf2f57a9e6 100644 (file)
@@ -8,7 +8,7 @@ import java.lang.reflect.Method;
 
 /**
  * <p>
- * Interface for classes supporting registeration of methods as event receivers.
+ * Interface for classes supporting registration of methods as event receivers.
  * </p>
  * 
  * <p>
index eaf3274de15caabe91f03ca24468c770721076cf..5251e99438ffac5c35d0243e58d27329db181c38 100644 (file)
@@ -31,7 +31,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
 
     /**
      * Removes all components from the container. This should probably be
-     * reimplemented in extending classes for a more powerfull implementation.
+     * re-implemented in extending classes for a more powerful implementation.
      */
     public void removeAllComponents() {
         final LinkedList l = new LinkedList();
index 5f8a00de8ec380ece5ac99c8d398b01e0338d4c6..605cac85b7479d5b4afffe0600ee2dcdf71f9ab1 100644 (file)
@@ -74,6 +74,10 @@ public class Button extends AbstractField {
      * @param methodName
      *                the name of the method in target object, that receives
      *                button click events.
+     * @deprecated Use
+     *             {@link #Button(String, com.itmill.toolkit.ui.Button.ClickListener)}
+     *             instead. Using this method is discouraged because it cannot
+     *             be checked during compilation.
      */
     public Button(String caption, Object target, String methodName) {
         this(caption);
index 97558e4fc09251803ad6725ad5ff0dd32119c497..12edb77bff206552389cd3562bb9f37d55202e2a 100644 (file)
@@ -4,6 +4,8 @@
 
 package com.itmill.toolkit.ui;
 
+import java.lang.reflect.Method;
+
 import com.itmill.toolkit.data.Property;
 
 public class CheckBox extends Button {
@@ -54,6 +56,10 @@ public class CheckBox extends Button {
      * @param methodName
      *                the name of the method in target object, that receives
      *                button click events.
+     * @deprecated Use {@link #addListener(Class, Object, Method)} or
+     *             {@link #addListener(com.itmill.toolkit.ui.Component.Listener)}
+     *             instead. Using this method is discouraged because it cannot
+     *             be checked during compilation.
      */
     public CheckBox(String caption, Object target, String methodName) {
         setCaption(caption);