![]() | |
AlignmentMorph newRow
addMorph: (EllipseMorph new extent: 40@40; color: Color red);
addMorph: (EllipseMorph new extent: 50@50; color: Color yellow);
addMorph: (EllipseMorph new extent: 60@60; color: Color green);
addMorph: (EllipseMorph new extent: 70@70; color: Color blue);
position: 20@20;
openInWorld
Try also newColumn instead of newRow.
Try using addMorphBack: instead of addMorph.
| d | d := AlignmentMorph newRow. d centering: #center. d color: Color yellow. d borderColor: Color blue. d vResizing: #shrinkWrap. d hResizing: #shrinkWrap. d addMorph: (StringMorph contents: aClass name). d openToDragNDrop: true. ^dcreateClassHierarchyMorph: aClass | col d subCls | d := self createClassNameMorph: aClass. (subCls := aClass subclasses) isNil ifTrue: [^d] . col := AlignmentMorph newColumn. subCls do: [ :aSubclass | col addMorph: (self createClassHierarchyMorph: aSubclass)]. d addMorphBack: col. ^d