Mercurial > projects > dwt-win
comparison dwt/custom/TableTree.d @ 315:349b8c12e243
Sync dwt/custom with dwt-linux
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 07 Oct 2008 16:18:26 +0200 |
parents | a59d51c12b42 |
children |
comparison
equal
deleted
inserted
replaced
314:0e2b4fed7a0f | 315:349b8c12e243 |
---|---|
34 import dwt.widgets.Menu; | 34 import dwt.widgets.Menu; |
35 import dwt.widgets.Table; | 35 import dwt.widgets.Table; |
36 import dwt.widgets.TableItem; | 36 import dwt.widgets.TableItem; |
37 import dwt.widgets.TypedListener; | 37 import dwt.widgets.TypedListener; |
38 import dwt.custom.TableTreeItem; | 38 import dwt.custom.TableTreeItem; |
39 | |
40 import dwt.dwthelper.utils; | 39 import dwt.dwthelper.utils; |
41 | 40 |
42 /** | 41 /** |
43 * A TableTree is a selectable user interface object | 42 * A TableTree is a selectable user interface object |
44 * that displays a hierarchy of items, and issues | 43 * that displays a hierarchy of items, and issues |
774 * | 773 * |
775 * @see TableTree#deselectAll() | 774 * @see TableTree#deselectAll() |
776 */ | 775 */ |
777 public void setSelection (TableTreeItem[] items) { | 776 public void setSelection (TableTreeItem[] items) { |
778 checkWidget (); | 777 checkWidget (); |
779 // DWT extension: allow null array | 778 // DWT extension: allow null for zero length string |
780 //if (items is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); | 779 //if (items is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); |
781 int length = items.length; | 780 int length = items.length; |
782 if (length is 0 || ((table.getStyle() & DWT.SINGLE) !is 0 && length > 1)) { | 781 if (length is 0 || ((table.getStyle() & DWT.SINGLE) !is 0 && length > 1)) { |
783 deselectAll(); | 782 deselectAll(); |
784 return; | 783 return; |