#REFACTORING by cg default
authorClaus Gittinger <cg@exept.de>
Sat, 02 May 2020 19:51:31 +0200
changeset 6245 2cc0840f6d85
parent 6244 2050c2ab251c
#REFACTORING by cg class: HierarchicalListView class added: #example2 removed: #test
HierarchicalListView.st
--- a/HierarchicalListView.st	Sat May 02 19:50:29 2020 +0200
+++ b/HierarchicalListView.st	Sat May 02 19:51:31 2020 +0200
@@ -104,6 +104,33 @@
 "
 !
 
+example2
+"
+    |top sel list item|
+
+    list := HierarchicalList new.
+    item := HierarchicalItem::Example label:'Root Item'.
+
+    item expand.
+    list showRoot:false.
+    list root:item.
+
+    top := StandardSystemView extent:300@300.
+    sel := ScrollableView for:HierarchicalListView miniScrollerH:true
+                       origin:0.0@0.0 corner:1.0@1.0 in:top.
+
+    sel useDefaultIcons:false.
+    sel list:list.
+    sel multipleSelectOk:true.
+    sel showLines:false.
+
+    sel doubleClickAction:[:i| (list at:i) toggleExpand ].
+    sel   indicatorAction:[:i| (list at:i) toggleExpand ].
+
+    top open.
+"
+!
+
 examples
 "
     show a hierarchical list
@@ -203,31 +230,6 @@
 
 
 "
-!
-
-test
-    |top sel list item|
-
-    list := HierarchicalList new.
-    item := HierarchicalItem::Example labeled:'Root Item'.
-
-    item expand.
-    list showRoot:false.
-    list root:item.
-
-    top := StandardSystemView extent:300@300.
-    sel := ScrollableView for:HierarchicalListView miniScrollerH:true
-                       origin:0.0@0.0 corner:1.0@1.0 in:top.
-
-    sel useDefaultIcons:false.
-    sel list:list.
-    sel multipleSelectOk:true.
-    sel showLines:false.
-
-    sel doubleClickAction:[:i| (list at:i) toggleExpand ].
-    sel   indicatorAction:[:i| (list at:i) toggleExpand ].
-
-    top open.
 ! !
 
 !HierarchicalListView class methodsFor:'resources'!