I want tocatch when a user clicks the close button on a Frame HUD widget so I can setVisibility and NOT have the widget destroyed. Using the following I can see
my override method called but the associated Frame is still destroyed. Note I am not calling any super() here so I expected to isolate myself from the default closing behavior. Thoughts???
1 2 3 4 5 6 7
| public class JournalPageHUD extends Frame implements WidgetActionListener, WidgetStateListener, DialogListener, FrameListener{
public void onFrameClosed(Frame frame) { System.out.println("fram close x"); } |
Hmm... 1st: I don't know, where you override this method. It only exists in FrameListener. So it is not overridden, but implemented. But Maybe you mean that.
2nd: The Frame is not destroyed when it's closed, but only removed from it's parent (the HUD itself), which is nearly the same as setting it invisible. But only nearly. And this little difference is needed for frames. So just keep your Frame pointer stored and readd it to the HUD, when you want to re-show it. I guess this will solve your problems, does it?
Marvin