1 "{ Encoding: utf8 }" |
|
2 |
|
3 " |
1 " |
4 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
2 Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
5 Copyright (c) 2009-2010 eXept Software AG |
3 Copyright (c) 2009-2010 eXept Software AG |
6 |
4 |
7 Permission is hereby granted, free of charge, to any person |
5 Permission is hereby granted, free of charge, to any person |
268 |
266 |
269 aList do:[:each|each parent: self]. |
267 aList do:[:each|each parent: self]. |
270 ^super basicAddAll:aList beforeIndex:anIndex |
268 ^super basicAddAll:aList beforeIndex:anIndex |
271 |
269 |
272 "Created: / 23-05-2011 / 14:10:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
270 "Created: / 23-05-2011 / 14:10:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
273 ! |
|
274 |
|
275 basicRemoveFromIndex:startIndex toIndex:stopIndex |
|
276 "remove the children from startIndex up to and including |
|
277 the child under stopIndex." |
|
278 |
|
279 |model notify |
|
280 index "{ Class:SmallInteger }" |
|
281 start "{ Class:SmallInteger }" |
|
282 stop "{ Class:SmallInteger }" |
|
283 size "{ Class:SmallInteger }"| |
|
284 |
|
285 size := self children size. |
|
286 stop := stopIndex. |
|
287 start := startIndex. |
|
288 (stop <= size and:[ start between:1 and:stop ]) |
|
289 ifFalse:[ ^ self subscriptBoundsError:index ]. |
|
290 start == 1 |
|
291 ifTrue:[ notify := self ] |
|
292 ifFalse: |
|
293 [ stop == size |
|
294 ifTrue:[ notify := self at:(start - 1) ] |
|
295 ifFalse:[ notify := nil ] ]. |
|
296 (model := self model) notNil |
|
297 ifTrue: |
|
298 [ index := model identityIndexOf:(children at:start). |
|
299 size := stop - start + 1. ] |
|
300 ifFalse:[ index := 0 ]. |
|
301 children |
|
302 from:start |
|
303 to:stop |
|
304 do: |
|
305 [:aChild | |
|
306 index ~~ 0 ifTrue:[ size := size + aChild numberOfVisibleChildren ]. |
|
307 aChild parent:nil ]. |
|
308 children removeFromIndex:start toIndex:stop. |
|
309 index ~~ 0 |
|
310 ifTrue:[ model itemRemoveFromIndex:index toIndex:(index + size - 1) ]. |
|
311 notify notNil ifTrue:[ notify changed ]. |
|
312 |
|
313 "Created: / 23-05-2011 / 16:21:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
314 ! ! |
271 ! ! |
315 |
272 |
316 !Bookmark methodsFor:'change & update'! |
273 !Bookmark methodsFor:'change & update'! |
317 |
274 |
318 changed:aspect with:param |
275 changed:aspect with:param |
795 className isNil ifTrue:[^self]. |
752 className isNil ifTrue:[^self]. |
796 selector isNil ifTrue:[^self]. |
753 selector isNil ifTrue:[^self]. |
797 |
754 |
798 label := |
755 label := |
799 (className copyFrom: ((className lastIndexOf: $:) + 1)) allBold , |
756 (className copyFrom: ((className lastIndexOf: $:) + 1)) allBold , |
800 ' » ' , (selector "asText allItalic") |
757 ' » ' , (selector "asText allItalic") |
801 |
758 |
802 "Created: / 05-05-2011 / 23:04:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
759 "Created: / 05-05-2011 / 23:04:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
803 "Modified: / 02-06-2011 / 22:00:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
760 "Modified: / 02-06-2011 / 22:00:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
804 "Modified: / 18-11-2011 / 14:31:19 / cg" |
761 "Modified: / 18-11-2011 / 14:31:19 / cg" |
805 ! ! |
762 ! ! |