// Path: GridFastNavigation-addon/src/main/java/org/vaadin/patrik/shared/DeleteButtonRendererServerRpc.java
// public interface DeleteButtonRendererServerRpc extends ServerRpc {
// 	
// 	public void onClick(String rowKey, MouseEventDetails mouseEventDetails);
// }
// 
// Path: GridFastNavigation-addon/src/main/java/org/vaadin/patrik/shared/DeleteButtonRendererState.java
// public class DeleteButtonRendererState extends ClickableRendererState {
//     public boolean htmlContentAllowed = false;
//     public String delete = "Delete";
//     public String confirm = "Confirm";
// }


import org.vaadin.patrik.shared.DeleteButtonRendererServerRpc;
import org.vaadin.patrik.shared.DeleteButtonRendererState;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
import com.vaadin.client.MouseEventDetailsBuilder;
import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.connectors.ClickableRendererConnector;
import com.vaadin.client.renderers.ClickableRenderer;
import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler;
import com.vaadin.client.renderers.Renderer;
import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.Connect;
import elemental.json.JsonObject;
            	}
            });
            b.setStylePrimaryName("v-nativebutton");
            return b;
        }

        public void setHtmlContentAllowed(boolean htmlContentAllowed) {
            this.htmlContentAllowed = htmlContentAllowed;
        }

        public boolean isHtmlContentAllowed() {
            return htmlContentAllowed;
        }

        @Override
        public void render(RendererCellReference cell, Boolean enable, Button button) {

			Element e = button.getElement();

            if(e.getPropertyString("rowKey") != getRowKey((JsonObject) cell.getRow())) {
                e.setPropertyString("rowKey",
                        getRowKey((JsonObject) cell.getRow()));
            }

    		String style = button.getStyleName();
    		if (style != null && style.contains("delete-confirm")) {
    			button.removeStyleName("delete-confirm");
    		}
        	if (htmlContentAllowed) {
                button.setHTML(getState().delete);
// Path: GridFastNavigation-addon/src/main/java/org/vaadin/patrik/shared/DeleteButtonRendererServerRpc.java
// public interface DeleteButtonRendererServerRpc extends ServerRpc {
// 	
// 	public void onClick(String rowKey, MouseEventDetails mouseEventDetails);
// }
// 
// Path: GridFastNavigation-addon/src/main/java/org/vaadin/patrik/shared/DeleteButtonRendererState.java
// public class DeleteButtonRendererState extends ClickableRendererState {
//     public boolean htmlContentAllowed = false;
//     public String delete = "Delete";
//     public String confirm = "Confirm";
// }


// Path: GridFastNavigation-addon/src/main/java/org/vaadin/patrik/client/DeleteButtonRendererConnector.java
import org.vaadin.patrik.shared.DeleteButtonRendererServerRpc;
import org.vaadin.patrik.shared.DeleteButtonRendererState;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Button;
import com.vaadin.client.MouseEventDetailsBuilder;
import com.vaadin.client.communication.RpcProxy;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.connectors.ClickableRendererConnector;
import com.vaadin.client.renderers.ClickableRenderer;
import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler;
import com.vaadin.client.renderers.Renderer;
import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.ui.Connect;
import elemental.json.JsonObject;

            	}
            });
            b.setStylePrimaryName("v-nativebutton");
            return b;
        }

        public void setHtmlContentAllowed(boolean htmlContentAllowed) {
            this.htmlContentAllowed = htmlContentAllowed;
        }

        public boolean isHtmlContentAllowed() {
            return htmlContentAllowed;
        }

        @Override
        public void render(RendererCellReference cell, Boolean enable, Button button) {

			Element e = button.getElement();

            if(e.getPropertyString("rowKey") != getRowKey((JsonObject) cell.getRow())) {
                e.setPropertyString("rowKey",
                        getRowKey((JsonObject) cell.getRow()));
            }

    		String style = button.getStyleName();
    		if (style != null && style.contains("delete-confirm")) {
    			button.removeStyleName("delete-confirm");
    		}
        	if (htmlContentAllowed) {
                button.setHTML(getState().delete);
        	} else {