Controlling layout of editing windows
Post here questions and problems related to oXygen frameworks/document types.
Controlling layout of editing windows
I'm writing a workspace access plugin that needs to open and display two documents side by side when you press a button. The result should look like this:
But when I use Workspace.open() to open my two documents, I can't specify a screen location or position for the editing window, so they'll just open in the same area (under two tabs).
Is there any way to affect the initial layout of these windows? I don't need to stop users changing it afterwards, I just want to get a nice initial layout.
But when I use Workspace.open() to open my two documents, I can't specify a screen location or position for the editing window, so they'll just open in the same area (under two tabs).
Is there any way to affect the initial layout of these windows? I don't need to stop users changing it afterwards, I just want to get a nice initial layout.
Re: Controlling layout of editing windows
Hi,
I'm afraid we do not have API for this.
As a possible (not so elegant) workaround:
In the Window menu there is a "Tile Editors Vertically" action. You could try to gain access to it and call it programmatically after you have opened the two files.
To gain access to it you can set a menu bar customizer StandalonePluginWorkspace.addMenuBarCustomizer(MenuBarCustomizer) and when it gets called you can gain access to the main JMenuBar, navigate the hierarchy swing components, find the menu item which corresponds to the action and obtain the action.
Regards,
Radu
I'm afraid we do not have API for this.
As a possible (not so elegant) workaround:
In the Window menu there is a "Tile Editors Vertically" action. You could try to gain access to it and call it programmatically after you have opened the two files.
To gain access to it you can set a menu bar customizer StandalonePluginWorkspace.addMenuBarCustomizer(MenuBarCustomizer) and when it gets called you can gain access to the main JMenuBar, navigate the hierarchy swing components, find the menu item which corresponds to the action and obtain the action.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Controlling layout of editing windows
Hi Radu,
I've tried the workaround and it works perfectly. As you say, it isn't elegant (it relies on the text of the menu item) but it's stable enough for my needs.
Thanks,
Peter
I've tried the workaround and it works perfectly. As you say, it isn't elegant (it relies on the text of the menu item) but it's stable enough for my needs.
Thanks,
Peter
Re: Controlling layout of editing windows
Hi,
Just to update this thread, in Oxygen 18.0 we added API:
ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.getActionsProvider()
which allows access to global actions, including the one for tiling editors.
Regards,
Radu
Just to update this thread, in Oxygen 18.0 we added API:
ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.getActionsProvider()
which allows access to global actions, including the one for tiling editors.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service