Implement the 'standalone' window mode#3859
Conversation
Standalone windows are configured to have no tabs or toolbar showing. Panes are configured not to change with the global settings to show/hide toolbar/tabs.
and also when including the window size and layout.
when launching from a standalone window. As opposed to opening in the last active window.
Allows the active pane to be set to either the current window or main Phoebus window before opening the editor.
…ntext menu action Only context menu items that open new displays should set the focus. Other items such as copy PV will not.
… standalone In this case the active pane should be set as the main window so that applications open there instead of in place of the standaloene.
- refactoring methods to reduce complexity - renaming to camelCase where appropriate - removing boolean literals
- combine if statements - simplify boolean return statement
|
There is work that started on JDK25. |
|
@shroffk thanks for the feedback. Personally I think it would be good to get this merged now as it already contains a fair few changes and then I'll create another PR to clean up the window sizing once we've moved to JFX25. If that's OK with you? I just feel like that might be a bit cleaner? Otherwise, I've fixed the spelling mistake in the comment (thanks for catching). In terms of SonarCloud, I've fixed all the issues that I think I can, including refactoring some fairly complex nested if-else statements. The big one that remains is 'Duplicated Lines of code'. I'm not sure how this can be avoided as the two affected classes both need to override the base class's |
|
do not fixate on the duplicate lines of code. following the existing variable naming convention is the correct thing to do. We should add an exception for sonarcube. I understand that these changes are isolated to the standalone window and should not affect existing setup... are there any particular changes that we should test rigorously? |
|
As you said, most of the behavior changes are contained to standalone windows. Below are some areas to test. In terms of checking 'normal' windows still behave the same I would test out:
To test the standalone window implementation:
|
There was a problem hiding this comment.
Works as advertised.
I would however suggest one change: the options "New Window" and "New Standalone Window" may be a bit confusing. After all, they both open a new window, and the definition of "standalone" is open for interpretation. Should we consider "New Undecorated Window" or similar?
|
Thanks for taking the time to review @georgweiss - much appreciated. Yes I see your point - I am happy to change the option name. Besides your suggestion of "New Undecorated Window" (which I think would work), the only other idea I can think of would be "New Pop-Up Window"? |
|
@rjwills28, I'd argue that both options could be labelled "pop-up windows". How about:
That would make it clear that these options are essentially the same, save for the toolbar and other UI elements. |
…dialog to better distinguish it from the existing 'New Window' option.
|
|
Yes, I like it. I've made that change in the latest commit. |


The main purpose of this PR is to add back in the standalone window implementation that existed in CS-Studio. See Issue #3543 for a full description of our motivations.
A standalone window is essentially a window with no toolbars or tabs and so just displays the BOB screen (again, see above issue for an example screen).
A summary of what has been done in this PR:
All of these changes only apply to standalone windows meaning that the original 'New Window' implementation has not been touched and still functions as it did before. These changes will be transparent to users unless they change their actions to open in the standalone mode or use the command line argument to launch them.
We have been actively testing this implementation at Diamond and so have ironed out most of the issues with behaviour.
Note: some of the resizing of windows can be done in a cleaner way once Phoebus has moved to JFX25. This is because there is a bug in older versions of JFX that mean that any sizing of the stage before it is 'shown' (i.e.
stage.show()) are not applied (see #3436). This means that currently we have to do all of our resizing afterstage.show(), which can cause some flickering of screens when they first launch as they pop up at one size and then very quickly get resized. I have a fix for this but propose postpone implementing that until the basic standalone window implementation has been agreed and Phoebus moves to JFX25.I appreciate that this is a reasonably big PR but most of the commits should be fairly self contained with a descriptive message. Please let me know if you have any questions/feedback.
I anticipate a few Sonarcloud issues so I will address those asap.
Checklist
Testing:
Documentation: