Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.DataTransfer


        notesEditor.getElement().getStyle().clearBackgroundColor();

        // Fill in the form.
        try {
          // Get the template the from the data transfer object.
          DataTransfer dataTransfer = event.getNativeEvent().getDataTransfer();
          int templateIndex = Integer.parseInt(dataTransfer.getData("text"));
          TaskProxy template = templateList.getVisibleItem(templateIndex);
          nameField.setValue(template.getName());
          notesEditor.setValue(template.getNotes());
        } catch (NumberFormatException e) {
          // The user probably dragged something other than a template.
View Full Code Here


    @Override
    public void onBrowserEvent(Context context, Element parent, TaskProxy value, NativeEvent event,
        ValueUpdater<TaskProxy> valueUpdater) {
      if ("dragstart".equals(event.getType())) {
        // Save the ID of the TaskProxy.
        DataTransfer dataTransfer = event.getDataTransfer();
        dataTransfer.setData("text", String.valueOf(context.getIndex()));

        // Set the image.
        dataTransfer.setDragImage(parent, 25, 15);
      }
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.DataTransfer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.