Topic: Event Model problem

  Print this page

1.Event Model problem Copy to clipboard
Posted by: wmghost
Posted on: 2004-09-04 19:57

MouseEvent

MouseListener
mousePressed()
mouseReleased()
mouseEntered()
mouseExited()
mouseClicked()

MouseMotionListener
mouseDragged()
mouseMoved()

ActionEvent

ActionListener

假设一个event source注册有以上3个listener,且产生了MouseEvent和ActionEvent,它怎么知道MouseListener、MouseMotionListener和ActionListener有那些方法?

具体地,当发生mouse pressed,它怎么知道要调用的是MouseListener的mousePressed()方法,而不是MouseMotionListener的,更不是ActionListener的?

如果我创建新的event怎么办?

2.Re:Event Model problem [Re: wmghost] Copy to clipboard
Posted by: KunMao
Posted on: 2004-09-07 17:38

一个事件的产生时,两个事件已经发生了。


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923