comparison dwtx/jface/viewers/TableTreeViewer.d @ 104:04b47443bb01

Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections. These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Aug 2008 15:01:33 +0200
parents 7ffeace6c47f
children
comparison
equal deleted inserted replaced
103:2d6540440fe6 104:04b47443bb01
25 import dwtx.jface.viewers.DoubleClickEvent; 25 import dwtx.jface.viewers.DoubleClickEvent;
26 import dwtx.jface.viewers.OpenEvent; 26 import dwtx.jface.viewers.OpenEvent;
27 import dwtx.jface.viewers.ITableLabelProvider; 27 import dwtx.jface.viewers.ITableLabelProvider;
28 import dwtx.jface.viewers.ViewerLabel; 28 import dwtx.jface.viewers.ViewerLabel;
29 29
30 import tango.util.collection.model.SeqView;
31 30
32 import dwt.DWT; 31 import dwt.DWT;
33 import dwt.custom.TableTree; 32 import dwt.custom.TableTree;
34 import dwt.custom.TableTreeEditor; 33 import dwt.custom.TableTreeEditor;
35 import dwt.custom.TableTreeItem; 34 import dwt.custom.TableTreeItem;
48 import dwt.widgets.Display; 47 import dwt.widgets.Display;
49 import dwt.widgets.Item; 48 import dwt.widgets.Item;
50 import dwt.widgets.Widget; 49 import dwt.widgets.Widget;
51 50
52 import dwt.dwthelper.utils; 51 import dwt.dwthelper.utils;
52 import dwtx.dwtxhelper.Collection;
53 53
54 /** 54 /**
55 * A concrete viewer based on a DWT <code>TableTree</code> control. 55 * A concrete viewer based on a DWT <code>TableTree</code> control.
56 * <p> 56 * <p>
57 * This class is not intended to be subclassed outside the viewer framework. It 57 * This class is not intended to be subclassed outside the viewer framework. It
321 * Return the properties for the column 321 * Return the properties for the column
322 * 322 *
323 * @return the array of column properties 323 * @return the array of column properties
324 */ 324 */
325 public Object[] getColumnProperties() { 325 public Object[] getColumnProperties() {
326 Object[] res; 326 return stringcast( columnProperties );
327 foreach( str; columnProperties ){
328 res ~= new ArrayWrapperString( str );
329 }
330 return res;
331 } 327 }
332 328
333 /** 329 /**
334 * Handles the mouse down event; activates the cell editor. 330 * Handles the mouse down event; activates the cell editor.
335 * 331 *
873 } 869 }
874 870
875 /* 871 /*
876 * (non-Javadoc) Method declared in AbstractTreeViewer. 872 * (non-Javadoc) Method declared in AbstractTreeViewer.
877 */ 873 */
878 protected override void setSelection(SeqView!(Item) items) { 874 protected override void setSelection(List items) {
879 getTableTree().setSelection(cast(TableTreeItem[]) items.toArray); 875 TableTreeItem[] newItems = arraycast!(TableTreeItem)(items.toArray());
876 getTableTree().setSelection(newItems);
880 } 877 }
881 878
882 /* 879 /*
883 * (non-Javadoc) Method declared in AbstractTreeViewer. 880 * (non-Javadoc) Method declared in AbstractTreeViewer.
884 */ 881 */