Search in sources :

Example 6 with CommonContextMenuEvent

use of com.kyj.fx.voeditor.visual.events.CommonContextMenuEvent in project Gargoyle by callakrsos.

the class DaoWizardViewController method tbMethodContextMenu.

/**
	 * 메소드 그리드 메뉴 컨텍스트 추가.
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2015. 10. 22.
	 */
private void tbMethodContextMenu() {
    /* ContextMenu addMenus = */
    CommonsContextMenu.addMenus(tbMethods, Menus.useCudButtons());
    tbMethods.addEventHandler(CommonContextMenuEvent.ACTION, event -> {
        CommonContextMenuEvent _event = (CommonContextMenuEvent) event;
        if (Menus.ADD == _event.getMode()) {
            addDefDaoMethod("", true);
        } else if (Menus.DELETE == _event.getMode()) {
            TbpSysDaoMethodsDVO item = getSelectedMethodItem();
            int selectedIndex = getSelectedMethodIndex();
            tbmSysDaoDVOProperty.get().getTbpSysDaoMethodsDVOList().remove(item);
            txtSql.setContent("");
            tbParams.getItems().clear();
            tbMethods.getItems().remove(selectedIndex);
        }
    });
}
Also used : TbpSysDaoMethodsDVO(kyj.Fx.dao.wizard.core.model.vo.TbpSysDaoMethodsDVO) CommonContextMenuEvent(com.kyj.fx.voeditor.visual.events.CommonContextMenuEvent)

Aggregations

CommonContextMenuEvent (com.kyj.fx.voeditor.visual.events.CommonContextMenuEvent)6 MenuItem (javafx.scene.control.MenuItem)4 ClassTypeCheckBoxCellFactory (com.kyj.fx.voeditor.visual.component.ClassTypeCheckBoxCellFactory)1 DatabaseTableView (com.kyj.fx.voeditor.visual.component.popup.DatabaseTableView)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ObservableList (javafx.collections.ObservableList)1 FXML (javafx.fxml.FXML)1 KeyCode (javafx.scene.input.KeyCode)1 MouseEvent (javafx.scene.input.MouseEvent)1 TableDVO (kyj.Fx.dao.wizard.core.model.vo.TableDVO)1 TableMasterDVO (kyj.Fx.dao.wizard.core.model.vo.TableMasterDVO)1 TableModelDVO (kyj.Fx.dao.wizard.core.model.vo.TableModelDVO)1 TbpSysDaoMethodsDVO (kyj.Fx.dao.wizard.core.model.vo.TbpSysDaoMethodsDVO)1