svn changeset:12067/svn branch:6.3tags/6.7.0.beta1
@@ -2259,6 +2259,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, | |||
public class VScrollTableRow extends Panel implements ActionOwner, | |||
Container { | |||
private static final int DRAGMODE_MULTIROW = 2; | |||
ArrayList<Widget> childWidgets = new ArrayList<Widget>(); | |||
private boolean selected = false; | |||
private final int rowKey; | |||
@@ -2547,7 +2548,8 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler, | |||
VDragEvent ev = VDragAndDropManager.get() | |||
.startDrag(transferable, event, true); | |||
if (selectMode == SELECT_MODE_MULTI | |||
if (dragmode == DRAGMODE_MULTIROW | |||
&& selectMode == SELECT_MODE_MULTI | |||
&& selectedRowKeys | |||
.contains("" + rowKey)) { | |||
ev.createDragImage( |
@@ -81,9 +81,16 @@ public class Table extends AbstractSelect implements Action.Container, | |||
*/ | |||
NONE, | |||
/** | |||
* Table starts drag from rows. | |||
* Table starts drag with a one row only. | |||
*/ | |||
ROWS | |||
ROW, | |||
/** | |||
* Table drags selected rows, if drag starts on a selected rows. Else it | |||
* starts like in ROW mode. Note, that in Transferable there will still | |||
* be only the row on which the drag started, other dragged rows need to | |||
* be checked from the source Table. | |||
*/ | |||
MULTIROW | |||
} | |||
private static final int CELL_KEY = 0; |
@@ -237,7 +237,7 @@ public class DDTest1 extends TestBase { | |||
ta.addContainerProperty("Bars", String.class, "Bar"); | |||
ta.setRowHeaderMode(Table.ROW_HEADER_MODE_ID); | |||
ta.setSizeFull(); | |||
ta.setDragMode(TableDragMode.ROWS); | |||
ta.setDragMode(TableDragMode.ROW); | |||
main.addComponent(pane1); | |||
main.addComponent(pane2); |
@@ -118,7 +118,7 @@ public class DDTest2 extends TestBase { | |||
/* | |||
* Make table rows draggable | |||
*/ | |||
table.setDragMode(Table.TableDragMode.ROWS); | |||
table.setDragMode(Table.TableDragMode.ROW); | |||
OverFolderNode onNode = new OverFolderNode(); | |||
DragSourceIs fromTable = new DragSourceIs(table); |
@@ -59,7 +59,7 @@ public class DDTest4 extends TestBase { | |||
/* | |||
* Make table rows draggable | |||
*/ | |||
table.setDragMode(Table.TableDragMode.ROWS); | |||
table.setDragMode(Table.TableDragMode.ROW); | |||
table.setDropHandler(new DropHandler() { | |||
// accept only drags from this table |
@@ -66,7 +66,7 @@ public class DDTest7 extends TestBase { | |||
/* | |||
* Make table rows draggable | |||
*/ | |||
table.setDragMode(Table.TableDragMode.ROWS); | |||
table.setDragMode(Table.TableDragMode.ROW); | |||
table.setDropHandler(new DropHandler() { | |||
// accept only drags from this table |
@@ -149,7 +149,7 @@ public class DDTest8 extends TestBase { | |||
public AcceptCriterion getAcceptCriterion() { | |||
return new Or(new AbstractSelect.OverItem(t, "Foo", "Bar"), | |||
new AbstractSelect.ContainsItem(t, "Foo")); | |||
new AbstractSelect.AcceptItem(t, "Foo")); | |||
} | |||
}; |