hiding views
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
hiding views
Post by vishwavaranasi »
Hello team , am using the PAI to hide the views in Oxygen Editor , the following lines of code added to our
xxxxxWorkspaceAccessPluginExtensionimplements WorkspaceAccessPluginExtension
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
//hiding views
pluginWorkspaceAccess.hideView("Outline");
pluginWorkspaceAccess.hideView("Attributes");
}
this is not hiding the views ?
would you please help us to achieve the same.
Thanks,
vishwa
xxxxxWorkspaceAccessPluginExtensionimplements WorkspaceAccessPluginExtension
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
//hiding views
pluginWorkspaceAccess.hideView("Outline");
pluginWorkspaceAccess.hideView("Attributes");
}
this is not hiding the views ?
would you please help us to achieve the same.
Thanks,
vishwa
Thanks,
vishwa
vishwa
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: hiding views
Hi,
The "applicationStarted" API is called very early when the application has not yet loaded and positioned its toolbars and side views.
One way to approach what you want would be something like this:
but we also have a special plugin extension called a Components Validator plugin extension:
https://www.oxygenxml.com/doc/versions/ ... lugin.html
which has a "validateComponent" Java callback that can be used to remove side views completely from Oxygen (so that they can no longer be opened). There is a sample implementation here:
https://github.com/oxygenxml/oxygen-com ... ter-plugin
As a third approach you can also load a complete custom views/toolbars layout on the "applicationStarted" callback using the API ro.sync.exml.workspace.api.options.GlobalOptionsStorage.importGlobalOptions(File) API. I can give you mor details about this if you want.
Regards,
Radu
The "applicationStarted" API is called very early when the application has not yet loaded and positioned its toolbars and side views.
One way to approach what you want would be something like this:
Code: Select all
@Override
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
JFrame mainFrame = (JFrame) pluginWorkspaceAccess.getParentFrame();
mainFrame.addWindowListener(new WindowAdapter() {
/**
* @see java.awt.event.WindowAdapter#windowOpened(java.awt.event.WindowEvent)
*/
@Override
public void windowOpened(WindowEvent e) {
pluginWorkspaceAccess.hideView("Outline");
}
});
}
https://www.oxygenxml.com/doc/versions/ ... lugin.html
which has a "validateComponent" Java callback that can be used to remove side views completely from Oxygen (so that they can no longer be opened). There is a sample implementation here:
https://github.com/oxygenxml/oxygen-com ... ter-plugin
As a third approach you can also load a complete custom views/toolbars layout on the "applicationStarted" callback using the API ro.sync.exml.workspace.api.options.GlobalOptionsStorage.importGlobalOptions(File) API. I can give you mor details about this if you want.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
Re: hiding views
Post by vishwavaranasi »
Thanks Radu ..that worked for me.
is this same applicable to hiding toolbar also?
pluginWorkspaceAccess.hideToolbar("Project");?
Thanks,
vishwa
is this same applicable to hiding toolbar also?
pluginWorkspaceAccess.hideToolbar("Project");?
Thanks,
vishwa
Thanks,
vishwa
vishwa
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: hiding views
Hi,
You should be able to hide a global toolbar. If you want to hide the internal toolbar which appears inside the Project view, it cannot be hidden using the API.
Regards,
Radu
You should be able to hide a global toolbar. If you want to hide the internal toolbar which appears inside the Project view, it cannot be hidden using the API.
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