I am writing a Magicdraw plugin with JavaFx Framework to add a new Browser. Following is the code of initialization of a new browser in LibraryBrowser class.
private static final WindowComponentInfo info = new WindowComponentInfo("test_browser", "Test Browser", null,
ProjectWindowsManager.SIDE_WEST, ProjectWindowsManager.STATE_DOCKED, true);
public LibraryBrowser() {
Browser.addBrowserInitializer(new Browser.BrowserInitializer() {
@Override
public void init(@Nonnull Browser browser, @Nonnull Project project) {
browser.addPanel(new LibraryBrowserView(info)); //add library view
}
@Override
public WindowComponentInfoRegistration getInfo() {
return new WindowComponentInfoRegistration(info, null);
}
});
}
Where LibraryBrowserView is a class that extends ExtendedPanel implements WindowComponent as in following code presented.
public class LibraryBrowserView extends ExtendedPanel implements WindowComponent {
private WindowComponentInfo info;
public LibraryBrowserView(WindowComponentInfo info) {
//Set WindowComponentInfo
this.info = info;
JFXPanel fxPanel = new JFXPanel();
add(fxPanel);
fxPanel.setVisible(true);
Group root1 = new Group();
Scene scene = new Scene(root1, Color.ALICEBLUE);
Text text = new Text();
text.setX(40);
text.setY(100);
text.setFont(new Font(25));
text.setText("Test JavaFX!");
root1.getChildren().add(text);
fxPanel.setScene(scene);
}
@Override
public WindowComponentContent getContent() {
return new BrowserWindowComponentContext(this);
}
@Override
public WindowComponentInfo getInfo() {
return info;
}}
class BrowserWindowComponentContext implements WindowComponentContent {
private JPanel panel;
public BrowserWindowComponentContext(JPanel panel) {
this.panel = panel;
}
@Override
public Component getWindowComponent() {
return panel;
}
@Override
public Component getDefaultFocusComponent() {
return panel;
}}
The error occurs when I open the MagicDraw.
java.lang.UnsatisfiedLinkError: com.sun.prism.d3d.D3DVertexBuffer.nDrawIndexedQuads(J[F[BI)I