use of javafx.scene.input.KeyCodeCombination in project Gargoyle by callakrsos.
the class PagedCodeAreaFindAndReplaceHelper method createMenus.
/**
* FindAndReplace에 대한 메뉴를 정의.
* @return
* @작성자 : KYJ
* @작성일 : 2017. 1. 13.
*/
public Menu createMenus() {
menuSearch = new Menu("Search");
miFindReplace = new MenuItem("Find/Replace");
miFindReplace.setAccelerator(new KeyCodeCombination(KeyCode.F, KeyCombination.CONTROL_DOWN));
miFindReplace.setOnAction(this::findReplaceEvent);
menuSearch.getItems().add(miFindReplace);
return menuSearch;
}
use of javafx.scene.input.KeyCodeCombination in project Gargoyle by callakrsos.
the class MacroSqlComposite method post.
@FxPostInitialize
public void post() {
MenuItem menuAddItem = new MenuItem("Add");
menuAddItem.setAccelerator(new KeyCodeCombination(KeyCode.INSERT, KeyCharacterCombination.CONTROL_DOWN));
menuAddItem.setOnAction(e -> {
addOnAction();
});
MenuItem menuDeleteItem = new MenuItem("Delete");
menuDeleteItem.setAccelerator(new KeyCodeCombination(KeyCode.DELETE, KeyCharacterCombination.CONTROL_DOWN));
menuDeleteItem.setOnAction(e -> {
addOnAction();
});
tvFavorite.setContextMenu(new ContextMenu(menuAddItem, menuDeleteItem));
borContent.setCenter(new MacroControl(connectionSupplier, initText));
MacroFavorTreeItemCreator macroFavorTreeItem = new MacroFavorTreeItemCreator(connectionSupplier);
MacroItemVO f = new MacroItemVO();
tvFavorite.setRoot(macroFavorTreeItem.createRoot(f));
tvFavorite.setShowRoot(false);
}
use of javafx.scene.input.KeyCodeCombination in project TestFX by TestFX.
the class TypeRobotImplTest method push_with_combination_for_ALT_A.
@Test
public void push_with_combination_for_ALT_A() {
// when:
typeRobot.push(new KeyCodeCombination(A, ALT_DOWN));
// then:
verify(keyboardRobot, times(1)).pressNoWait(eq(ALT), eq(A));
verify(keyboardRobot, times(1)).release(eq(A), eq(ALT));
verifyNoMoreInteractions(keyboardRobot);
}
use of javafx.scene.input.KeyCodeCombination in project TestFX by TestFX.
the class MenuBarTest method setup.
@Before
public void setup() throws Exception {
FxToolkit.setupStage(stage -> {
Menu fileMenu = new Menu("File");
fileMenu.setId("fileMenu");
MenuItem newItem = new MenuItem("New");
newItem.setId("newItem");
newItem.setOnAction(actionEvent -> newMenuShownLatch.countDown());
fileMenu.getItems().add(newItem);
MenuItem saveAsItem = new MenuItem("Save As..............................");
saveAsItem.setId("saveAsItem");
saveAsItem.setAccelerator(new KeyCodeCombination(KeyCode.A, KeyCombination.SHORTCUT_DOWN, KeyCombination.CONTROL_DOWN));
fileMenu.getItems().add(saveAsItem);
editMenu = new Menu("Edit");
editMenu.setId("editMenu");
MenuItem cutItem = new MenuItem("cut");
cutItem.setId("cutItem");
editMenu.getItems().add(cutItem);
MenuBar menuBar = new MenuBar(fileMenu, editMenu);
StackPane pane = new StackPane(new VBox(menuBar));
pane.setAlignment(Pos.CENTER);
Scene scene = new Scene(pane, 300, 400);
stage.setScene(scene);
stage.show();
});
}
use of javafx.scene.input.KeyCodeCombination in project bmoth by hhu-stups.
the class AppView method initialize.
@Override
public void initialize(URL location, ResourceBundle resources) {
save.setAccelerator(new KeyCodeCombination(KeyCode.S, KeyCombination.CONTROL_ANY));
newFile.setAccelerator(new KeyCodeCombination(KeyCode.N, KeyCombination.CONTROL_ANY));
open.setAccelerator(new KeyCodeCombination(KeyCode.O, KeyCombination.CONTROL_ANY));
warningArea.setWrapText(true);
presentation.setAccelerator(new KeyCodeCombination(KeyCode.P, KeyCombination.CONTROL_ANY));
codeArea.selectRange(0, 0);
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));
// XXX
codeArea.richChanges().filter(ch -> !ch.getInserted().equals(ch.getRemoved())).subscribe(change -> codeArea.setStyleSpans(0, Highlighter.computeHighlighting(codeArea.getText())));
codeArea.setStyleSpans(0, Highlighter.computeHighlighting(codeArea.getText()));
codeArea.textProperty().addListener((observableValue, s, t1) -> {
hasChanged = true;
infoArea.setText("Unsaved changes");
});
appViewModel.codeProperty().bind(codeArea.textProperty());
warningArea.textProperty().bind(appViewModel.warningsProperty());
EventBusProvider.getInstance();
EventBusProvider.getInstance().getEventBus().register(this);
}
Aggregations