• Post Reply Bookmark Topic Watch Topic
  • New Topic

Where is Event Source Object?  RSS feed

 
Quazi Irfan
Ranch Hand
Posts: 104
1
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is a bit messy, but bear with me.

java.awt.Component is an abstract class, and it's direct Sub-classes are Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent

So, when I use

which object is holding the list of all listeners, for a particular Event Source?

I am under the assumption that - there is an Event Source Object(possibly static) for every Event Source type(mouse, keyboard etc) that holds a list of destinations(classes that implements their listener interface) - added to the the object via addXListener method. When an event happens(mouse click, drag etc) the Event Source Object creates an Event Object and send it to all the destinations. Is my assumption correct?

If so, it is confusing me because, I can't seem to find the location or declaration of Event Source Object and the list where it stores it's registered destinations.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read the JDK source code, you know. Look for a file src.zip in your JDK installation folder.
 
Quazi Irfan
Ranch Hand
Posts: 104
1
Java Netbeans IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:You can read the JDK source code, you know. Look for a file src.zip in your JDK installation folder.


Inside my jdk installation on Windows, I have the following zip files : ffjcext.zip and javafx-src.zip. This is no src.zip file.

But I am downloading openjdk source, if that's what you meant.

I've also found that I can access the source online : http://grepcode.com/snapshot/repository.grepcode.com/java/root/jdk/openjdk/8-b132/
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I've heard that there are some recent Windows distributions that don't include src.zip. Kudos to you for finding an alternative!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!