Tools__HierarchicalChangeList.st
changeset 10008 5c7883f08877
child 10063 95afc8c9529d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Tools__HierarchicalChangeList.st	Fri Jul 01 15:35:55 2011 +0200
@@ -0,0 +1,131 @@
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+	      All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+"{ Package: 'stx:libtool' }"
+
+"{ NameSpace: Tools }"
+
+ChangeList subclass:#HierarchicalChangeList
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Browsers-ChangeSet'
+!
+
+!HierarchicalChangeList class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+	      All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+! !
+
+!HierarchicalChangeList class methodsFor:'interface specs'!
+
+windowSpec
+    "This resource specification was automatically generated
+     by the UIPainter of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the UIPainter may not be able to read the specification."
+
+    "
+     UIPainter new openOnClass:Tools::HierarchicalChangeList andSelector:#windowSpec
+     Tools::HierarchicalChangeList new openInterface:#windowSpec
+     Tools::HierarchicalChangeList open
+    "
+
+    <resource: #canvas>
+
+    ^ 
+     #(FullSpec
+        name: windowSpec
+        window: 
+       (WindowSpec
+          label: 'ChangeList'
+          name: 'ChangeList'
+          min: (Point 10 10)
+          bounds: (Rectangle 0 0 300 300)
+        )
+        component: 
+       (SpecCollection
+          collection: (
+           (HierarchicalListViewSpec
+              name: 'ChangeList'
+              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+              model: selectionHolder
+              menu: listMenu
+              hasHorizontalScrollBar: true
+              hasVerticalScrollBar: true
+              listModel: listHolder
+              multipleSelectOk: true
+              useIndex: false
+              highlightMode: line
+              showLines: false
+              useDefaultIcons: false
+              postBuildCallback: postBuildList:
+            )
+           )
+         
+        )
+      )
+! !
+
+!HierarchicalChangeList methodsFor:'aspects'!
+
+listHolder
+    "return/create the 'changeList' value holder (automatically generated)"
+    
+    listHolder isNil ifTrue:[
+        listHolder := (HierarchicalList new)            
+                    showRoot:false;
+                    application: self;
+                    yourself
+    ].
+    ^ listHolder
+
+    "Created: / 25-07-2009 / 23:34:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!HierarchicalChangeList methodsFor:'private'!
+
+updateList
+    |inGenerator changeset root|
+
+    inGenerator := self inGeneratorHolder value.
+    changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ].
+    root := (Tools::ChangeList::ListEntry 
+                    change:(CompositeChange name:'Change set' changes:changeset))
+                    parent: self listHolder;
+                    expand;
+                    yourself.
+    root children do:[:e|e expand].
+
+    self listHolder root:root
+! !
+
+!HierarchicalChangeList class methodsFor:'documentation'!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalChangeList.st,v 1.1 2011-07-01 13:35:55 cg Exp $'
+!
+
+version_SVN
+    ^ '§Id: Tools__HierarchicalChangeList.st 7486 2009-10-26 22:06:24Z vranyj1 §'
+! !