Community
Participate
Working Groups
build I20050118 The location and size fields in WindowEvent talk about the desired location and size of the shell containing the Browser control, not the desired location and size of the Browser control itself. If the Browser control is inside a shell with other controls and/or trim, it may not be large enough to show the desired content, and may not be aligned as desired. Can the spec for these be clarified? Or does it really not matter what location and size the Browser control itself has?
The javadoc for the VisibilityWindowListener.show is hopefully more explicit - or do you want us to add more to it? <li>(in) location the requested location for the <code>Shell</code> hosting the browser. It is <code>null</code> if no location is set. <li>(in) size the requested size for the <code>Browser</code>. The client area of the <code>Shell</code> hosting the <code>Browser</code> should be large enough to accomodate that size. Nick: most of the time the size is only set by popups with no style of any kind (no menubar, no addressbar ...). It is now considered bad javascript practice to request a specific size/location so these are not too frequent - except for popups that usually people want to filter. Even native browsers take some liberty with these hints. e.g. Safari does not show status bar by default and the menubar is always visible at the top most part of the screen.
Thanks for clarifying. I had missed both the VisibilityWindowListener, and the Javadoc specifying which WindowEvent fields are applicable. The existing Javadoc is quite clear, I just hadn't read it thoroughly. It might be good to describe the overall flow of control in Browser's Javadoc, with a brief description of the responsibilities of the different listeners, and refer to that from the various listeners (in addition to the existing @see tags). From the existing Javadoc, it's unclear to me whether the OpenWindowListener should open the shell, or just create it and wait for VisibilityWindowListener.show to open the shell.
There seems to be an inconsistency in how the size is described in VisibilityWindowListener.show and WindowEvent.size. The latter says it's the shell size, not the Brower size.
Regarding comment 3: corrected javadoc for WindowEvent Regarding comment 2: WindowEvent javadoc contains a short example illustrating common use. Not currently sure if we want to be more verbose and write down the sequence of events as they commonly occur (is there any similar javadoc in Eclipse or elsewhere?).
The example is nice to have in addition to a specification of the browser lifecycle and expected behaviour of listeners. For sketching out the lifecycle, I'm thinking of something similar to what we have in WorkbenchAdvisor.
v>20050408 WindowEvent javadoc updated to describe sequence of events when a new document is opened