List of usage examples for javafx.scene.input KeyCharacterCombination KeyCharacterCombination
public KeyCharacterCombination(final @NamedArg("character") String character, final @NamedArg("modifiers") Modifier... modifiers)
From source file:com.cdd.bao.editor.EditSchema.java
private void createMenuItems() { final KeyCombination.Modifier cmd = KeyCombination.SHORTCUT_DOWN, shift = KeyCombination.SHIFT_DOWN, alt = KeyCombination.ALT_DOWN; addMenu(menuFile, "_New", new KeyCharacterCombination("N", cmd)).setOnAction(event -> actionFileNew()); addMenu(menuFile, "_Open", new KeyCharacterCombination("O", cmd)).setOnAction(event -> actionFileOpen()); addMenu(menuFile, "_Save", new KeyCharacterCombination("S", cmd)) .setOnAction(event -> actionFileSave(false)); addMenu(menuFile, "Save _As", new KeyCharacterCombination("S", cmd, shift)) .setOnAction(event -> actionFileSave(true)); addMenu(menuFile, "_Export Dump", new KeyCharacterCombination("E", cmd)) .setOnAction(event -> actionFileExportDump()); addMenu(menuFile, "_Merge", null).setOnAction(event -> actionFileMerge()); menuFile.getItems().add(new SeparatorMenuItem()); addMenu(menuFile, "Confi_gure", new KeyCharacterCombination(",", cmd)) .setOnAction(event -> actionFileConfigure()); addMenu(menuFile, "_Browse Endpoint", new KeyCharacterCombination("B", cmd, shift)) .setOnAction(event -> actionFileBrowse()); if (false) {/*from www.j av a 2 s .c o m*/ addMenu(menuFile, "_Upload Endpoint", new KeyCharacterCombination("U", cmd, shift)) .setOnAction(event -> actionFileUpload()); } Menu menuFileGraphics = new Menu("Graphics"); addMenu(menuFileGraphics, "_Template", null).setOnAction(event -> actionFileGraphicsTemplate()); addMenu(menuFileGraphics, "_Assay", null).setOnAction(event -> actionFileGraphicsAssay()); addMenu(menuFileGraphics, "_Properties", null).setOnAction(event -> actionFileGraphicsProperties()); addMenu(menuFileGraphics, "_Values", null).setOnAction(event -> actionFileGraphicsValues()); menuFile.getItems().add(menuFileGraphics); addMenu(menuFile, "Assay Stats", null).setOnAction(event -> actionFileAssayStats()); menuFile.getItems().add(new SeparatorMenuItem()); addMenu(menuFile, "_Close", new KeyCharacterCombination("W", cmd)).setOnAction(event -> actionFileClose()); addMenu(menuFile, "_Quit", new KeyCharacterCombination("Q", cmd)).setOnAction(event -> actionFileQuit()); addMenu(menuEdit, "Add _Group", new KeyCharacterCombination("G", cmd, shift)) .setOnAction(event -> actionGroupAdd()); addMenu(menuEdit, "Add _Assignment", new KeyCharacterCombination("A", cmd, shift)) .setOnAction(event -> actionAssignmentAdd()); addMenu(menuEdit, "Add Assa_y", new KeyCharacterCombination("Y", cmd, shift)) .setOnAction(event -> actionAssayAdd()); menuEdit.getItems().add(new SeparatorMenuItem()); addMenu(menuEdit, "Cu_t", new KeyCharacterCombination("X", cmd)).setOnAction(event -> actionEditCopy(true)); addMenu(menuEdit, "_Copy", new KeyCharacterCombination("C", cmd)) .setOnAction(event -> actionEditCopy(false)); Menu menuCopyAs = new Menu("Copy As"); menuEdit.getItems().add(menuCopyAs); addMenu(menuEdit, "_Paste", new KeyCharacterCombination("V", cmd)).setOnAction(event -> actionEditPaste()); menuEdit.getItems().add(new SeparatorMenuItem()); addMenu(menuEdit, "_Delete", new KeyCodeCombination(KeyCode.DELETE, cmd, shift)) .setOnAction(event -> actionEditDelete()); addMenu(menuEdit, "_Undo", new KeyCharacterCombination("Z", cmd, shift)) .setOnAction(event -> actionEditUndo()); addMenu(menuEdit, "_Redo", new KeyCharacterCombination("Z", cmd, shift, alt)) .setOnAction(event -> actionEditRedo()); menuEdit.getItems().add(new SeparatorMenuItem()); addMenu(menuEdit, "Move _Up", new KeyCharacterCombination("[", cmd)) .setOnAction(event -> actionEditMove(-1)); addMenu(menuEdit, "Move _Down", new KeyCharacterCombination("]", cmd)) .setOnAction(event -> actionEditMove(1)); addMenu(menuCopyAs, "Layout Tab-Separated", null).setOnAction(event -> actionEditCopyLayoutTSV()); addMenu(menuValue, "_Add Value", new KeyCharacterCombination("V", cmd, shift)) .setOnAction(event -> detail.actionValueAdd()); addMenu(menuValue, "Add _Multiple Values", new KeyCharacterCombination("M", cmd, shift)) .setOnAction(event -> detail.actionValueMultiAdd()); addMenu(menuValue, "_Delete Value", new KeyCodeCombination(KeyCode.DELETE, cmd)) .setOnAction(event -> detail.actionValueDelete()); addMenu(menuValue, "Move _Up", new KeyCodeCombination(KeyCode.UP, cmd)) .setOnAction(event -> detail.actionValueMove(-1)); addMenu(menuValue, "Move _Down", new KeyCodeCombination(KeyCode.DOWN, cmd)) .setOnAction(event -> detail.actionValueMove(1)); menuValue.getItems().add(new SeparatorMenuItem()); addMenu(menuValue, "_Lookup URI", new KeyCharacterCombination("U", cmd)) .setOnAction(event -> detail.actionLookupURI()); addMenu(menuValue, "Lookup _Name", new KeyCharacterCombination("L", cmd)) .setOnAction(event -> detail.actionLookupName()); menuValue.getItems().add(new SeparatorMenuItem()); addMenu(menuValue, "_Sort Values", null).setOnAction(event -> actionValueSort()); addMenu(menuValue, "_Remove Duplicates", null).setOnAction(event -> actionValueDuplicates()); addMenu(menuValue, "Cleanup Values", null).setOnAction(event -> actionValueCleanup()); (menuViewSummary = addCheckMenu(menuView, "_Summary Values", new KeyCharacterCombination("-", cmd))) .setOnAction(event -> actionViewToggleSummary()); addMenu(menuView, "_Template", new KeyCharacterCombination("1", cmd)) .setOnAction(event -> actionViewTemplate()); addMenu(menuView, "_Assays", new KeyCharacterCombination("2", cmd)) .setOnAction(event -> actionViewAssays()); addMenu(menuView, "_Derived Tree", new KeyCharacterCombination("3", cmd)) .setOnAction(event -> detail.actionShowTree()); }