This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
After pressing certain key(s), Source Editor should go full-screen in MDI (in SDI it's obvious). See i.e. Internet Explorer's >4.0 F11 key functionality.
Try fullscreeneditor.jar at http://contrib.netbeans.org/servlets/ProjectDownloadList Crude and not tested except on Linux. Uses JDK 1.4's "full screen" mode. Maybe it will be impressive on Windows, or maybe it will just cause some heinous error. Try it. Includes sources.
I just tried the fullscreen jar In windows (jdk 1.4.1 on win2k) it pops up a iconized - fully minimized window in the upper left corner of the screen and after a few seconds delay (slow machine and I never got around to optimizing the jvm params)it pops to full screen mode. Works great. One glitch I noticed is that if I manually close the new fullscreen editor (window decorations do show up)without using CTRL-SHIFT-F11 the next time I hit CTRL-SHIFT-F11 it will not open. the close () method of the window does not properly notify that it was closed so the second CTRL-SHIFT-F11 seems to try to close it again and takes an other time to open (just a guess). running System.out.println (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getDefaultScreenDevice().isFullScreenSupported()); from the scripting console outputs true Jesse indicated that it returns false on Linux One other thing is that this shortcut does not show up in the list of all shortcuts and unless I modify the layer.xml there seems to be no way to change the keys to toggle it. Last but not least a minor look and feel issue is that the frame has the default sun coffee cup logo and not the netbeans one. Thanks for the module. On my 17 inch monitor the module is just what I needed.
So: - need to listen for window closed events and handle them sanely - register Actions/Window/fullscreeneditor-FullScreenAction.instance for customizability - TopComponent.getIcon does not appear to be working, though it (apparently) does in the regular window system, since tabs get appropriate icons. Needs investigation. Maybe an issue with accessing components outside the AWT thread; try SwingUtilities.invokeLater.
It seems that window decorations are showing up because the following line is commented out: //f.setUndecorated(true);
Well uncommenting it didn't work for me, I tried. Someone running on a different platform should feel free to try uncommenting it. Of course if full-screen mode is actually supported by the JRE (for which platforms is this true??) it should be irrelevant.
from the javadocs for java.awt.Frame: isUndecorated public boolean isUndecorated() Indicates whether this frame is undecorated. By default, all frames are initially decorated. so it seems that it is relevant
Indeed, now that I try it again (JDK 1.4.1 Linux) setUndecorated(false) does indeed work as expected. I am not sure what did not work before.
just a note that even if its undecorated there are ways to close the window, so the window close listener still needs to be in place. Will this always be a module or is it likely to be integrated into the core? Thanks PS the src code included in the jar did not compile on my machine using the openide.jar (3.4)in the lib dir. Was I doing something wrong?
"Will this always be a module or is it likely to be integrated into the core?" - depends on how stable and useful the code seems. Should have some people use it for a while. I think a UI review (nbui@netbeans.org) is needed first, since there are potentially a lot of UI issues surrounding this. For example, what happens if you Alt-Sh-O to open a new file? Should it then replace the current file in full-screen mode? Is there any way to switch files while in this mode? Etc. I think the current state could be described as "exploratory", i.e. these are prototypes. "the src code included in the jar did not compile on my machine using the openide.jar (3.4) in the lib dir" - specifically what was the problem? (I use a 4.0 dev build BTW, did not test on 3.4.)
If you add comments to an issue, please remember to add yourself to the CC list too, so people can respond to you.
fullscreeneditor/FullScreenAction.java [35:1] fullscreeneditor.FullScreenAction.FakeWM should be declared abstract; it does not define componentRegistry() in org.openide.windows.WindowManager private static final class FakeWM extends WindowManager { ^ 1 error Errors compiling FullScreenAction.java.
"fullscreeneditor.FullScreenAction.FakeWM should be declared abstract; it does not define componentRegistry() in org.openide.windows.WindowManager" - ah, well just implement that method to return null, it doesn't matter.
I mean to throw IllegalStateException.
In fullscreen mode try CTRL-F to initiate a find. The dialog opens under the fullscreen making it unusable.
I don't get that problem on Linux. Instead, the dialog opens and gets focus and all, but the fullscreen window gets hidden behind the NB MDI window!
Created attachment 8256 [details] Revised FullScreenAction.java
The revised class I just attached should: - prevent the full-screen window from going behind the MDI window - handle explicit closing of the full-screen window properly On Linux with Sawfish + sloppy focus, I still have problems opening e.g. the Find dialog; it is opened but does not get KB focus. I have to Alt-TAB to focus it.
Using the updated version on windows has the following issues: ctrl - f is still modal to the MDI (main) frame and does not show in the fullscreen frame (focus is lost from the full screen window and any typing will be to the hidden find dialog) On alt- tab or window key where focus is changed to a different window, the fullscreen is minimized and is visible modal to the main NB Frame. Clicking in NB frame will leave the full screen unfocused and visible in its minimized state. Is there any way to force focus and maximization back to the full screen window as soon as NB is back in focus? Thanks
Re. all of the last questions from kosherjava - I have no idea, maybe someone else does... (I do not have a Win machine to test on anyway)
To better describe my problem. When an other app/window gets focus (alt-tab, window key etc) the fullscreen window gets iconified and does not always maximize when NB gets focus again. The code below disposes of the full screen on iconification. It isn't optimal in the sense that I shouldn't have to dispose of it and recreate it later. Ideally on refocus of NB the "hidden" fullscreen window should pop back up. public void windowIconified(WindowEvent e) { disposeIt(); }
Just a note that windowIconified causes unwanted behavior. This is because a dialog poping up from an other program (a new email from outlook) will cause iconification in fulllscreen mode. The issue seems to be more of an issue with the way Swing works
Just a suggestion. Can the feature be implemented slightly differently? instead of an actual full screen how about just toggeling on and off the explorer (or whatever else you have open on the left) as well as the document tabs (on bottom). This way while it would not actually be a full screen version it would cearly give a lot of more space than in a regular nb editor window.
I like the idea kosherjava (aka None) had, but I think there is a problem where the state of TopComponents which are removed will be lost. So when you toggle back to normal mode, you'll have to reexpand opened tree branches. The same problem occurs in the output window, which I reported a while ago (see issue 17504).
Cf. issue #13717.
Just some additional comments. Despite the bugs I find this usefull. Here are some other small problems. 1)Am at line 1000 of my code and hit CTRL-SHFT-F11 and end up at line 1 in the new window. 2) the dropdown widget(don't know the correct name) that lists all the methods does not properly repaint when scrolling through the list in full screen made making it almost useless (would not be such an issue if I could get there by using CTRL F that is broken)
Just noticed in the netBeans weekly news that a new module editorBonuses was posted by carcassi that does almost what this does. http://contrib.netbeans.org/servlets/ProjectDownloadList? action=download&dlID=302 Having them both running (thank goodness for the different shortcut keys) I have to say that the new one while not really FullScreen like this one seems to work better. I don't know if this is the place to post prolems with the new module but i guess its as good a place as any. a) crtl-f works but with a look and feel bug. when in full screen if you hit ctrl-f the full screen is minimized and an empty regular netbean window pops up (same as if you alt tabbed over to it). enter the search and you are back to the full scfeer mode. b) when in full screen mode bring up an other app (say Outlook). go back to the fulll screen and hit ctrl -alt f11 to get back to non full screen editor mode. what is now in focus is the app you used (Outlook in this case). What I would have expected is a non full screen NB. c) the dropdown widget(don't know the correct name) that lists all the methods allowing easy navigation of a large file is shorter in the new module than in the main window. I set it to display all params so I can easily tell one overloaded method from an other. Since the size of this dropdown seems to be fixed in size in the editorBonuses window, its hard to tell one method from an other. d) Is there a reason that it requires its own task bar icon? If it were "THE" netbeans window the ctrl-F and other app focus problems above might not be an issue. e) The fact that the full screen has a close (X) will lead to people closing it expecting to get back to regular mode that way. That will totally close the editor window loosing all your open tabs (painful if you have many open windows) What the close (X) should do is the equiv of hitting CTRL-ALT F11 and return to regular not full screen mode. Thanks for the module
In my module I basically get the current frame, make it a separate window and maximize. a, b, d and e are consequence of this. As you say, if instead of creating a new window, I would use the NetBeans one, those problems would disappear. Unfortunately, I have no idea how to do that and (worst) I don't even know if it is possible or not with the current API (I am but a small NB hacker :-) ). As for c, the dropdown widget works exactly the same for me.
Just an update that the eclipse editor implements a full screen editor this way: when the user double clicks on the editor tab, the editor takes up the full IDE window temporarily hiding the output, outline, and explorer panes. Double clicking on the tab again brings back the hidden panes and restores the editor window to normal size.
I believe the new window system already has something like this implemented. See: http://ui.netbeans.org/docs/ui/ws/ws_spec.html#3.10
Well, there is something like that... in fact there is an action which maximizes/unmaximizes the active window (it means, the others are not visible - inside the MDI frame, but not full screen). Adding Jano (responsible for UI) to get this request.
I guess this is now fixed with the new window system. Shift-Escape, I think. It does not remove window decorations, remove the menu bar, remove toolbars, or hide other document tabs, so it is not total full-screen mode. But it does hide other windows, which frees up most of the screen for the editor.