VDBThreadPresenter.st
changeset 22 6684f4d82301
child 23 ed5f4b55cee5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBThreadPresenter.st	Sun Sep 21 23:46:10 2014 +0100
@@ -0,0 +1,38 @@
+"{ Package: 'jv:vdb' }"
+
+VDBModelPresenter subclass:#VDBThreadPresenter
+	instanceVariableNames:'thread'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'VDB-Presentation'
+!
+
+!VDBThreadPresenter methodsFor:'displaying'!
+
+displayString
+    ^ thread displayString
+
+    "Created: / 21-09-2014 / 23:31:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBThreadPresenter methodsFor:'initialization'!
+
+setThread: aGDBThread
+    thread := aGDBThread
+
+    "Created: / 21-09-2014 / 23:39:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBThreadPresenter methodsFor:'protocol-accessing'!
+
+fetchChildren
+    "should compute the list of children via the model.
+     Be aware, that the somewhat stupid 'optimization' of how the model is fetched may lead to
+     a O(n*log n) or even O(n^2) behavior here.
+     *** to optimize: redefine by subClass"
+
+     ^ thread frames collect:[ :f | VDBFramePresenter new setFrame: f; parent: self ]
+
+    "Created: / 21-09-2014 / 23:42:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+