Skip to main content

Thoughts about CR 6483875

7 replies [Last post]
ersh
Offline
Joined: 2006-10-18

Hi, let me share my thoughts about CR 6483875 "Save and restore the Configuration/Template editor window size"

1) I'm not sure that this is right idea because our config editor has very complicated layout and we have a lot of code in com.sun.interview.wizard package that calculates and sets right size for the window and its components based on particular content. We had many problems with the layout especially if complex questions like PropertyQuestion were included. Now it works not a bad and I'm afraid to break this.

2) On the other hand saving/restoring size and position could be useful function for any dialogs. So I'd suggest to add this feature to the base ToolDialog class. As for config editor we can TRY to restore a size and we can restore window location.

So my suggested fix is here - https://jtharness.dev.java.net/source/browse/jtharness?view=rev&rev=1551
First, it adds some save/restore functionality to the base ToolDialog class
Second, TRIES to save and restore size and position for config/template editors but typically size can not be restored.

What do you think?

Thanks in advance,
Mike

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bkurotsu
Offline
Joined: 2004-12-13

Integrated rev 1561.

ersh
Offline
Joined: 2006-10-18

Thank you Brian

ersh
Offline
Joined: 2006-10-18

Sorry, wrong link was provided.
This is the right - https://jtharness.dev.java.net/source/browse/jtharness?view=rev&rev=1555

Mike

ersh
Offline
Joined: 2006-10-18

Please ignore my previous speculations. I'll do this workable
Mike

ersh
Offline
Joined: 2006-10-18

Please review my fix, that should work.

Changes in base ToolDialog class:
https://jtharness.dev.java.net/source/browse/jtharness/branches/users/er...

Changes in ConfigEditor
https://jtharness.dev.java.net/source/browse/jtharness/branches/users/er...

Thanks in advance,
Mike

bkurotsu
Offline
Joined: 2004-12-13

Reviewed those two classes, they look fine. I tested the branch too, seems to generally work.

Notes:
- Geometry is saved to Preferences, not the workdir. I would have suggested the workdir.
- Saved geometry depends on the uikey for the dialog not changing.
- Geometry within the window is not saved, only the outer frame size.

I will try to integrate this now.

bkurotsu
Offline
Joined: 2004-12-13

Seems that I suggested Preferences. I probably thought about it longer when I said that, so it might be right! We will see what people think...