Tools__BrowserListWithFilter.st
branchjv
changeset 12401 4714b9640528
parent 12321 13d791d84a47
parent 11562 270c71f65f43
child 12431 9f0c59c742d5
equal deleted inserted replaced
12330:235b77901045 12401:4714b9640528
    11 "
    11 "
    12 "{ Package: 'stx:libtool' }"
    12 "{ Package: 'stx:libtool' }"
    13 
    13 
    14 "{ NameSpace: Tools }"
    14 "{ NameSpace: Tools }"
    15 
    15 
    16 BrowserList subclass:#BrowserListWithFilter
    16 Tools::BrowserList subclass:#BrowserListWithFilter
    17 	instanceVariableNames:'listView filterView filterPatternHolder showFilterHolder'
    17 	instanceVariableNames:'listView filterView filterPatternHolder showFilterHolder'
    18 	classVariableNames:''
    18 	classVariableNames:''
    19 	poolDictionaries:''
    19 	poolDictionaries:''
    20 	category:'Interface-Browsers-New'
    20 	category:'Interface-Browsers-New'
    21 !
    21 !
    52     [see also:]
    52     [see also:]
    53 
    53 
    54 "
    54 "
    55 ! !
    55 ! !
    56 
    56 
       
    57 
    57 !BrowserListWithFilter class methodsFor:'plugIn spec'!
    58 !BrowserListWithFilter class methodsFor:'plugIn spec'!
    58 
    59 
    59 aspectSelectors
    60 aspectSelectors
    60 
    61 
    61     ^#(
    62     ^#(
    62         showFilterHolder
    63         showFilterHolder
    63     )
    64     )
    64 
    65 
    65     "Created: / 11-02-2012 / 22:44:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    66     "Created: / 11-02-2012 / 22:44:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    66 ! !
    67 ! !
       
    68 
    67 
    69 
    68 !BrowserListWithFilter methodsFor:'accessing'!
    70 !BrowserListWithFilter methodsFor:'accessing'!
    69 
    71 
    70 filterPattern
    72 filterPattern
    71 
    73 
    84 
    86 
    85     ^self showFilterHolder value
    87     ^self showFilterHolder value
    86 
    88 
    87     "Created: / 29-11-2011 / 15:27:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    89     "Created: / 29-11-2011 / 15:27:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    88 ! !
    90 ! !
       
    91 
    89 
    92 
    90 !BrowserListWithFilter methodsFor:'aspects'!
    93 !BrowserListWithFilter methodsFor:'aspects'!
    91 
    94 
    92 filterPatternHolder
    95 filterPatternHolder
    93     "return/create the 'filterPatternHolder' value holder (automatically generated)"
    96     "return/create the 'filterPatternHolder' value holder (automatically generated)"
   145     oldValue ~~ newValue ifTrue:[
   148     oldValue ~~ newValue ifTrue:[
   146         self update:#value with:newValue from:showFilterHolder.
   149         self update:#value with:newValue from:showFilterHolder.
   147     ].
   150     ].
   148 ! !
   151 ! !
   149 
   152 
       
   153 
   150 !BrowserListWithFilter methodsFor:'change & update'!
   154 !BrowserListWithFilter methodsFor:'change & update'!
   151 
   155 
   152 update:something with:aParameter from:changedObject
   156 update:something with:aParameter from:changedObject
   153     "Invoked when an object that I depend upon sends a change notification."
   157     "Invoked when an object that I depend upon sends a change notification."
   154 
   158 
   163     super update:something with:aParameter from:changedObject
   167     super update:something with:aParameter from:changedObject
   164 
   168 
   165     "Modified: / 29-11-2011 / 15:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   169     "Modified: / 29-11-2011 / 15:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   166     "Modified (format): / 06-06-2012 / 00:01:37 / cg"
   170     "Modified (format): / 06-06-2012 / 00:01:37 / cg"
   167 ! !
   171 ! !
       
   172 
   168 
   173 
   169 !BrowserListWithFilter methodsFor:'event handling-delegation'!
   174 !BrowserListWithFilter methodsFor:'event handling-delegation'!
   170 
   175 
   171 handlesKeyPress:key inView:aView
   176 handlesKeyPress:key inView:aView
   172     ^ aView == filterView and:[key == #CursorDown]
   177     ^ aView == filterView and:[key == #CursorDown]
   186 
   191 
   187     "Created: / 06-02-2012 / 23:06:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   192     "Created: / 06-02-2012 / 23:06:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   188     "Modified: / 17-01-2013 / 21:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   193     "Modified: / 17-01-2013 / 21:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   189 ! !
   194 ! !
   190 
   195 
       
   196 
   191 !BrowserListWithFilter methodsFor:'hooks'!
   197 !BrowserListWithFilter methodsFor:'hooks'!
   192 
   198 
   193 commonPostBuild
   199 commonPostBuild
   194 
   200 
   195     listView isNil ifTrue:[listView := builder componentAt:#List].
   201     listView isNil ifTrue:[listView := builder componentAt:#List].
   213 
   219 
   214     listView := aView
   220     listView := aView
   215 
   221 
   216     "Created: / 29-11-2011 / 14:47:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   222     "Created: / 29-11-2011 / 14:47:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   217 ! !
   223 ! !
       
   224 
   218 
   225 
   219 !BrowserListWithFilter methodsFor:'private'!
   226 !BrowserListWithFilter methodsFor:'private'!
   220 
   227 
   221 filterList: list
   228 filterList: list
   222     | pattern filteredList |
   229     | pattern filteredList |
   249     filterView isVisible: aBoolean
   256     filterView isVisible: aBoolean
   250 
   257 
   251     "Created: / 29-11-2011 / 14:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   258     "Created: / 29-11-2011 / 14:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   252 ! !
   259 ! !
   253 
   260 
       
   261 
   254 !BrowserListWithFilter class methodsFor:'documentation'!
   262 !BrowserListWithFilter class methodsFor:'documentation'!
   255 
   263 
   256 version
   264 version
   257     ^ '$Id: Tools__BrowserListWithFilter.st 8090 2013-01-17 21:52:18Z vranyj1 $'
   265     ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.4 2012-06-05 22:03:39 cg Exp $'
   258 !
   266 !
   259 
   267 
   260 version_CVS
   268 version_CVS
   261     ^ '§Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.4 2012/06/05 22:03:39 cg Exp §'
   269     ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.4 2012-06-05 22:03:39 cg Exp $'
   262 !
   270 !
   263 
   271 
   264 version_SVN
   272 version_SVN
   265     ^ '$Id: Tools__BrowserListWithFilter.st 8090 2013-01-17 21:52:18Z vranyj1 $'
   273     ^ '$Id: Tools__BrowserListWithFilter.st 8090 2013-01-17 21:52:18Z vranyj1 $'
   266 ! !
   274 ! !
       
   275