Add JComponent to oxygen by Framework

Post here questions and problems related to oXygen frameworks/document types.
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Add JComponent to oxygen by Framework

Post by sebastienlavandier » Thu May 31, 2012 5:24 pm

Hello,

We have create a customized oxygen view in a plugin, by using "WorkspaceAccessPluginExtension" + "addViewComponentCustomizer". In the customized view, we have used a Swing JPanel which contains some items.

public class S1000DPluginExtension implements WorkspaceAccessPluginExtension {

public void applicationStarted(final StandalonePluginWorkspace pluginWorkspace) {
pluginWorkspace.addMenuBarCustomizer(new S1000DMenuBarCustomizer());

try {
pluginWorkspace.addViewComponentCustomizer(new ViewComponentCustomizer() {
IllustrationsPanel illusPanel

public void customizeView(ViewInfo viewInfo) {
if ("Illustrations".equals(viewInfo.getViewID())) {
illusPanel = new IllustrationsPanel()


It works !

But now, we want create this Jpanel by using a framework, but we haven't found the solution.
How we can use addViewComponentCustomizer, .. by a framework ?
Do you think it's possible ?
Has anyone an idea?
thanks in advance
Regards.

Sébastien.L

Radu
Posts: 6811
Joined: Fri Jul 09, 2004 5:18 pm

Re: Add JComponent to oxygen by Framework

Post by Radu » Thu May 31, 2012 5:37 pm

Hi Sébastien,

Only a WorkspaceAccessPluginExtension can add additional global views and toolbars to Oxygen + modify the main menu.

What would be the advantage for you to be able to customize a view from a framework? Could you elaborate on your usecase?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: Add JComponent to oxygen by Framework

Post by sebastienlavandier » Thu May 31, 2012 6:04 pm

Hi Radu,

When my application is started with a specifical xml document, my personnal view is activated and I can see the JPanel (which contain items) by my plugin. Next, I use "ExtensionsBundle" and "AuthorDnDListener" for use the drag and drop (by a framework).
It works too !
But now, I want only have a framework to do that.

It's not possible to add my JPanel by a framework ?
Best regards.

Sébastien.L

Radu
Posts: 6811
Joined: Fri Jul 09, 2004 5:18 pm

Re: Add JComponent to oxygen by Framework

Post by Radu » Fri Jun 01, 2012 9:14 am

Hi Sébastien,

No, sorry, only a workspace access plugin extension can add a custom view.
So you will need to distribute to the clients both the custom plugin and the custom framework.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: Add JComponent to oxygen by Framework

Post by sebastienlavandier » Fri Jun 01, 2012 9:36 am

Thank you very much for your help Radu
Bye

Post Reply