@Override public void start(Stage stage) { stage.setTitle("Vokabeltrainer"); Scene scene = new Scene(new VBox(), 400, 350); scene.setFill(Color.OLDLACE); MenuBar menuBar = new MenuBar(); // --- Menu File Menu menuFile = new Menu("Vokabeln"); MenuItem sample = new MenuItem("Sample"); sample.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { // Do stuff here } }); menuFile.getItems().add(sample); // --- Menu Edit Menu menuEdit = new Menu("Abfragemodus"); // --- Menu View Menu menuView = new Menu("Statistik"); menuBar.getMenus().addAll(menuFile, menuEdit, menuView); ((VBox) scene.getRoot()).getChildren().addAll(menuBar); stage.setScene(scene); stage.show(); }
private Menu getOGSMenu() { Menu ogsMenu = new Menu("OGS"); MenuItem ogsGameList = new MenuItem("Game List"); ogsGameList.setOnAction(event -> { GameListController controller = new GameListController(); DockNode node = controller.getDockNode(); node.setTitle("OGS GameList"); node.dock(dockPane, DockPos.RIGHT); }); ogsMenu.getItems().add(ogsGameList); return ogsMenu; }
private Menu getWSMenu() { Menu result = new Menu("WSP"); MenuItem editWSPItem = new MenuItem("Edit WSP...", AssetsLoader.getIcon("edit.png")); MenuItem connectItem = new MenuItem("Sign in...", AssetsLoader.getIcon("discord_icon.png")); orgManagerItem = new MenuItem("Organization manager...", AssetsLoader.getIcon("wsp_icon.png")); orgManagerItem.setDisable(true); connectItem.setOnAction(this::connectToWSPAction); editWSPItem.setOnAction(this::editWSPAction); orgManagerItem.setOnAction(this::organizationManagerAction); result.getItems().add(connectItem); result.getItems().add(orgManagerItem); result.getItems().add(editWSPItem); cam.getWspConnectionRequiredMenuItems().add(orgManagerItem); cam.getWspNotConnectedRequiredMenuItems().add(connectItem); cam.getWspNotConnectedRequiredMenuItems().add(editWSPItem); return result; }
@SuppressWarnings("unchecked") // needed for the mocking of ObservableList<MenuItem> @Test void testPopulateRecentFilesMenu() throws UIInitialisationException, IOException { // Clean up file history (not in a global @BeforeEach, due to this test being the only test requiring it) RecentFiles.reset(); final Menu recentFilesMenuMock = mock(Menu.class); when(recentFilesMenuMock.getItems()).thenReturn((ObservableList<MenuItem>) mock(ObservableList.class)); // Add one test-file RecentFiles.add(new File("test.gfa")); menuController.setRecentFilesMenu(recentFilesMenuMock); menuController.populateRecentFilesMenu(); verify(recentFilesMenuMock.getItems()).add(any(MenuItem.class)); // Clean up file history RecentFiles.reset(); }
@Override public boolean marathon_select(String value) { MenuBar menuBar = (MenuBar) node; ObservableList<Menu> menus = menuBar.getMenus(); String[] items = value.split("\\>\\>"); Menu parentMenu = getParentMenu(menus, items[0]); List<MenuItem> menuItems = new ArrayList<>(); for (int i = 1; i < items.length; i++) { getChidernMenuItem(parentMenu, items[i], menuItems); } parentMenu.fire(); menuItems.stream().forEach((menu) -> { if (menu instanceof CheckMenuItem) { CheckMenuItem checkMenuItem = (CheckMenuItem) menu; checkMenuItem.setSelected(!checkMenuItem.isSelected()); } else if (menu instanceof RadioMenuItem) { RadioMenuItem radioMenuItem = (RadioMenuItem) menu; radioMenuItem.setSelected(!isSelected()); } menu.fire(); }); return true; }
private String getTagForMenu(MenuItem source) { LinkedList<MenuItem> menuItems = new LinkedList<>(); while (source != null) { menuItems.addFirst(source); source = source.getParentMenu(); } if (menuItems.getFirst() instanceof Menu) { if (menuItems.size() >= 2) { ownerNode = menuItems.get(1).getParentPopup().getOwnerNode(); return isMenuBar(ownerNode) ? "#menu" : "#contextmenu"; } } else { ownerNode = menuItems.getFirst().getParentPopup().getOwnerNode(); return "#contextmenu"; } return null; }
@Test public void menuPath() { List<String> path = new ArrayList<>(); Platform.runLater(() -> { Menu menuFile = new Menu("File"); MenuItem add = new MenuItem("Shuffle"); MenuItem clear = new MenuItem("Clear"); MenuItem exit = new MenuItem("Exit"); menuFile.getItems().addAll(add, clear, new SeparatorMenuItem(), exit); RFXMenuItem rfxMenuItem = new RFXMenuItem(null, null); path.add(rfxMenuItem.getSelectedMenuPath(clear)); }); new Wait("Waiting for menu selection path") { @Override public boolean until() { return path.size() > 0; } }; AssertJUnit.assertEquals("File>>Clear", path.get(0)); }
@Test public void menuItemIconNoText() { List<String> path = new ArrayList<>(); Platform.runLater(() -> { Menu menuFile = new Menu("File"); MenuItem add = new MenuItem("Shuffle"); MenuItem clear = new MenuItem(); clear.setGraphic(new ImageView(RFXTabPaneTest.imgURL.toString())); MenuItem exit = new MenuItem("Exit"); menuFile.getItems().addAll(add, clear, new SeparatorMenuItem(), exit); RFXMenuItem rfxMenuItem = new RFXMenuItem(null, null); path.add(rfxMenuItem.getSelectedMenuPath(clear)); }); new Wait("Waiting for menu selection path") { @Override public boolean until() { return path.size() > 0; } }; AssertJUnit.assertEquals("File>>middle", path.get(0)); }
@Test public void subMenuPath() { List<String> path = new ArrayList<>(); Platform.runLater(() -> { Menu menuEdit = new Menu("Edit"); Menu menuEffect = new Menu("Picture Effect"); final MenuItem noEffects = new MenuItem("No Effects"); menuEdit.getItems().addAll(menuEffect, noEffects); MenuItem add = new MenuItem("Shuffle"); menuEffect.getItems().addAll(add); RFXMenuItem rfxMenuItem = new RFXMenuItem(null, null); path.add(rfxMenuItem.getSelectedMenuPath(add)); }); new Wait("Waiting for menu selection path") { @Override public boolean until() { return path.size() > 0; } }; AssertJUnit.assertEquals("Edit>>Picture Effect>>Shuffle", path.get(0)); }
@Test public void specialChars() { List<String> path = new ArrayList<>(); Platform.runLater(() -> { Menu menuView = new Menu("View"); CheckMenuItem titleView = createMenuItem("Tit>le"); CheckMenuItem binNameView = createMenuItem("Binomial name"); CheckMenuItem picView = createMenuItem("Picture"); CheckMenuItem descriptionView = createMenuItem("Decsription"); menuView.getItems().addAll(titleView, binNameView, picView, descriptionView); RFXMenuItem rfxMenuItem = new RFXMenuItem(null, null); path.add(rfxMenuItem.getSelectedMenuPath(titleView)); }); new Wait("Waiting for menu selection path") { @Override public boolean until() { return path.size() > 0; } }; AssertJUnit.assertEquals("View>>Tit\\>le", path.get(0)); }
@Test public void duplicateMenuPath() { List<String> path = new ArrayList<>(); Platform.runLater(() -> { Menu menuFile = new Menu("File"); MenuItem add = new MenuItem("Shuffle"); MenuItem clear = new MenuItem("Clear"); MenuItem clear1 = new MenuItem("Clear"); MenuItem clear2 = new MenuItem("Clear"); MenuItem exit = new MenuItem("Exit"); menuFile.getItems().addAll(add, clear, clear1, clear2, new SeparatorMenuItem(), exit); RFXMenuItem rfxMenuItem = new RFXMenuItem(null, null); path.add(rfxMenuItem.getSelectedMenuPath(clear2)); }); new Wait("Waiting for menu selection path") { @Override public boolean until() { return path.size() > 0; } }; AssertJUnit.assertEquals("File>>Clear(2)", path.get(0)); }
@Override @FXThread public void fillContextMenu(@NotNull final NodeTree<?> nodeTree, @NotNull final ObservableList<MenuItem> items) { if (!(nodeTree instanceof ModelNodeTree)) return; final T element = getElement(); final AssetLinkNode linkNode = findParent(element, AssetLinkNode.class::isInstance); if (linkNode == null) { final Menu createMenu = createCreationMenu(nodeTree); if (createMenu != null) items.add(createMenu); final Menu toolMenu = createToolMenu(nodeTree); if (toolMenu != null) items.add(toolMenu); } if (linkNode == null || element == linkNode) { items.add(new AddUserDataAction(nodeTree, this)); } if (canRemove()) { items.add(new RemoveNodeAction(nodeTree, this)); } super.fillContextMenu(nodeTree, items); }
public void addMenu(final String name, final MenuCategory... menuCats) { final Menu newItem = new MenuTranslate(name); // add menus for (final MenuCategory mc : menuCats) // check if category is not empty if (mc.getItems().size() > 0) { // add a separator if (newItem.getItems().size() != 0) newItem.getItems().add(new SeparatorMenuItem()); // add all menu items newItem.getItems().addAll(mc.getItems()); } this.listMenu.add(newItem); this.menu.getMenus().add(newItem); }
public void initialize() { MenuBar menuBar = new MenuBar(); // Make same width as the stage menuBar.prefWidthProperty().bind(primaryStage.widthProperty()); rootPane.setTop(menuBar); // File menu - new, save, exit Menu fileMenu = new Menu("File"); MenuItem newMenuItem = createMenuItem("New", actionEvent -> this.onNewFile()); MenuItem openMenuItem = createMenuItem("Open", actionEvent -> this.onOpenFile()); MenuItem saveMenuItem = createMenuItem("Save", actionEvent -> this.onSaveFile()); saveMenuItem.disableProperty().bind(jwkSetData.changedProperty().not()); MenuItem exitMenuItem = createMenuItem("Exit", actionEvent -> Platform.exit()); fileMenu.getItems().addAll(newMenuItem, openMenuItem, saveMenuItem, new SeparatorMenuItem(), exitMenuItem); menuBar.getMenus().addAll(fileMenu); }
@Override protected void onViewCreated() { siderBarView.setOnItemSelectedListener(contentView::loadBucket); contentView.setOnItemSelectedListener(this::updateSelectItem); contentView.setUpdateListener(bucketFile -> { if (Platform.isFxApplicationThread()) { updateSelectItem(bucketFile); } else { runOnUiThread(() -> this.updateSelectItem(bucketFile)); } }); // 初始化菜单 Menu setting = new Menu("设置"); setting.getItems().add(getMenuItem("TinyPNG", "tinypng")); setting.getItems().add(getMenuItem("七牛", "qiniu")); setting.getItems().add(getMenuItem("Gif", "gif")); Menu about = new Menu("关于"); about.getItems().add(getMenuItem("关于BlogHelper", "aboutBlogHelper")); about.getItems().add(getMenuItem("关于作者cmlanche", "aboutAnchor")); menuBar.getMenus().add(setting); menuBar.getMenus().add(about); if (PlatformUtil.isMac()) { menuBar.setUseSystemMenuBar(true); } // 操作按钮 downloadBtn.setOnAction(event -> contentView.handleAction("download")); renameBtn.setOnAction(event -> contentView.handleAction("rename")); deleteBtn.setOnAction(event -> contentView.handleAction("delete")); optimizeBtn.setOnAction(event -> contentView.handleAction("optimize")); uploadBtn.setOnAction(event -> contentView.handleAction("upload")); }
public PLPToolMenuBarPanel(Controller controller) { this.controller = controller; MenuBar menuBar = new MenuBar(); Menu file = createFileMenu(); Menu edit = createEditMenu(); Menu view = createViewMenu(); Menu project = createProjectMenu(); Menu tools = createToolsMenu(); Menu simulation = createSimulationMenu(); Menu help = createHelpMenu(); menuBar.getMenus().addAll(file, edit, view, project, tools, simulation, help); this.setCenter(menuBar); }
/** * Returns the context menu specific for a single {@link WeekDayView}. Week * day views are used inside a {@link WeekView}. * * @param param * parameter object with the most relevant information for * creating a new context menu * @return a context menu for a week day view */ protected ContextMenu getWeekDayViewMenu(ContextMenuParameter param) { ContextMenu contextMenu = getDayViewBaseMenu(param); WeekDayView weekDayView = (WeekDayView) param.getDateControl(); WeekView weekView = weekDayView.getWeekView(); Menu daysMenu = new Menu(Messages.getString("ContextMenuProvider.SHOW_DAYS")); //$NON-NLS-1$ int[] days = new int[]{5, 7, 14, 21, 28}; for (int d : days) { String itemText = MessageFormat.format(Messages.getString("ContextMenuProvider.DAYS"), d); //$NON-NLS-1$ MenuItem item = new MenuItem(itemText); item.setOnAction(evt -> weekView.setNumberOfDays(d)); daysMenu.getItems().add(item); } contextMenu.getItems().add(daysMenu); return contextMenu; }
public static MenuBar buildLicence() { ClassLoader classLoader = ClassLoader.getSystemClassLoader(); String licenseFileAsString = loadLicenseFileAsString(classLoader); MenuItem licenseMenuItem = new MenuItem(licenseFileAsString); Menu menu = new Menu("GazePlay"); menu.getItems().add(licenseMenuItem); MenuBar menuBar = new MenuBar(); menuBar.getMenus().addAll(menu); menuBar.setPrefHeight(40); menuBar.setPrefWidth(80); return menuBar; }
/** * create the Menu Bar * * @param scene */ public MenuBar createMenuBar(Scene scene, com.bitplan.gui.App app) { MenuBar lMenuBar = new MenuBar(); for (com.bitplan.gui.Menu amenu : app.getMainMenu().getSubMenus()) { Menu menu = new Menu(i18n(amenu.getId())); lMenuBar.getMenus().add(menu); for (com.bitplan.gui.MenuItem amenuitem : amenu.getMenuItems()) { MenuItem menuItem = new MenuItem(i18n(amenuitem.getId())); menuItem.setOnAction(this); menuItem.setId(amenuitem.getId()); menu.getItems().add(menuItem); } } hideMenuButton = new Button(I18n.get(I18n.HIDE_MENU)); hideMenuButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { showMenuBar(scene, lMenuBar, !lMenuBar.isVisible()); } }); return lMenuBar; }
@Bean @Scope(BeanDefinition.SCOPE_PROTOTYPE) public Menu fileMenu() { Menu file = new Menu(localeService.getMessage("ui.menu.file")); file.setMnemonicParsing(false); MenuItem connect = new MenuItem(localeService.getMessage("ui.menu.file.connect")); connect.setMnemonicParsing(false); connect.setOnAction(event -> newConnectionBox(getMainView().getPrimaryStage(), (data) -> getMainController().loadTables(data))); MenuItem manager = new MenuItem(localeService.getMessage("ui.menu.file.manager")); manager.setMnemonicParsing(false); manager.setOnAction(event -> connectionManager()); file.getItems().addAll(connect, manager); return file; }
@Override public void fillContextMenu(@NotNull final NodeTree<?> nodeTree, @NotNull final ObservableList<MenuItem> items) { final Menu changeShapeMenu = new Menu(Messages.MODEL_NODE_TREE_ACTION_CHANGE_COLLISION_SHAPE, new ImageView(Icons.ADD_12)); changeShapeMenu.getItems().addAll(new GenerateCollisionShapeAction(nodeTree, this), new CreateBoxCollisionShapeAction(nodeTree, this), new CreateCapsuleCollisionShapeAction(nodeTree, this), new CreateConeCollisionShapeAction(nodeTree, this), new CreateCylinderCollisionShapeAction(nodeTree, this), new CreateSphereCollisionShapeAction(nodeTree, this)); items.add(changeShapeMenu); super.fillContextMenu(nodeTree, items); }
@Override @FXThread public void fillContextMenu(@NotNull final NodeTree<?> nodeTree, @NotNull final ObservableList<MenuItem> items) { final Toneg0dParticleInfluencers element = getElement(); final ParticleEmitterNode emitterNode = element.getEmitterNode(); final Menu createMenu = new Menu(Messages.MODEL_NODE_TREE_ACTION_CREATE, new ImageView(Icons.ADD_12)); final ObservableList<MenuItem> createItems = createMenu.getItems(); CONSTRUCTORS.forEach((type, constructor) -> { if (emitterNode.getInfluencer(type) != null) return; createItems.add(newInstance(constructor, nodeTree, this)); }); items.add(createMenu); super.fillContextMenu(nodeTree, items); }
private void buildMenuBar() { //file menu, creating the main tabs Menu fileMenu = getFileMenu(); Menu ogsMenu = getOGSMenu(); Menu settingsMenu = getSettingsMenu(); //main menu bar menuBar = new MenuBar(); menuBar.getMenus().addAll(fileMenu, ogsMenu, settingsMenu); }
private Menu getSettingsMenu() { Menu settings = new Menu("Settings"); MenuItem proxy = new MenuItem("Configure Proxy"); proxy.setOnAction(event -> { DockNode node = (new ProxySettings()).getDockNode(); node.setTitle("Proxy Settings"); node.dock(dockPane, DockPos.CENTER); node.setFloating(true); }); settings.getItems().add(proxy); return settings; }
/** * Create creation menu menu. * * @param nodeTree the node tree * @return the menu */ @FXThread protected @Nullable Menu createCreationMenu(@NotNull final NodeTree<?> nodeTree) { final T element = getElement(); final Menu menu = new Menu(MODEL_NODE_TREE_ACTION_CREATE, new ImageView(Icons.ADD_12)); final Menu createControlsMenu = new Menu(MODEL_NODE_TREE_ACTION_ADD_CONTROL, new ImageView(Icons.ADD_12)); final ObservableList<MenuItem> items = createControlsMenu.getItems(); items.add(new CreateCustomControlAction(nodeTree, this)); if (element.getControl(RigidBodyControl.class) == null) { items.add(new CreateStaticRigidBodyControlAction(nodeTree, this)); items.add(new CreateRigidBodyControlAction(nodeTree, this)); } if (element.getControl(VehicleControl.class) == null) { items.add(new CreateVehicleControlAction(nodeTree, this)); } if (element.getControl(CharacterControl.class) == null) { items.add(new CreateCharacterControlAction(nodeTree, this)); } if (element.getControl(MotionEvent.class) == null) { items.add(new CreateMotionControlAction(nodeTree, this)); } items.add(new CreateLightControlAction(nodeTree, this)); //final SkeletonControl skeletonControl = element.getControl(SkeletonControl.class); //if (skeletonControl != null) { //FIXME items.add(new CreateKinematicRagdollControlAction(nodeTree, this)); //} menu.getItems().add(createControlsMenu); return menu; }
private Menu getHelpMenu() { Menu result = new Menu("Help"); MenuItem aboutItem = new MenuItem("About Titanium"); result.getItems().addAll(aboutItem); return result; }
public ToolBarMenus(Dictionary dictionary) { EDITOR_FILE_MENU = new Menu(dictionary.TOOLBAR_EDITOR_FILE_MENU); EDITOR_EDIT_MENU = new Menu(dictionary.TOOLBAR_EDITOR_EDIT_MENU); EDITOR_VIEW_MENU = new Menu(dictionary.TOOLBAR_EDITOR_VIEW_MENU); EDITOR_HELP_MENU = new Menu(dictionary.TOOLBAR_EDITOR_HELP_MENU); EDITOR_EXTENSIONS_MENU = new Menu(dictionary.TOOLBAR_EDITOR_EXTENSIONS_MENU); EDITOR_OPEN_SUBMENU = new Menu(dictionary.TOOLBAR_EDITOR_OPEN_MENU); EDITOR_IMPORT_SUBMENU = new Menu(dictionary.TOOLBAR_EDITOR_IMPORT_MENU); EDITOR_EXPORT_SUBMENU = new Menu(dictionary.TOOLBAR_EDITOR_EXPORT_MENU); }
@Override protected @Nullable Menu createToolMenu(@NotNull final NodeTree<?> nodeTree) { final Menu toolActions = new Menu(Messages.MODEL_NODE_TREE_ACTION_TOOLS, new ImageView(Icons.INFLUENCER_16)); toolActions.getItems().addAll(new TangentGeneratorAction(nodeTree, this), new GenerateLoDAction(nodeTree, this)); return toolActions; }
/** * Create Menu with new file/folder options * * @return */ private Menu createNewMenu() { Menu newMenu = new Menu("New"); newMenu.getItems().add(newTestcaseAction.getMenuItem()); newMenu.getItems().add(etAction.getMenuItem()); newMenu.getItems().add(newModuleAction.getMenuItem()); newMenu.getItems().add(newFixtureAction.getMenuItem()); newMenu.getItems().add(newCheckListAction.getMenuItem()); newMenu.getItems().add(newModuleDirAction.getMenuItem()); newMenu.getItems().add(newSuiteFileAction.getMenuItem()); newMenu.getItems().add(newFeatureFileAction.getMenuItem()); newMenu.getItems().add(newStoryFileAction.getMenuItem()); newMenu.getItems().add(newIssueFileAction.getMenuItem()); return newMenu; }
public String parentMenuText(ObservableList<Menu> menus, int index) { String original = getMenuText(menus, index); String itemText = original; int suffixIndex = 0; for (int i = 0; i < index; i++) { String current = getMenuText(menus, i); if (current.equals(original)) { itemText = String.format("%s(%d)", original, ++suffixIndex); } } return itemText; }
private String getMenuText(ObservableList<Menu> menus, int index) { Menu menu = menus.get(index); String text = menu.getText(); if (text == null || "".equals(text)) { return getMenuTextFromIcon(menu, index); } return text; }
@SuppressWarnings("deprecation") private String getMenuTextFromIcon(Menu menu, int index) { Node graphic = menu.getGraphic(); if (graphic == null || !(graphic instanceof ImageView)) { return "menuindex-" + index; } return nameFromImage(((ImageView) graphic).getImage().impl_getUrl()); }
public String getTextForMenuItem(MenuItem menuItem, Menu parentMenu) { int index = parentMenu.getItems().indexOf(menuItem); String original = getMenuItemText(parentMenu, index); String itemText = original; int suffixIndex = 0; for (int i = 0; i < index; i++) { String current = getMenuItemText(parentMenu, i); if (current.equals(original)) { itemText = String.format("%s(%d)", original, ++suffixIndex); } } return itemText; }
public String getMenuItemText(Menu parentMenu, int index) { MenuItem menuItem = parentMenu.getItems().get(index); String text = menuItem.getText(); if (text == null || "".equals(text)) { return getTextFromIcon(menuItem, index); } return text; }
private void getChidernMenuItem(Menu parentMenu, String items, List<MenuItem> menuItems) { ObservableList<MenuItem> children = parentMenu.getItems(); for (MenuItem menuItem : children) { if (menuItem instanceof Menu) { getChidernMenuItem((Menu) menuItem, items, menuItems); } if (!(menuItem instanceof SeparatorMenuItem) && getTextForMenuItem(menuItem, menuItem.getParentMenu()).equals(items)) { menuItems.add(menuItem); break; } } }
private Menu getParentMenu(ObservableList<Menu> menus, String menuText) { for (Menu menu : menus) { if (parentMenuText(menus, menus.indexOf(menu)).equals(menuText)) { return menu; } } return null; }
private void getChidernMenuItem(ObservableList<MenuItem> children, String items, List<MenuItem> menuItems) { for (MenuItem menuItem : children) { if (menuItem instanceof Menu) { getChidernMenuItem(((Menu) menuItem).getItems(), items, menuItems); } if (!(menuItem instanceof SeparatorMenuItem) && getTextForMenuItem(menuItem).equals(items)) { menuItems.add(menuItem); break; } } }
public String getTextForMenuItem(MenuItem menuItem) { Menu parentMenu = menuItem.getParentMenu(); if (parentMenu == null) { String text = menuItem.getText(); if (text == null || "".equals(text)) { return getTextFromIcon(menuItem, -1); } return text; } return getTextForMenuItem(menuItem, parentMenu); }
public String getTextForMenuItem(MenuItem menuItem) { Menu parentMenu = menuItem.getParentMenu(); if (parentMenu == null) { if (menuBar != null) { ObservableList<Menu> menus = menuBar.getMenus(); return parentMenuText(menus, menus.indexOf(menuItem)); } String text = menuItem.getText(); if (text == null || "".equals(text)) { return getTextFromIcon(menuItem, -1); } return text; } return getTextForMenuItem(menuItem, parentMenu); }
@NotNull private Menu createFileMenu() { final Menu menu = new Menu(Messages.EDITOR_MENU_FILE); menu.getItems().addAll(new OpenAssetAction(), new ReopenAssetMenu(), new ExitAction()); return menu; }