Tools::BrowserListWithFilter: jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 06 Feb 2012 23:27:23 +0000
branchjv
changeset 12146 80af7eef372f
parent 12145 7b8836d21d52
child 12147 5f1d0885c1bc
Tools::BrowserListWithFilter: - pressing cursor-down in filter field move focus to the list
Tools__BrowserListWithFilter.st
--- a/Tools__BrowserListWithFilter.st	Mon Feb 06 22:35:36 2012 +0000
+++ b/Tools__BrowserListWithFilter.st	Mon Feb 06 23:27:23 2012 +0000
@@ -156,6 +156,25 @@
     "Modified: / 29-11-2011 / 15:51:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!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 
+            takeFocus;
+            keyPress: key x:x y:y.
+    ].
+
+    "Created: / 06-02-2012 / 23:06:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !BrowserListWithFilter methodsFor:'hooks'!
 
 commonPostBuild
@@ -164,6 +183,8 @@
     listView isNil ifTrue:[self breakPoint: #jv].
     filterView isNil ifTrue:[self breakPoint: #jv].
 
+    filterView delegate: self
+
     "Created: / 29-11-2011 / 14:47:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
@@ -217,7 +238,7 @@
 !BrowserListWithFilter class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Tools__BrowserListWithFilter.st 7854 2012-01-30 17:49:41Z vranyj1 $'
+    ^ '$Id: Tools__BrowserListWithFilter.st 7873 2012-02-06 23:27:23Z vranyj1 $'
 !
 
 version_CVS
@@ -225,5 +246,5 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__BrowserListWithFilter.st 7854 2012-01-30 17:49:41Z vranyj1 $'
+    ^ '$Id: Tools__BrowserListWithFilter.st 7873 2012-02-06 23:27:23Z vranyj1 $'
 ! !