use of javafx.scene.control.cell.TextFieldTreeCell in project Gargoyle by callakrsos.
the class SVNTreeView method addContextMenus.
/***********************************************************************************/
/***********************************************************************************/
/* 일반API 구현 */
/**
* 컨텍스트 메뉴 등록
*
* @작성자 : KYJ
* @작성일 : 2016. 4. 4.
*/
void addContextMenus() {
menuNew = new Menu("New");
menuAddNewLocation = new MenuItem("Repository Location");
menuDiscardLocation = new MenuItem("Discard Location");
menuReflesh = new MenuItem("Reflesh");
menuCheckout = new MenuItem("Checkout");
menuSvnGraph = new MenuItem("SVN Graph");
menuProperties = new MenuItem("Properties");
menuNew.getItems().add(menuAddNewLocation);
menuAddNewLocation.setOnAction(this::menuAddNewLocationOnAction);
menuDiscardLocation.setOnAction(this::menuDiscardLocationOnAction);
menuCheckout.setOnAction(this::menuCheckoutOnAction);
menuSvnGraph.setOnAction(this::menuSVNGraphOnAction);
menuProperties.setOnAction(this::menuPropertiesOnAction);
contextMenu = new ContextMenu(menuNew, new SeparatorMenuItem(), menuCheckout, new SeparatorMenuItem(), menuSvnGraph, new SeparatorMenuItem(), menuDiscardLocation, menuReflesh, new SeparatorMenuItem(), menuProperties);
// setContextMenu(contextMenu);
setCellFactory(treeItem -> {
TextFieldTreeCell<SVNItem> textFieldTreeCell = new TextFieldTreeCell<>();
textFieldTreeCell.setContextMenu(contextMenu);
return textFieldTreeCell;
});
// 특정 조건에 따른 메뉴 VISIBLE 처리를 정의함.
contextMenu.setOnShown(contextMenuVisibleEvent);
}
Aggregations