--- a/Tools__BrowserListWithFilter.st Wed Feb 05 19:57:39 2014 +0100
+++ b/Tools__BrowserListWithFilter.st Wed Feb 05 19:57:41 2014 +0100
@@ -1,3 +1,14 @@
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
"{ Package: 'stx:libtool' }"
"{ NameSpace: Tools }"
@@ -11,6 +22,20 @@
!BrowserListWithFilter class methodsFor:'documentation'!
+copyright
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
documentation
"
Abstract superclass for a browser list with user filter.
@@ -29,6 +54,17 @@
"
! !
+!BrowserListWithFilter class methodsFor:'plugIn spec'!
+
+aspectSelectors
+
+ ^#(
+ showFilterHolder
+ )
+
+ "Created: / 11-02-2012 / 22:44:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!BrowserListWithFilter methodsFor:'accessing'!
filterPattern
@@ -130,6 +166,28 @@
"Modified (format): / 06-06-2012 / 00:01:37 / cg"
! !
+!BrowserListWithFilter methodsFor:'event handling-delegation'!
+
+handlesKeyPress:key inView:aView
+ ^ aView == filterView and:[key == #CursorDown]
+
+ "Created: / 06-02-2012 / 23:02:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+keyPress:key x:x y:y view:aView
+
+ (aView == filterView and:[key == #CursorDown]) ifTrue:[
+ listView scrolledView notNil ifTrue:[
+ listView scrolledView
+ takeFocus;
+ keyPress: key x:x y:y.
+ ].
+ ].
+
+ "Created: / 06-02-2012 / 23:06:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 17-01-2013 / 21:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!BrowserListWithFilter methodsFor:'hooks'!
commonPostBuild
@@ -138,6 +196,9 @@
listView isNil ifTrue:[self breakPoint: #jv].
filterView isNil ifTrue:[self breakPoint: #jv].
+ filterView delegate: self.
+ self showFilter: showFilterHolder value.
+
"Created: / 29-11-2011 / 14:47:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -179,6 +240,8 @@
showFilter: aBoolean
| offset |
+ listView isNil ifTrue:[ ^ self ].
+
aBoolean ifTrue:[
offset := filterView height.
] ifFalse:[
@@ -193,10 +256,10 @@
!BrowserListWithFilter class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.6 2013-04-14 06:51:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.7 2014-02-05 18:57:41 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.6 2013-04-14 06:51:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowserListWithFilter.st,v 1.7 2014-02-05 18:57:41 cg Exp $'
! !