use of javafx.scene.control.MenuItem in project Gargoyle by callakrsos.
the class CommonsContextMenu method upMenuEvent.
/**
* 위로
*
* @작성자 : KYJ
* @작성일 : 2016. 2. 15.
* @param node
* @return
*/
private static MenuItem upMenuEvent(Control node) {
MenuItem menuItem = new MenuItem("위");
menuItem.addEventHandler(ActionEvent.ACTION, event -> {
CommonContextMenuEvent addMenuEvent = new CommonContextMenuEvent(node, menuItem, Menus.UP);
node.fireEvent(addMenuEvent);
});
return menuItem;
}
use of javafx.scene.control.MenuItem in project Gargoyle by callakrsos.
the class CommonsContextMenu method deleteMenuEvent.
/**
* @Date 2015. 10. 14.
* @param tableView
* @return
* @User KYJ
*/
private static MenuItem deleteMenuEvent(Control node) {
MenuItem menuItem = new MenuItem("삭제");
menuItem.addEventHandler(ActionEvent.ACTION, event -> {
CommonContextMenuEvent addMenuEvent = new CommonContextMenuEvent(node, menuItem, Menus.DELETE);
node.fireEvent(addMenuEvent);
});
return menuItem;
}
use of javafx.scene.control.MenuItem in project Gargoyle by callakrsos.
the class SqlTabPanExample method start.
@Override
public void start(Stage primaryStage) throws NotYetSupportException, GargoyleConnectionFailException, InstantiationException, IllegalAccessException, ClassNotFoundException {
primaryStage.setTitle("Database Exam");
CommonsSqllPan sqlPane = CommonsSqllPan.getSqlPane();
sqlPane.getStylesheets().add(SkinManager.getInstance().getSkin());
BorderPane root = new BorderPane(sqlPane);
Menu menu = new Menu("Exam");
MenuItem e = new MenuItem("exam");
e.setOnAction(System.out::println);
e.setAccelerator(new KeyCodeCombination(KeyCode.E, KeyCombination.CONTROL_DOWN));
menu.getItems().add(e);
root.setTop(new MenuBar(menu));
primaryStage.setScene(new Scene(root, 1100, 700));
primaryStage.show();
// Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA);
// DockPane.initializeDefaultUserAgentStylesheet();
}
use of javafx.scene.control.MenuItem 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.control.MenuItem in project Gargoyle by callakrsos.
the class NrchRealtimeSrchFlowComposite method contextMenu.
/**
* @작성자 : KYJ
* @작성일 : 2016. 11. 21.
*/
private void contextMenu(Node target) {
target.setOnMousePressed(ev -> {
if (MouseButton.SECONDARY == ev.getButton()) {
if (ev.getClickCount() != 1) {
return;
}
if (ev.getSource() instanceof VBox) {
VBox tmp = (VBox) ev.getSource();
Object userData = tmp.getUserData();
if (userData != null) {
ContextMenu contextMenu = new ContextMenu();
MenuItem menuGoogleTrend = new MenuItem("구글 트랜드로 조회");
menuGoogleTrend.setOnAction(e -> {
googleChartSearch((RealtimeSearchItemVO) userData);
});
MenuItem menuArticleAnalyzer = new MenuItem("기사 분석기 - Preview ver.");
menuArticleAnalyzer.setOnAction(e -> {
FxUtil.createStageAndShow(new ArticleExtractorComposite((RealtimeSearchItemVO) userData), stage -> {
stage.initOwner(FxUtil.getWindow(getParent()));
stage.setTitle(ArticleExtractorComposite.TITLE);
stage.sizeToScene();
});
});
contextMenu.getItems().addAll(menuGoogleTrend, menuArticleAnalyzer);
contextMenu.show(this.getParent().getScene().getWindow(), ev.getScreenX(), ev.getScreenY());
}
}
}
});
}
Aggregations