Getting AuthorComponentProvider from AuthorOperations in Applet
Oxygen general issues.
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Getting AuthorComponentProvider from AuthorOperations in Applet
Is there a way to get the AuthorComponentProvider from with the AuthorOpertations?
Currently the only way I've got them is by using a singleton on the JPanel for the applet. However this means I cannot create any unit tests on my operation classes. Current the print operation is doing the following.
The AuthoringPanel does the call to the AuthorComponentProvider
Currently the only way I've got them is by using a singleton on the JPanel for the applet. However this means I cannot create any unit tests on my operation classes. Current the print operation is doing the following.
Code: Select all
public void doOperation(final AuthorAccess access, final ArgumentsMap arg1) throws IllegalArgumentException,
AuthorOperationException {
AuthoringPanel.getInstance().print(true);
}
Code: Select all
public void print(final boolean printPreview) {
authorComponent.print(printPreview);
}
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Getting AuthorComponentProvider from AuthorOperations in Applet
Hi Neil,
The AuthorOperations only work with AuthorAccess.
And AuthorAccess does not (yet) have API to call print.
Maybe a workaround would be to avoid creating the "Print" action as an "AuthorOperation" (in the associated framework).
In the applet you could add a custom toolbar button with a print action which has access to the AuthorComponentProvider.
If you add the "Print" action as an author operation it will also be available in the toolbar for the Oxygen standalone version. But in the Oxygen standalone version you already have the "File->Print" menu.
Or do you want to make the Print action also available on the toolbar in the standalone Oxygen version?
In this case, maybe we could add some API to print() in the AuthorEditorAccess.
Regards,
Radu
The AuthorOperations only work with AuthorAccess.
And AuthorAccess does not (yet) have API to call print.
Maybe a workaround would be to avoid creating the "Print" action as an "AuthorOperation" (in the associated framework).
In the applet you could add a custom toolbar button with a print action which has access to the AuthorComponentProvider.
If you add the "Print" action as an author operation it will also be available in the toolbar for the Oxygen standalone version. But in the Oxygen standalone version you already have the "File->Print" menu.
Or do you want to make the Print action also available on the toolbar in the standalone Oxygen version?
In this case, maybe we could add some API to print() in the AuthorEditorAccess.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Getting AuthorComponentProvider from AuthorOperations in Applet
Hi,
But we can try to increase the AuthorAccess API if you have some requests.
Regards,
Radu
Besides adding an author operation to the pop-up menu by editing the associated document type you can also use this API to customize the JPopupMenu before showing (API available also from the Author Component Provider side):I also want the PrintOperation in the right click popup menu.
Code: Select all
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.setPopUpMenuCustomizer(AuthorPopupMenuCustomizer)
We cannot make available the AuthorComponentProvider to the AuthorOperations because an AuthorOperation should work both for the standalone Oxygen and for the applet unchanged and in the standalone version the AuthorComponentProvider API does not exist.Also it's not just for printing. I'd like to do other things as well.
But we can try to increase the AuthorAccess API if you have some requests.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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