Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UML for ActionListener

843789Jul 17 2010 — edited Jul 17 2010
Sorry if this is not the right place to talk about this. I am unsure of where to put this.

I have checked out three library books, scoured the web, and yet have no answer. I have an ActionListener as an anonymous inner class for maybe five different buttons, comboboxes, etc, and I need to do the UML diagrams for everything. How do I represent a class with no name? If I have +actionPerformed in my inner class and interface, do I write it twice? My Java book shows:

<<interface>>
java.awt.event.ActionListener
+actionPerformed(event: ActionEvent)

in a box with arrows to non-class things like a button and a listener, but I don't think that's meant to be a strict UML diagram

I have found examples that I'm not sure if they're right:

[http://wiki.msoe.us/_media/se1020labs/lab5_classes.png|http://wiki.msoe.us/_media/se1020labs/lab5_classes.png]
[http://my.safaribooksonline.com/0131428489/bvdidx#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTAxMzE0Mjg0ODkvMTY2|http://my.safaribooksonline.com/0131428489/bvdidx#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTAxMzE0Mjg0ODkvMTY2]


It seems like if I have 5 different buttons, there should be five different boxes and things to properly represent what's going on, and yet that's not what's done. Maybe there should be a little 5 somewhere.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2010
Added on Jul 17 2010
5 comments
2,293 views