javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp
branchRCL_3
changeset 19 71c436fe3ce0
parent 17 0fd27995241b
child 24 6c158198356e
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp	Tue May 25 12:34:19 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp	Wed Jun 09 09:34:07 2010 +0300
@@ -441,7 +441,11 @@
 //
 void CSwtTable::FocusChanged(TDrawNow aDrawNow)
 {
-    iTableListBox->SetFocus(IsFocusControl());
+    TBool isFocused = IsFocusControl();
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    EnableFocusHighlight(isFocused);
+#endif //RD_JAVA_S60_RELEASE_9_2
+    iTableListBox->SetFocus(isFocused);
     HandleFocusChanged(aDrawNow);
 }
 
@@ -1739,9 +1743,9 @@
         TRAP_IGNORE
         (
             for (TInt i = 0; i < colCount; ++i)
-            {
-                PostColumnResizeEventL(iTableColumns[ i ]->JavaPeer());
-            }
+    {
+        PostColumnResizeEventL(iTableColumns[ i ]->JavaPeer());
+        }
         );
         Redraw();
     }
@@ -1976,6 +1980,13 @@
 //
 void CSwtTable::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
 {
+#ifdef RD_JAVA_S60_RELEASE_9_2
+    if (aType == EEventKeyDown)
+    {
+        // After panning focus highlight was disabled, so enabling again
+        EnableFocusHighlight(ETrue);
+    }
+#endif //RD_JAVA_S60_RELEASE_9_2
     iTableListBox->ProcessKeyEventL(aKeyEvent, aType);
 }
 
@@ -2157,6 +2168,36 @@
     );
 }
 
+#ifdef RD_JAVA_S60_RELEASE_9_2
+// ---------------------------------------------------------------------------
+// CSwtTable::EnableFocusHighlight
+// From MSwtControl
+// ---------------------------------------------------------------------------
+//
+void CSwtTable::EnableFocusHighlight(TBool aEnable)
+{
+    ASSERT(iTableListBox);
+    ASSERT(iTableListBox->View());
+
+    CListItemDrawer* itemDrawer = iTableListBox->View()->ItemDrawer();
+    if (itemDrawer)
+    {
+        TInt disabledHighlight =
+            itemDrawer->Flags() & CListItemDrawer::EDisableHighlight;
+
+        if (aEnable && disabledHighlight)
+        {
+            itemDrawer->ClearFlags(CListItemDrawer::EDisableHighlight);
+        }
+        else if (!aEnable && !disabledHighlight)
+        {
+            itemDrawer->SetFlags(CListItemDrawer::EDisableHighlight);
+        }
+    }
+}
+#endif //RD_JAVA_S60_RELEASE_9_2
+
+
 // ---------------------------------------------------------------------------
 // From ASwtScrollableBase
 // Scrollbar frame is created and owned by the listbox component.