DaWickedRebel
Programmer
No, not a Jeopardy answer, though it is a strange combination.
I'm a new disciple of Object Oriented Design, and I've taken on the task of refactoring a quagmire of a Java application. It's quite a project as even this poorly designed app has over 100 classes, all crammed with repeating and rigid code. To avoid going insane, I'm just trying to take it apart piece by piece, and hopefully it will make each subsequent step easier.
Sorry to ramble, but I've been reading this site for a while now and can tell that those of you who post replies are very well versed in this subject so I hope you can help me to better grasp good design principles and such.
My question is this:
I have a class MyActionListener that will handle commands which may be triggered from a Toolbar on my main JFrame, from MenuItems on my main JFrame, or from Popup menus triggered by right-clicking in any of my JInternalFrames which may be created during the app's execution.
The commands are the same from each, just basically more than one way for the user to trigger the events.
When a certain type of event is triggered, I want to set a WAIT_CURSOR over my entire application until the process triggered is complete.
Without passing pointers to my main JFrame class into MyActionListener (which I know is bad design), what would be the cleanest and most object-oriented method to achieve this?
Thanks for helping a newbie!
Rich
I'm a new disciple of Object Oriented Design, and I've taken on the task of refactoring a quagmire of a Java application. It's quite a project as even this poorly designed app has over 100 classes, all crammed with repeating and rigid code. To avoid going insane, I'm just trying to take it apart piece by piece, and hopefully it will make each subsequent step easier.
Sorry to ramble, but I've been reading this site for a while now and can tell that those of you who post replies are very well versed in this subject so I hope you can help me to better grasp good design principles and such.
My question is this:
I have a class MyActionListener that will handle commands which may be triggered from a Toolbar on my main JFrame, from MenuItems on my main JFrame, or from Popup menus triggered by right-clicking in any of my JInternalFrames which may be created during the app's execution.
The commands are the same from each, just basically more than one way for the user to trigger the events.
When a certain type of event is triggered, I want to set a WAIT_CURSOR over my entire application until the process triggered is complete.
Without passing pointers to my main JFrame class into MyActionListener (which I know is bad design), what would be the cleanest and most object-oriented method to achieve this?
Thanks for helping a newbie!
Rich