This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes AbstractAction = Command Pattern? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "AbstractAction = Command Pattern?" Watch "AbstractAction = Command Pattern?" New topic
Author

AbstractAction = Command Pattern?

Lance Finney
Ranch Hand

Joined: Apr 26, 2001
Posts: 133
I'm using subclasses of AbstractAction for my buttons and menuItems, and I was thinking about switching to the Command Pattern. However, the more I think about it, the more I wonder if I already have the Command pattern using my approach.
Essentially, AbstractAction serves the purpose of Command, and ActionPerformed served the purpose of execute().
Does this seems right?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: AbstractAction = Command Pattern?