// 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;
    		String style = button.getStyleName();
    		if (style != null && style.contains("delete-confirm")) {
    			button.removeStyleName("delete-confirm");
    		}
        	if (htmlContentAllowed) {
                button.setHTML(getState().delete);
        	} else {
        		button.setText(getState().delete);    		
            }
        	button.setEnabled(enable);
        }
    }
    	    
@Override
public DeleteButtonClientRenderer getRenderer() {
    return (DeleteButtonClientRenderer) super.getRenderer();
}

@Override
protected Renderer<Boolean> createRenderer() {
	return new DeleteButtonClientRenderer();
}

@Override
protected HandlerRegistration addClickHandler(
        RendererClickHandler<JsonObject> handler) {
    return getRenderer().addClickHandler(handler);
}

@Override
// 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;

    		String style = button.getStyleName();
    		if (style != null && style.contains("delete-confirm")) {
    			button.removeStyleName("delete-confirm");
    		}
        	if (htmlContentAllowed) {
                button.setHTML(getState().delete);
        	} else {
        		button.setText(getState().delete);    		
            }
        	button.setEnabled(enable);
        }
    }
    	    
@Override
public DeleteButtonClientRenderer getRenderer() {
    return (DeleteButtonClientRenderer) super.getRenderer();
}

@Override
protected Renderer<Boolean> createRenderer() {
	return new DeleteButtonClientRenderer();
}

@Override
protected HandlerRegistration addClickHandler(
        RendererClickHandler<JsonObject> handler) {
    return getRenderer().addClickHandler(handler);
}

@Override
public DeleteButtonRendererState getState() {