HierarchicalListView.st
changeset 3200 c5f79c9b5bd8
parent 2963 0e53c2bb4424
child 3204 3b6de876f7a2
equal deleted inserted replaced
3199:d8a392eaf97c 3200:c5f79c9b5bd8
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
       
    13 
       
    14 "{ Package: 'stx:libwidg2' }"
    12 "{ Package: 'stx:libwidg2' }"
    15 
    13 
    16 SelectionInListModelView subclass:#HierarchicalListView
    14 SelectionInListModelView subclass:#HierarchicalListView
    17 	instanceVariableNames:'imageInset imageWidth lineColor showRoot showLines
    15 	instanceVariableNames:'imageInset imageWidth lineColor showRoot showLines
    18 		useDefaultIcons icons openIndicator closeIndicator alignTextRight
    16 		useDefaultIcons icons openIndicator closeIndicator alignTextRight
  1172         expandOnSelect ifTrue:[
  1170         expandOnSelect ifTrue:[
  1173             newItem := self at:newIdx ifAbsent:nil.
  1171             newItem := self at:newIdx ifAbsent:nil.
  1174             newItem isNil ifTrue:[^ self].
  1172             newItem isNil ifTrue:[^ self].
  1175             newItem expand
  1173             newItem expand
  1176         ].
  1174         ].
  1177         self makeLineVisible:newIdx.
  1175         "/ done in buttonRelease
       
  1176 "/        self makeLineVisible:newIdx.
       
  1177     ].
       
  1178 !
       
  1179 
       
  1180 buttonRelease:button x:x y:y
       
  1181     "make selection visible after button release
       
  1182     "
       
  1183     super buttonRelease:button x:x y:y.
       
  1184 
       
  1185     (button == 1 or:[button == #select]) ifTrue:[
       
  1186         self hasSelection ifTrue:[
       
  1187             self makeSelectionVisible.
       
  1188         ].
  1178     ].
  1189     ].
  1179 !
  1190 !
  1180 
  1191 
  1181 keyPress:aKey x:x y:y
  1192 keyPress:aKey x:x y:y
  1182     "a key was pressed - handle page-keys here
  1193     "a key was pressed - handle page-keys here
  1649 ! !
  1660 ! !
  1650 
  1661 
  1651 !HierarchicalListView class methodsFor:'documentation'!
  1662 !HierarchicalListView class methodsFor:'documentation'!
  1652 
  1663 
  1653 version
  1664 version
  1654     ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.104 2006-07-03 10:32:48 fm Exp $'
  1665     ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.105 2007-03-12 15:23:59 ca Exp $'
  1655 ! !
  1666 ! !