@@ -0,0 +1,1726 @@
+package com.akjava.gwt.lib.client.widget;%0D%0A%0D%0Aimport com.akjava.gwt.lib.client.LogUtils;%0D%0Aimport com.google.gwt.core.client.GWT;%0D%0Aimport com.google.gwt.event.logical.shared.ValueChangeEvent;%0D%0Aimport com.google.gwt.user.client.Event;%0D%0Aimport com.google.gwt.user.client.ui.TextArea;%0D%0A/**%0D%0A * only work on Chrome(web-kit)%0D%0A * to catch new value add addValueChangeHandler%0D%0A * %0D%0A * %09addValueChangeHandler(new ValueChangeHandler%3CString%3E() %7B%0D%0A%09%09%09%0D%0A%09%09%09@Override%0D%0A%09%09%09public void onValueChange(ValueChangeEvent%3CString%3E event) %7B%0D%0A%09%09%09%09GWT.log(%22changed:%22+event.getValue());%0D%0A%09%09%09%7D%0D%0A%09%09%7D);%0D%0A * ref%0D%0A * https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/CaNSdwfSK-A%0D%0A * @author aki%0D%0A *%0D%0A */%0D%0Apublic class PasteValueReceiveArea extends TextArea%7B%0D%0A%09%09public PasteValueReceiveArea()%7B%0D%0A%09%09%09super();%0D%0A%09%09%09sinkEvents(Event.ONPASTE);%0D%0A%09%09%09%0D%0A%09%09%09setReadOnly(true);%0D%0A%09%09%7D%0D%0A%09%09public void onBrowserEvent(Event event) %7B%0D%0A%09%09    super.onBrowserEvent(event);%0D%0A%09%09    switch (event.getTypeInt()) %7B%0D%0A%09%09        case Event.ONPASTE: %7B%0D%0A%09%09        %09LogUtils.log(event);%0D%0A%09%09        %09GWT.log(%22paste%22);%0D%0A%09%09        %09ValueChangeEvent.fire(this, getPastedText(event));%0D%0A%09%09            break;%0D%0A%09%09        %7D%0D%0A%09%09    %7D%0D%0A%09%09%7D%0D%0A%09%0D%0A%09%09/**%0D%0A%09%09 ref%0D%0A%09%09 * https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/CaNSdwfSK-A%0D%0A%09%09 */%0D%0A%09%09%0D%0A%09public static native String getPastedText(Event event)%0D%0A    /*-%7B%0D%0A%0D%0A        var text = %22%22;%0D%0A%0D%0A        if (event.clipboardData) // WebKit/Chrome/Safari%0D%0A        %7B%0D%0A            try%0D%0A            %7B%0D%0A                text = event.clipboardData.getData(%22Text%22);%0D%0A                return text;%0D%0A            %7D%0D%0A            catch (e)%0D%0A            %7B%0D%0A                %0D%0A            %7D%0D%0A        %7D%0D%0A        return text;%0D%0A        %7D-*/;%0D%0A%0D%0A%7D

add PasteValueReceiveArea