You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by no...@apache.org on 2009/09/03 19:31:54 UTC
svn commit: r811051 -
/labs/hupa/client/src/main/java/org/apache/hupa/client/widgets/DragRefetchPagingScrollTable.java
Author: norman
Date: Thu Sep 3 17:31:53 2009
New Revision: 811051
URL: http://svn.apache.org/viewvc?rev=811051&view=rev
Log:
Get sure we just remove the cell if it was set previous
Modified:
labs/hupa/client/src/main/java/org/apache/hupa/client/widgets/DragRefetchPagingScrollTable.java
Modified: labs/hupa/client/src/main/java/org/apache/hupa/client/widgets/DragRefetchPagingScrollTable.java
URL: http://svn.apache.org/viewvc/labs/hupa/client/src/main/java/org/apache/hupa/client/widgets/DragRefetchPagingScrollTable.java?rev=811051&r1=811050&r2=811051&view=diff
==============================================================================
--- labs/hupa/client/src/main/java/org/apache/hupa/client/widgets/DragRefetchPagingScrollTable.java (original)
+++ labs/hupa/client/src/main/java/org/apache/hupa/client/widgets/DragRefetchPagingScrollTable.java Thu Sep 3 17:31:53 2009
@@ -24,7 +24,6 @@
import org.apache.hupa.client.dnd.PagingScrollTableRowDragController;
import org.apache.hupa.widgets.ui.RefetchPagingScrollTable;
-import com.allen_sauer.gwt.dnd.client.DragHandler;
import com.allen_sauer.gwt.dnd.client.DragHandlerAdapter;
import com.allen_sauer.gwt.dnd.client.DragStartEvent;
import com.google.gwt.gen2.table.client.AbstractColumnDefinition;
@@ -61,10 +60,10 @@
}
@SuppressWarnings("unchecked")
- public void setDragHandler(int cellIndex,int cellWidth,DragHandlerFactory factory) {
+ public void setDragHandler(int newCellIndex,int cellWidth,DragHandlerFactory factory) {
this.factory = factory;
- this.cellIndex = cellIndex;
- if (cellIndex < 0) {
+
+ if (newCellIndex < 0) {
throw new IllegalArgumentException("cellIndex needs to be higher then 0");
}
@@ -75,6 +74,8 @@
tableDef.removeColumnDefinition(tableDef.getColumnDefinition(cellIndex));
}
+ this.cellIndex = newCellIndex;
+
// Create new ghost definition which will get used later to add the drag widget
DragColumnDefinition def = new DragColumnDefinition();
def.setColumnSortable(false);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org