コード例 #1
0
ファイル: ExportMenu.java プロジェクト: jasonknight/jreality
 @Override
 public void install(Controller c) throws Exception {
   super.install(c);
   viewMenuBar = c.getPlugin(ViewMenuBar.class);
   View view = c.getPlugin(View.class);
   ViewerSwitch viewer = view.getViewer();
   Component parent = viewer.getViewingComponent();
   exportMenu.setIcon(ImageHook.getIcon("disk.png"));
   exportMenu.add(new ExportImage("Image", viewer, parent));
   exportMenu.add(new ExportScreenshot("Screenshot", viewer, parent));
   exportMenu.add(new ExportRIB("RIB", viewer, parent));
   exportMenu.add(new ExportSVG("SVG", viewer, parent));
   exportMenu.add(new ExportPS("PS", viewer, parent));
   exportMenu.add(new ExportVRML("VRML", viewer, parent));
   exportMenu.add(new ExportSTL("STL", viewer, parent));
   exportMenu.add(new ExportOBJ("OBJ", viewer, parent));
   exportMenu.add(new ExportU3D("U3D", viewer, parent));
   exportMenu.add(exportPDF = new ExportPDF("PDF", viewer, parent));
   exportMenu.add(new SunflowMenu(viewer));
   SaveScene saveSceneAction = new SaveScene("Save Scene", viewer, parent);
   saveSceneAction.setIcon(ImageHook.getIcon("disk.png"));
   viewMenuBar.addMenuItem(getClass(), 1, saveSceneAction, "File");
   viewMenuBar.addMenuItem(getClass(), 2, exportMenu, "File");
 }
コード例 #2
0
ファイル: ExportMenu.java プロジェクト: jasonknight/jreality
 @Override
 public void uninstall(Controller c) throws Exception {
   viewMenuBar.removeMenu(getClass(), exportMenu);
   super.uninstall(c);
 }