From 125d2a926c1bc7213e732da053cc7ea5cb019c50 Mon Sep 17 00:00:00 2001 From: Adam Wagner Date: Mon, 10 Apr 2017 16:28:22 +0300 Subject: Make Button component draggable (#9038) * Make Button component draggable (#9037) * Add own state to button drag source --- .../com/vaadin/event/dnd/ButtonDragSource.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 server/src/main/java/com/vaadin/event/dnd/ButtonDragSource.java (limited to 'server/src/main/java/com/vaadin/event') diff --git a/server/src/main/java/com/vaadin/event/dnd/ButtonDragSource.java b/server/src/main/java/com/vaadin/event/dnd/ButtonDragSource.java new file mode 100644 index 0000000000..4c681f5331 --- /dev/null +++ b/server/src/main/java/com/vaadin/event/dnd/ButtonDragSource.java @@ -0,0 +1,42 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.event.dnd; + +import com.vaadin.shared.ui.dnd.ButtonDragSourceState; +import com.vaadin.ui.Button; + +/** + * Extension to make Button a drag source for HTML5 drag and drop functionality. + * + * @author Vaadin Ltd. + * @since 8.1 + */ +public class ButtonDragSource extends DragSourceExtension