equal
deleted
inserted
replaced
302 hide := true. |
302 hide := true. |
303 self allChildrenDo:[:aChild| aChild hide:true]. |
303 self allChildrenDo:[:aChild| aChild hide:true]. |
304 ] |
304 ] |
305 ! |
305 ! |
306 |
306 |
|
307 collapseAllChildren |
|
308 "hide all my sub children |
|
309 " |
|
310 hide ifFalse:[ |
|
311 children notEmpty ifTrue:[ children do:[:c| c collapseAll] ] |
|
312 ] |
|
313 ! |
|
314 |
307 expand |
315 expand |
308 "show all my children |
316 "show all my children |
309 " |
317 " |
310 hide := false |
318 hide := false |
311 ! |
319 ! |
315 " |
323 " |
316 hide ifTrue:[ |
324 hide ifTrue:[ |
317 hide := false. |
325 hide := false. |
318 self allChildrenDo:[:aChild| aChild hide:false]. |
326 self allChildrenDo:[:aChild| aChild hide:false]. |
319 ] |
327 ] |
|
328 ! |
|
329 |
|
330 expandAllChildren |
|
331 "show all my children and sub children |
|
332 " |
|
333 hide := false. |
|
334 self allChildrenDo:[:aChild| aChild expandAll]. |
320 ! ! |
335 ! ! |
321 |
336 |
322 !TreeItem methodsFor:'accessing model'! |
337 !TreeItem methodsFor:'accessing model'! |
323 |
338 |
324 model |
339 model |
591 |
606 |
592 hasChildren |
607 hasChildren |
593 "returns true if any child exists |
608 "returns true if any child exists |
594 " |
609 " |
595 ^ self children notEmpty |
610 ^ self children notEmpty |
|
611 ! |
|
612 |
|
613 hasChildrenWithSubChildren |
|
614 "returns true if any child exists and has children too |
|
615 " |
|
616 self children do:[:aChild| |
|
617 aChild hasChildren ifTrue:[^ true]. |
|
618 ]. |
|
619 ^ false |
|
620 |
|
621 ! |
|
622 |
|
623 hasExpandedChildren |
|
624 "returns true if any of my children is expanded |
|
625 " |
|
626 children notEmpty ifTrue:[ |
|
627 children do:[:aChild| aChild hidden ifFalse:[^ true] ] |
|
628 ]. |
|
629 ^ false |
596 ! |
630 ! |
597 |
631 |
598 hidden |
632 hidden |
599 "returns true if node is not visible |
633 "returns true if node is not visible |
600 " |
634 " |
781 ! ! |
815 ! ! |
782 |
816 |
783 !TreeItem class methodsFor:'documentation'! |
817 !TreeItem class methodsFor:'documentation'! |
784 |
818 |
785 version |
819 version |
786 ^ '$Header: /cvs/stx/stx/libwidg2/TreeItem.st,v 1.16 1998-02-26 19:50:40 tz Exp $' |
820 ^ '$Header: /cvs/stx/stx/libwidg2/TreeItem.st,v 1.17 1998-04-03 08:39:40 ca Exp $' |
787 ! ! |
821 ! ! |