summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/event/DragRequest.java
blob: 21c75926fc97eb6cdd31d25cf39c400ebb734f76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.vaadin.event;

import java.util.HashMap;
import java.util.Map;

import com.vaadin.terminal.gwt.client.ui.dd.VDragAndDropManager.DragEventType;

public class DragRequest {

    private DragEventType dragEventType;
    private Map<String, Object> responseData;

    public DragRequest(DragEventType dragEventType) {
        this.dragEventType = dragEventType;
    }

    public DragEventType getType() {
        return dragEventType;
    }

    public Map<String, Object> getResponseData() {
        return responseData;
    }

    /**
     * DropHanler can pass simple parameters back to client side.
     * 
     * TODO define which types are supported (most likely the same as in UIDL)
     * 
     * @param key
     * @param value
     */
    public void setResponseParameter(String key, Object value) {
        if (responseData == null) {
            responseData = new HashMap<String, Object>();
        }
        responseData.put(key, value);
    }

}