diff options
Diffstat (limited to 'src/com/vaadin/event')
11 files changed, 14 insertions, 60 deletions
diff --git a/src/com/vaadin/event/ListenerMethod.java b/src/com/vaadin/event/ListenerMethod.java index 1f1305fa69..f7dc8a7f13 100644 --- a/src/com/vaadin/event/ListenerMethod.java +++ b/src/com/vaadin/event/ListenerMethod.java @@ -43,9 +43,6 @@ import java.util.logging.Logger; @SuppressWarnings("serial") public class ListenerMethod implements EventListener, Serializable { - private static final Logger logger = Logger.getLogger(ListenerMethod.class - .getName()); - /** * Type of the event that should trigger this listener. Also the subclasses * of this class are accepted to trigger the listener. @@ -84,9 +81,10 @@ public class ListenerMethod implements EventListener, Serializable { out.writeObject(name); out.writeObject(paramTypes); } catch (NotSerializableException e) { - logger.warning("Error in serialization of the application: Class " - + target.getClass().getName() - + " must implement serialization."); + getLogger().warning( + "Error in serialization of the application: Class " + + target.getClass().getName() + + " must implement serialization."); throw e; } @@ -103,7 +101,7 @@ public class ListenerMethod implements EventListener, Serializable { // inner classes method = findHighestMethod(target.getClass(), name, paramTypes); } catch (SecurityException e) { - logger.log(Level.SEVERE, "Internal deserialization error", e); + getLogger().log(Level.SEVERE, "Internal deserialization error", e); } }; @@ -658,4 +656,8 @@ public class ListenerMethod implements EventListener, Serializable { return target; } + private static final Logger getLogger() { + return Logger.getLogger(ListenerMethod.class.getName()); + } + } diff --git a/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java b/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java index 87193e8b3e..52ffab9263 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java +++ b/src/com/vaadin/event/dd/acceptcriteria/AcceptAll.java @@ -7,7 +7,6 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; -import com.vaadin.terminal.gwt.client.ui.dd.VAcceptAll; /** * Criterion that accepts all drops anywhere on the component. @@ -18,7 +17,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VAcceptAll; * @since 6.3 * */ -@ClientCriterion(VAcceptAll.class) public final class AcceptAll extends ClientSideCriterion { private static final long serialVersionUID = 7406683402153141461L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/And.java b/src/com/vaadin/event/dd/acceptcriteria/And.java index 89c8cb377b..a0340a9cdb 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/And.java +++ b/src/com/vaadin/event/dd/acceptcriteria/And.java @@ -19,7 +19,6 @@ import com.vaadin.terminal.PaintTarget; * @since 6.3 * */ -@ClientCriterion(com.vaadin.terminal.gwt.client.ui.dd.VAnd.class) public class And extends ClientSideCriterion { private static final long serialVersionUID = -5242574480825471748L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/ClientCriterion.java b/src/com/vaadin/event/dd/acceptcriteria/ClientCriterion.java deleted file mode 100644 index 8b64106be7..0000000000 --- a/src/com/vaadin/event/dd/acceptcriteria/ClientCriterion.java +++ /dev/null @@ -1,29 +0,0 @@ -/* -@VaadinApache2LicenseForJavaFiles@ - */ -package com.vaadin.event.dd.acceptcriteria; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterion; - -/** - * An annotation type used to point the client side counterpart for server side - * a {@link AcceptCriterion} class. - * <p> - * Annotations are used at GWT compilation phase, so remember to rebuild your - * widgetset if you do changes for {@link ClientCriterion} mappings. - * - * @since 6.3 - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface ClientCriterion { - /** - * @return the client side counterpart for the annotated criterion - */ - Class<? extends VAcceptCriterion> value(); -} diff --git a/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java b/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java index 298a50a1d5..7eb04d9647 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java +++ b/src/com/vaadin/event/dd/acceptcriteria/ContainsDataFlavor.java @@ -10,7 +10,6 @@ import com.vaadin.event.Transferable; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VContainsDataFlavor; /** * A Criterion that checks whether {@link Transferable} contains given data @@ -19,7 +18,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VContainsDataFlavor; * * @since 6.3 */ -@ClientCriterion(VContainsDataFlavor.class) public class ContainsDataFlavor extends ClientSideCriterion { private String dataFlavorId; diff --git a/src/com/vaadin/event/dd/acceptcriteria/Not.java b/src/com/vaadin/event/dd/acceptcriteria/Not.java index 774dcc642e..85ff7e9bc9 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/Not.java +++ b/src/com/vaadin/event/dd/acceptcriteria/Not.java @@ -9,7 +9,6 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VNot; /** * Criterion that wraps another criterion and inverts its return value. @@ -17,7 +16,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VNot; * @since 6.3 * */ -@ClientCriterion(VNot.class) public class Not extends ClientSideCriterion { private static final long serialVersionUID = 1131422338558613244L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/Or.java b/src/com/vaadin/event/dd/acceptcriteria/Or.java index 2e7cdf45a3..077e9114d8 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/Or.java +++ b/src/com/vaadin/event/dd/acceptcriteria/Or.java @@ -9,7 +9,6 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VOr; /** * A compound criterion that accepts the drag if any of its criterion accepts @@ -20,7 +19,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VOr; * @since 6.3 * */ -@ClientCriterion(VOr.class) public class Or extends ClientSideCriterion { private static final long serialVersionUID = 1L; private AcceptCriterion criteria[]; diff --git a/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java b/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java index b3f4702c51..77840bc94f 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java +++ b/src/com/vaadin/event/dd/acceptcriteria/ServerSideCriterion.java @@ -8,7 +8,6 @@ import java.io.Serializable; import com.vaadin.event.Transferable; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VServerAccept; /** * Parent class for criteria which are verified on the server side during a drag @@ -27,7 +26,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VServerAccept; * * @since 6.3 */ -@ClientCriterion(VServerAccept.class) public abstract class ServerSideCriterion implements Serializable, AcceptCriterion { diff --git a/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java b/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java index 0d29e9a327..d7c47dc915 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java +++ b/src/com/vaadin/event/dd/acceptcriteria/SourceIs.java @@ -13,7 +13,6 @@ import com.vaadin.event.TransferableImpl; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VDragSourceIs; import com.vaadin.ui.Component; /** @@ -23,10 +22,7 @@ import com.vaadin.ui.Component; * @since 6.3 */ @SuppressWarnings("serial") -@ClientCriterion(VDragSourceIs.class) public class SourceIs extends ClientSideCriterion { - private static final Logger logger = Logger.getLogger(SourceIs.class - .getName()); private Component[] components; @@ -43,11 +39,11 @@ public class SourceIs extends ClientSideCriterion { if (c.getApplication() != null) { target.addAttribute("component" + paintedComponents++, c); } else { - logger.log( - Level.WARNING, - "SourceIs component {0} at index {1} is not attached to the component hierachy and will thus be ignored", - new Object[] { c.getClass().getName(), - Integer.valueOf(i) }); + Logger.getLogger(SourceIs.class.getName()) + .log(Level.WARNING, + "SourceIs component {0} at index {1} is not attached to the component hierachy and will thus be ignored", + new Object[] { c.getClass().getName(), + Integer.valueOf(i) }); } } target.addAttribute("c", paintedComponents); diff --git a/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java index 8303809140..454159b3da 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java +++ b/src/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java @@ -10,7 +10,6 @@ import com.vaadin.event.Transferable; import com.vaadin.event.TransferableImpl; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DropTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VSourceIsTarget; import com.vaadin.ui.Component; import com.vaadin.ui.Table; import com.vaadin.ui.Tree; @@ -26,7 +25,6 @@ import com.vaadin.ui.Tree; * @since 6.3 * */ -@ClientCriterion(VSourceIsTarget.class) public class SourceIsTarget extends ClientSideCriterion { private static final long serialVersionUID = -451399314705532584L; diff --git a/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java b/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java index 25371938d2..641fddc3ea 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java +++ b/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java @@ -10,7 +10,6 @@ import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.TargetDetails; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; -import com.vaadin.terminal.gwt.client.ui.dd.VTargetDetailIs; /** * Criterion for checking if drop target details contains the specific property @@ -21,7 +20,6 @@ import com.vaadin.terminal.gwt.client.ui.dd.VTargetDetailIs; * TODO add support for other basic data types that we support in UIDL. * */ -@ClientCriterion(VTargetDetailIs.class) public class TargetDetailIs extends ClientSideCriterion { private static final long serialVersionUID = 763165450054331246L; |