javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swttable.cpp
branchRCL_3
changeset 19 71c436fe3ce0
parent 17 0fd27995241b
child 24 6c158198356e
equal deleted inserted replaced
18:9ac0a0a7da70 19:71c436fe3ce0
   439 // From class CCoeControl.
   439 // From class CCoeControl.
   440 // ---------------------------------------------------------------------------
   440 // ---------------------------------------------------------------------------
   441 //
   441 //
   442 void CSwtTable::FocusChanged(TDrawNow aDrawNow)
   442 void CSwtTable::FocusChanged(TDrawNow aDrawNow)
   443 {
   443 {
   444     iTableListBox->SetFocus(IsFocusControl());
   444     TBool isFocused = IsFocusControl();
       
   445 #ifdef RD_JAVA_S60_RELEASE_9_2
       
   446     EnableFocusHighlight(isFocused);
       
   447 #endif //RD_JAVA_S60_RELEASE_9_2
       
   448     iTableListBox->SetFocus(isFocused);
   445     HandleFocusChanged(aDrawNow);
   449     HandleFocusChanged(aDrawNow);
   446 }
   450 }
   447 
   451 
   448 
   452 
   449 // ---------------------------------------------------------------------------
   453 // ---------------------------------------------------------------------------
  1737         // Send column resize events
  1741         // Send column resize events
  1738         TInt colCount(GetTableColumnCount());
  1742         TInt colCount(GetTableColumnCount());
  1739         TRAP_IGNORE
  1743         TRAP_IGNORE
  1740         (
  1744         (
  1741             for (TInt i = 0; i < colCount; ++i)
  1745             for (TInt i = 0; i < colCount; ++i)
  1742             {
  1746     {
  1743                 PostColumnResizeEventL(iTableColumns[ i ]->JavaPeer());
  1747         PostColumnResizeEventL(iTableColumns[ i ]->JavaPeer());
  1744             }
  1748         }
  1745         );
  1749         );
  1746         Redraw();
  1750         Redraw();
  1747     }
  1751     }
  1748 }
  1752 }
  1749 
  1753 
  1974 // From MSwtControl
  1978 // From MSwtControl
  1975 // ---------------------------------------------------------------------------
  1979 // ---------------------------------------------------------------------------
  1976 //
  1980 //
  1977 void CSwtTable::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
  1981 void CSwtTable::ProcessKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
  1978 {
  1982 {
       
  1983 #ifdef RD_JAVA_S60_RELEASE_9_2
       
  1984     if (aType == EEventKeyDown)
       
  1985     {
       
  1986         // After panning focus highlight was disabled, so enabling again
       
  1987         EnableFocusHighlight(ETrue);
       
  1988     }
       
  1989 #endif //RD_JAVA_S60_RELEASE_9_2
  1979     iTableListBox->ProcessKeyEventL(aKeyEvent, aType);
  1990     iTableListBox->ProcessKeyEventL(aKeyEvent, aType);
  1980 }
  1991 }
  1981 
  1992 
  1982 
  1993 
  1983 // ---------------------------------------------------------------------------
  1994 // ---------------------------------------------------------------------------
  2154     (
  2165     (
  2155         iTableListBox->UpdateScrollBarsL();
  2166         iTableListBox->UpdateScrollBarsL();
  2156         UpdateMSKLabelL();
  2167         UpdateMSKLabelL();
  2157     );
  2168     );
  2158 }
  2169 }
       
  2170 
       
  2171 #ifdef RD_JAVA_S60_RELEASE_9_2
       
  2172 // ---------------------------------------------------------------------------
       
  2173 // CSwtTable::EnableFocusHighlight
       
  2174 // From MSwtControl
       
  2175 // ---------------------------------------------------------------------------
       
  2176 //
       
  2177 void CSwtTable::EnableFocusHighlight(TBool aEnable)
       
  2178 {
       
  2179     ASSERT(iTableListBox);
       
  2180     ASSERT(iTableListBox->View());
       
  2181 
       
  2182     CListItemDrawer* itemDrawer = iTableListBox->View()->ItemDrawer();
       
  2183     if (itemDrawer)
       
  2184     {
       
  2185         TInt disabledHighlight =
       
  2186             itemDrawer->Flags() & CListItemDrawer::EDisableHighlight;
       
  2187 
       
  2188         if (aEnable && disabledHighlight)
       
  2189         {
       
  2190             itemDrawer->ClearFlags(CListItemDrawer::EDisableHighlight);
       
  2191         }
       
  2192         else if (!aEnable && !disabledHighlight)
       
  2193         {
       
  2194             itemDrawer->SetFlags(CListItemDrawer::EDisableHighlight);
       
  2195         }
       
  2196     }
       
  2197 }
       
  2198 #endif //RD_JAVA_S60_RELEASE_9_2
       
  2199 
  2159 
  2200 
  2160 // ---------------------------------------------------------------------------
  2201 // ---------------------------------------------------------------------------
  2161 // From ASwtScrollableBase
  2202 // From ASwtScrollableBase
  2162 // Scrollbar frame is created and owned by the listbox component.
  2203 // Scrollbar frame is created and owned by the listbox component.
  2163 // ---------------------------------------------------------------------------
  2204 // ---------------------------------------------------------------------------