Plugin Development: submit a customized form
Oxygen general issues.
Plugin Development: submit a customized form
I need to gather input from the user, and I would like to gather the information via a form that has text fields and perhaps other swing elements like combo-boxes, etc... I would like the user to be able to access the form via the menu bar, and once they have filled out the form and click on a submit button it should then execute my custom logic.
From the documentation, it is clear that I should have a class that extends WorkspaceAccessPluginExtension so that I can customize the menu to include my new menu item. However, the documentation is not very clear on whether it would be possible to create a custom form with elements SWING like elements such as textfields, combo-boxes, and a submit button to gather user input and then run an Action upon submission of the form.
Any help and pointers to some existing examples would be great, thanks ahead of time.
---Thu
From the documentation, it is clear that I should have a class that extends WorkspaceAccessPluginExtension so that I can customize the menu to include my new menu item. However, the documentation is not very clear on whether it would be possible to create a custom form with elements SWING like elements such as textfields, combo-boxes, and a submit button to gather user input and then run an Action upon submission of the form.
Any help and pointers to some existing examples would be great, thanks ahead of time.
---Thu
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Plugin Development: submit a customized form
Post by sorin_ristache »
Hello,
Yes, you need to create a WorkspaceAccessPlugin (full Plugins API is available here). There is an example of such plugin in the Plugins SDK from the Development Resources page, please unzip the Plugins SDK and look at the Java source code from directory samples/WorkspaceAccess/src. In the CustomWorkspaceAccessPluginExtension.applicationStarted() method the Oxygen menu bar and the editor popup menu are customized, etc. If you want to create a Swing dialog you should set the Oxygen frame window as parent of the dialog, which you can get with a call JFrame.getFrames()[0].
Regards,
Sorin
Yes, you need to create a WorkspaceAccessPlugin (full Plugins API is available here). There is an example of such plugin in the Plugins SDK from the Development Resources page, please unzip the Plugins SDK and look at the Java source code from directory samples/WorkspaceAccess/src. In the CustomWorkspaceAccessPluginExtension.applicationStarted() method the Oxygen menu bar and the editor popup menu are customized, etc. If you want to create a Swing dialog you should set the Oxygen frame window as parent of the dialog, which you can get with a call JFrame.getFrames()[0].
Regards,
Sorin
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