SmallSense__PO.st
changeset 90 4035038db277
parent 67 020b7461b15e
child 115 254c4f5dc963
--- a/SmallSense__PO.st	Wed Sep 18 00:58:49 2013 +0100
+++ b/SmallSense__PO.st	Wed Sep 18 00:59:55 2013 +0100
@@ -4,12 +4,24 @@
 
 HierarchicalItem subclass:#PO
 	instanceVariableNames:'subject icon label name description'
-	classVariableNames:''
+	classVariableNames:'IconWidth'
 	poolDictionaries:''
 	category:'SmallSense-Core-Interface-PO'
 !
 
 
+!PO class methodsFor:'initialization'!
+
+initialize
+    "Invoked at system start or when the class is dynamically loaded."
+
+    "/ please change as required (and remove this comment)
+
+    IconWidth := 16.
+
+    "Modified: / 18-09-2013 / 00:13:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PO class methodsFor:'Instance Creation'!
 
 name: name description:description
@@ -90,34 +102,22 @@
 
 !PO methodsFor:'displaying'!
 
-displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
-    | cx checkedI subjectI app |
+displayLabel:aLabel h:lH on:aGC x:x y:y h:h
+    | cx iconOrNil |
+
+    cx := x.
 
-    cx := "x :=" newX.
-"/    self displayCheckbox ifTrue:[
-"/        app := self application.
-"/        checkedI := self checked
-"/                    ifTrue:[MenuPanel iconIndicationOn]
-"/                    ifFalse:[MenuPanel iconIndicationOff].
-"/        checkedI displayOn: aGC x: cx y: y + (h / 2) - (checkedI height / 2).
-"/        cx := cx + 22."experimental value - this looks good"
-"/    ] ifFalse:[
-"/        (parent notNil and: [parent displayCheckbox]) ifTrue:[
-"/            cx := cx + 22."experimental value - this looks good"
-"/        ]
-"/    ].
+    iconOrNil := self icon.
+    iconOrNil notNil ifTrue:[
+        iconOrNil displayOn: aGC x: cx y: y + (h / 2) - (iconOrNil height / 2).
+    ].
 
-    subjectI := self icon.
-    subjectI notNil ifTrue:[
-        subjectI displayOn: aGC x: cx y: y + (h / 2) - (subjectI height / 2).
-    ].
-"/    (subjectI notNil or:[parent subjectIcon notNil]) ifTrue:[
-        cx := cx + 16."experimental value - this looks good"
-"/    ].
+    cx := cx + IconWidth.
 
     super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h
 
     "Created: / 24-07-2013 / 00:22:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-09-2013 / 00:13:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PO methodsFor:'new'!
@@ -184,3 +184,5 @@
     ^ '$Id: SmallSenseResultItem.st 7825 2011-11-26 18:32:31Z vranyj1 $'
 ! !
 
+
+PO initialize!