// 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 java.lang.reflect.Method;
import org.vaadin.patrik.shared.DeleteButtonRendererServerRpc;
import org.vaadin.patrik.shared.DeleteButtonRendererState;
import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.Registration;
import com.vaadin.ui.Grid;
import com.vaadin.ui.Grid.Column;
import com.vaadin.ui.renderers.ButtonRenderer;
import com.vaadin.ui.renderers.ClickableRenderer;
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent;
import com.vaadin.util.ReflectTools;
        this("Delete","Confirm");
    }

    /**
     * Creates a new button renderer and adds the given click listener to it.
     *
     * @param listener
     *            the click listener to register
     */
    public DeleteButtonRenderer(DeleteRendererClickListener<T> listener) {
        this(listener, "Delete", "Confirm");
    }

    private void setupRpc() {
    	registerRpc(new DeleteButtonRendererServerRpc() {
    		public void onClick(String rowKey, MouseEventDetails mouseEventDetails) {
    	    	Grid<T> grid = getParentGrid();
    	        Object item = grid.getDataCommunicator().getKeyMapper().get(rowKey);
    	        Column<T, Boolean> column = getParent();
    	        fireEvent(new DeleteRendererClickEvent(grid,item,column,mouseEventDetails));
    		}
    	});
    }
    
    @Override
    public String getNullRepresentation() {
        return super.getNullRepresentation();
    }

    @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/DeleteButtonRenderer.java
import java.lang.reflect.Method;
import org.vaadin.patrik.shared.DeleteButtonRendererServerRpc;
import org.vaadin.patrik.shared.DeleteButtonRendererState;
import com.vaadin.event.ConnectorEventListener;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.Registration;
import com.vaadin.ui.Grid;
import com.vaadin.ui.Grid.Column;
import com.vaadin.ui.renderers.ButtonRenderer;
import com.vaadin.ui.renderers.ClickableRenderer;
import com.vaadin.ui.renderers.ClickableRenderer.RendererClickEvent;
import com.vaadin.util.ReflectTools;

        this("Delete","Confirm");
    }

    /**
     * Creates a new button renderer and adds the given click listener to it.
     *
     * @param listener
     *            the click listener to register
     */
    public DeleteButtonRenderer(DeleteRendererClickListener<T> listener) {
        this(listener, "Delete", "Confirm");
    }

    private void setupRpc() {
    	registerRpc(new DeleteButtonRendererServerRpc() {
    		public void onClick(String rowKey, MouseEventDetails mouseEventDetails) {
    	    	Grid<T> grid = getParentGrid();
    	        Object item = grid.getDataCommunicator().getKeyMapper().get(rowKey);
    	        Column<T, Boolean> column = getParent();
    	        fireEvent(new DeleteRendererClickEvent(grid,item,column,mouseEventDetails));
    		}
    	});
    }
    
    @Override
    public String getNullRepresentation() {
        return super.getNullRepresentation();
    }

    @Override
    protected DeleteButtonRendererState getState() {