Page 1 of 1

Add JComponent to oxygen by Framework

Posted: Thu May 31, 2012 5:24 pm
by sebastienlavandier
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

Re: Add JComponent to oxygen by Framework

Posted: Thu May 31, 2012 5:37 pm
by Radu
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

Re: Add JComponent to oxygen by Framework

Posted: Thu May 31, 2012 6:04 pm
by sebastienlavandier
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

Re: Add JComponent to oxygen by Framework

Posted: Fri Jun 01, 2012 9:14 am
by Radu
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

Re: Add JComponent to oxygen by Framework

Posted: Fri Jun 01, 2012 9:36 am
by sebastienlavandier
Thank you very much for your help Radu
Bye