setStyleAttribute("margin", "10px");
ContentPanel cp = new ContentPanel();
cp.setHeading("ListView Append Sorted");
cp.setSize(500, 225);
cp.setFrame(true);
cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
ListView<Stock> list1 = new ListView<Stock>();
list1.setDisplayProperty("name");
ListStore<Stock> store = new ListStore<Stock>();
store.setStoreSorter(new StoreSorter<Stock>());
store.add(TestData.getStocks());
list1.setStore(store);
ListView<Stock> list2 = new ListView<Stock>();
list2.setDisplayProperty("name");
store = new ListStore<Stock>();
store.setStoreSorter(new StoreSorter<Stock>());
list2.setStore(store);
new ListViewDragSource(list1);
new ListViewDragSource(list2);
new ListViewDropTarget(list1);
new ListViewDropTarget(list2);
RowData data = new RowData(.5, 1);
data.setMargins(new Margins(5));
cp.add(list1, data);
cp.add(list2, data);
add(cp);
cp = new ContentPanel();
cp.setHeading("ListView Insert");
cp.setStyleAttribute("marginTop", "10px");
cp.setSize(500, 225);
cp.setFrame(true);
cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
ListView<Stock> list3 = new ListView<Stock>();
list3.setDisplayProperty("name");
store = new ListStore<Stock>();
store.add(TestData.getStocks());