< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_List.cpp

Print this page




 519 
 520         flags &= ~PRF_CLIENT;
 521     }
 522 
 523     return AwtComponent::WmPrint(hDC, flags);
 524 }
 525 
 526 MsgRouting
 527 AwtList::WmNotify(UINT notifyCode)
 528 {
 529     if (notifyCode == LBN_SELCHANGE || notifyCode == LBN_DBLCLK) {
 530         /* Fixed an asserion failure when clicking on an empty List. */
 531         int nCurrentSelection = SendListMessage(LB_GETCURSEL);
 532         if (nCurrentSelection != LB_ERR && GetCount() > 0) {
 533             if (notifyCode == LBN_SELCHANGE) {
 534                 DoCallback("handleListChanged", "(I)V", nCurrentSelection);
 535             }
 536             else if (notifyCode == LBN_DBLCLK) {
 537                 DoCallback("handleAction", "(IJI)V", nCurrentSelection,
 538                            ::JVM_CurrentTimeMillis(NULL, 0),
 539                            (jint)AwtComponent::GetJavaModifiers());
 540             }
 541         }
 542     }
 543     return mrDoDefault;
 544 }
 545 
 546 BOOL AwtList::InheritsNativeMouseWheelBehavior() {return true;}
 547 
 548 jint AwtList::_GetMaxWidth(void *param)
 549 {
 550     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 551 
 552     jobject self = (jobject)param;
 553 
 554     jint result = 0;
 555     AwtList *l = NULL;
 556 
 557     PDATA pData;
 558     JNI_CHECK_PEER_GOTO(self, ret);
 559     l = (AwtList *)pData;




 519 
 520         flags &= ~PRF_CLIENT;
 521     }
 522 
 523     return AwtComponent::WmPrint(hDC, flags);
 524 }
 525 
 526 MsgRouting
 527 AwtList::WmNotify(UINT notifyCode)
 528 {
 529     if (notifyCode == LBN_SELCHANGE || notifyCode == LBN_DBLCLK) {
 530         /* Fixed an asserion failure when clicking on an empty List. */
 531         int nCurrentSelection = SendListMessage(LB_GETCURSEL);
 532         if (nCurrentSelection != LB_ERR && GetCount() > 0) {
 533             if (notifyCode == LBN_SELCHANGE) {
 534                 DoCallback("handleListChanged", "(I)V", nCurrentSelection);
 535             }
 536             else if (notifyCode == LBN_DBLCLK) {
 537                 DoCallback("handleAction", "(IJI)V", nCurrentSelection,
 538                            ::JVM_CurrentTimeMillis(NULL, 0),
 539                            (jint)AwtComponent::GetActionModifiers());
 540             }
 541         }
 542     }
 543     return mrDoDefault;
 544 }
 545 
 546 BOOL AwtList::InheritsNativeMouseWheelBehavior() {return true;}
 547 
 548 jint AwtList::_GetMaxWidth(void *param)
 549 {
 550     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 551 
 552     jobject self = (jobject)param;
 553 
 554     jint result = 0;
 555     AwtList *l = NULL;
 556 
 557     PDATA pData;
 558     JNI_CHECK_PEER_GOTO(self, ret);
 559     l = (AwtList *)pData;


< prev index next >