Search in sources :

Example 16 with ActionEvent

use of javafx.event.ActionEvent in project Gargoyle by callakrsos.

the class CodeAreaHelper method codeAreaKeyClick.

/**
	 * 키클릭 이벤트 처리
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2015. 12. 14.
	 * @param e
	 */
public void codeAreaKeyClick(KeyEvent e) {
    //CTRL + F
    if (KeyCode.F == e.getCode() && e.isControlDown() && !e.isShiftDown() && !e.isAltDown()) {
        if (!e.isConsumed()) {
            findAndReplaceHelper.findReplaceEvent(new ActionEvent());
            e.consume();
        }
    } else //CTRL + L
    if (KeyCode.L == e.getCode() && e.isControlDown() && !e.isShiftDown() && !e.isAltDown()) {
        if (!e.isConsumed()) {
            moveToLineEvent(new ActionEvent());
            e.consume();
        }
    } else // CTRL + U
    if (KeyCode.U == e.getCode() && e.isControlDown() && e.isShiftDown() && !e.isAltDown()) {
        if (!e.isConsumed()) {
            toUppercaseEvent(new ActionEvent());
            e.consume();
        }
    } else //CTRL + L
    if (KeyCode.L == e.getCode() && e.isControlDown() && e.isShiftDown() && !e.isAltDown()) {
        if (!e.isConsumed()) {
            toLowercaseEvent(new ActionEvent());
            e.consume();
        }
    } else //Tab
    if (e.getCode() == KeyCode.TAB && (!e.isControlDown() && !e.isShiftDown())) {
        if (e.isConsumed())
            return;
        String selectedText = codeArea.getSelectedText();
        IndexRange selection = codeArea.getSelection();
        int start = selection.getStart();
        if (ValueUtil.isEmpty(selectedText))
            return;
        String tabbing = ValueUtil.tapping(selectedText);
        replaceSelection(tabbing);
        IndexRange selection2 = codeArea.getSelection();
        int end = selection2.getEnd();
        codeArea.selectRange(start, end);
        e.consume();
    } else //Shift + Tab
    if (e.getCode() == KeyCode.TAB && (!e.isControlDown() && e.isShiftDown())) {
        if (e.isConsumed())
            return;
        String selectedText = codeArea.getSelectedText();
        IndexRange selection = codeArea.getSelection();
        if (selection.getStart() == selection.getEnd()) {
            codeArea.selectLine();
            selectedText = codeArea.getSelectedText();
            selection = codeArea.getSelection();
            String tabbing = ValueUtil.reverseTapping(selectedText);
            replaceSelection(tabbing);
            codeArea.selectRange(selection.getStart(), selection.getStart());
        } else {
            String tabbing = ValueUtil.reverseTapping(selectedText);
            replaceSelection(tabbing);
            codeArea.selectRange(selection.getStart(), selection.getEnd());
        }
        e.consume();
    } else //////////////////////////////////////////////////////////////////////////////////////
    {
        codeArea.getUndoManager().mark();
    }
}
Also used : IndexRange(javafx.scene.control.IndexRange) ActionEvent(javafx.event.ActionEvent)

Example 17 with ActionEvent

use of javafx.event.ActionEvent in project Gargoyle by callakrsos.

the class SqlPane method menuExportJsonOnAction.

/**
	 * Export JSON Script.
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2016. 6. 13.
	 * @param e
	 */
public void menuExportJsonOnAction(ActionEvent e) {
    ObservableList<Map<String, Object>> items = tbResult.getItems();
    if (items.isEmpty())
        return;
    Map<String, Object> map = items.get(0);
    if (map == null)
        return;
    // 클립보드 복사
    StringBuilder clip = new StringBuilder();
    List<String> valueList = items.stream().map(v -> {
        return ValueUtil.toJSONString(v);
    }).collect(Collectors.toList());
    valueList.forEach(str -> {
        clip.append(str).append(System.lineSeparator());
    });
    try {
        SimpleTextView parent = new SimpleTextView(clip.toString());
        parent.setWrapText(false);
        FxUtil.createStageAndShow(parent, stage -> {
        });
    } catch (Exception e1) {
        LOGGER.error(ValueUtil.toString(e1));
    }
}
Also used : SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) Arrays(java.util.Arrays) CheckComboBox(org.controlsfx.control.CheckComboBox) Application(javafx.application.Application) TabPane(javafx.scene.control.TabPane) ListChangeListener(javafx.collections.ListChangeListener) MacroControl(com.kyj.fx.voeditor.visual.component.macro.MacroControl) Map(java.util.Map) SQLPaneMotionable(com.kyj.fx.voeditor.visual.component.sql.functions.SQLPaneMotionable) SimpleIntegerProperty(javafx.beans.property.SimpleIntegerProperty) VariableMappingView(com.kyj.fx.voeditor.visual.component.popup.VariableMappingView) DockPane(com.kyj.fx.voeditor.visual.component.dock.pane.DockPane) SystemUtils(org.apache.commons.lang.SystemUtils) Strings(com.sun.btrace.BTraceUtils.Strings) ColumnExpression(com.kyj.fx.voeditor.visual.component.grid.EditableTableView.ColumnExpression) SplitPane(javafx.scene.control.SplitPane) Pair(javafx.util.Pair) EditableTableViewComposite(com.kyj.fx.voeditor.visual.component.grid.EditableTableViewComposite) KeyEvent(javafx.scene.input.KeyEvent) ValueExpression(com.kyj.fx.voeditor.visual.component.grid.EditableTableView.ValueExpression) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) CustomInputDialogAction(com.kyj.fx.voeditor.visual.util.DialogUtil.CustomInputDialogAction) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) TitledBorderPane(com.kyj.fx.voeditor.visual.component.TitledBorderPane) TableViewSelectionModel(javafx.scene.control.TableView.TableViewSelectionModel) MouseButton(javafx.scene.input.MouseButton) ASTSqlCodeAreaHelper(com.kyj.fx.voeditor.visual.component.text.ASTSqlCodeAreaHelper) TreeItem(javafx.scene.control.TreeItem) FXCollections(javafx.collections.FXCollections) GagoyleTabProxy(com.kyj.fx.voeditor.visual.main.layout.GagoyleTabProxy) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) Supplier(java.util.function.Supplier) IntegerProperty(javafx.beans.property.IntegerProperty) ArrayList(java.util.ArrayList) TableItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.commons.TableItemTree) Color(javafx.scene.paint.Color) Node(javafx.scene.Node) TableOpenResourceView(com.kyj.fx.voeditor.visual.component.popup.TableOpenResourceView) StringConverter(javafx.util.StringConverter) SchoolMgrerSpreadSheetView(com.kyj.fx.voeditor.visual.main.layout.SchoolMgrerSpreadSheetView) GridPane(jfxtras.scene.layout.GridPane) File(java.io.File) SqlTabPane(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTabPane) Menu(javafx.scene.control.Menu) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) SelectionMode(javafx.scene.control.SelectionMode) TreeMap(java.util.TreeMap) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) ResultDialog(com.kyj.fx.voeditor.visual.component.ResultDialog) Button(javafx.scene.control.Button) Connection(java.sql.Connection) DbUtil(com.kyj.fx.voeditor.visual.util.DbUtil) LoggerFactory(org.slf4j.LoggerFactory) ToExcelFileFunction(com.kyj.fx.voeditor.visual.functions.ToExcelFileFunction) EncrypUtil(com.kyj.fx.voeditor.visual.util.EncrypUtil) ContextMenu(javafx.scene.control.ContextMenu) WindowEvent(javafx.stage.WindowEvent) TableView(javafx.scene.control.TableView) SqlKeywords(com.kyj.fx.voeditor.visual.component.text.SqlKeywords) Orientation(javafx.geometry.Orientation) HBox(javafx.scene.layout.HBox) TextField(javafx.scene.control.TextField) Main(com.kyj.fx.voeditor.visual.main.Main) MenuItem(javafx.scene.control.MenuItem) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) Collectors(java.util.stream.Collectors) TreeView(javafx.scene.control.TreeView) ISchemaTreeItem(com.kyj.fx.voeditor.visual.component.sql.functions.ISchemaTreeItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) List(java.util.List) SqlTab(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTab) Entry(java.util.Map.Entry) RowMapper(org.springframework.jdbc.core.RowMapper) Optional(java.util.Optional) DateUtil(com.kyj.fx.voeditor.visual.util.DateUtil) MouseEvent(javafx.scene.input.MouseEvent) HashMap(java.util.HashMap) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) Function(java.util.function.Function) BigDataDVO(com.kyj.fx.voeditor.visual.framework.BigDataDVO) TableColumn(javafx.scene.control.TableColumn) Insets(javafx.geometry.Insets) FxCollectors(com.kyj.fx.voeditor.visual.util.FxCollectors) Tooltip(javafx.scene.control.Tooltip) KeyCode(javafx.scene.input.KeyCode) ObjectProperty(javafx.beans.property.ObjectProperty) Modality(javafx.stage.Modality) Logger(org.slf4j.Logger) Label(javafx.scene.control.Label) Iterator(java.util.Iterator) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) Consumer(java.util.function.Consumer) ActionEvent(javafx.event.ActionEvent) Stage(javafx.stage.Stage) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) Collections(java.util.Collections) SharedMemory(com.kyj.fx.voeditor.visual.momory.SharedMemory) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) Map(java.util.Map) TreeMap(java.util.TreeMap) HashMap(java.util.HashMap)

Example 18 with ActionEvent

use of javafx.event.ActionEvent in project Gargoyle by callakrsos.

the class SqlPane method menuExportExcelOnAction.

/**
	 * Excel Export.
	 *
	 * @param e
	 */
public void menuExportExcelOnAction(ActionEvent e) {
    File saveFile = DialogUtil.showFileSaveDialog(SharedMemory.getPrimaryStage().getOwner(), option -> {
        option.setInitialFileName(DateUtil.getCurrentDateString(DateUtil.SYSTEM_DATEFORMAT_YYYYMMDDHHMMSS));
        option.getExtensionFilters().add(new ExtensionFilter("Excel files (*.xlsx)", "*.xlsx"));
        option.getExtensionFilters().add(new ExtensionFilter("Excel files (*.xls)", "*.xls"));
        option.getExtensionFilters().add(new ExtensionFilter("All files", "*.*"));
        option.setTitle("Save Excel");
        option.setInitialDirectory(new File(SystemUtils.USER_HOME));
    });
    if (saveFile == null) {
        return;
    }
    if (saveFile.exists()) {
        Optional<Pair<String, String>> showYesOrNoDialog = DialogUtil.showYesOrNoDialog("overwrite ?? ", FILE_OVERWIRTE_MESSAGE);
        showYesOrNoDialog.ifPresent(consume -> {
            String key = consume.getKey();
            String value = consume.getValue();
            if (!("RESULT".equals(key) && "Y".equals(value))) {
                return;
            }
        });
    }
    ObservableList<Map<String, Object>> items = this.tbResult.getItems();
    ToExcelFileFunction toExcelFileFunction = new ToExcelFileFunction();
    List<String> columns = this.tbResult.getColumns().stream().map(col -> col.getText()).collect(Collectors.toList());
    toExcelFileFunction.generate0(saveFile, columns, items);
    DialogUtil.showMessageDialog("complete...");
}
Also used : SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) Arrays(java.util.Arrays) CheckComboBox(org.controlsfx.control.CheckComboBox) Application(javafx.application.Application) TabPane(javafx.scene.control.TabPane) ListChangeListener(javafx.collections.ListChangeListener) MacroControl(com.kyj.fx.voeditor.visual.component.macro.MacroControl) Map(java.util.Map) SQLPaneMotionable(com.kyj.fx.voeditor.visual.component.sql.functions.SQLPaneMotionable) SimpleIntegerProperty(javafx.beans.property.SimpleIntegerProperty) VariableMappingView(com.kyj.fx.voeditor.visual.component.popup.VariableMappingView) DockPane(com.kyj.fx.voeditor.visual.component.dock.pane.DockPane) SystemUtils(org.apache.commons.lang.SystemUtils) Strings(com.sun.btrace.BTraceUtils.Strings) ColumnExpression(com.kyj.fx.voeditor.visual.component.grid.EditableTableView.ColumnExpression) SplitPane(javafx.scene.control.SplitPane) Pair(javafx.util.Pair) EditableTableViewComposite(com.kyj.fx.voeditor.visual.component.grid.EditableTableViewComposite) KeyEvent(javafx.scene.input.KeyEvent) ValueExpression(com.kyj.fx.voeditor.visual.component.grid.EditableTableView.ValueExpression) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) CustomInputDialogAction(com.kyj.fx.voeditor.visual.util.DialogUtil.CustomInputDialogAction) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) TitledBorderPane(com.kyj.fx.voeditor.visual.component.TitledBorderPane) TableViewSelectionModel(javafx.scene.control.TableView.TableViewSelectionModel) MouseButton(javafx.scene.input.MouseButton) ASTSqlCodeAreaHelper(com.kyj.fx.voeditor.visual.component.text.ASTSqlCodeAreaHelper) TreeItem(javafx.scene.control.TreeItem) FXCollections(javafx.collections.FXCollections) GagoyleTabProxy(com.kyj.fx.voeditor.visual.main.layout.GagoyleTabProxy) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) Supplier(java.util.function.Supplier) IntegerProperty(javafx.beans.property.IntegerProperty) ArrayList(java.util.ArrayList) TableItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.commons.TableItemTree) Color(javafx.scene.paint.Color) Node(javafx.scene.Node) TableOpenResourceView(com.kyj.fx.voeditor.visual.component.popup.TableOpenResourceView) StringConverter(javafx.util.StringConverter) SchoolMgrerSpreadSheetView(com.kyj.fx.voeditor.visual.main.layout.SchoolMgrerSpreadSheetView) GridPane(jfxtras.scene.layout.GridPane) File(java.io.File) SqlTabPane(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTabPane) Menu(javafx.scene.control.Menu) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) SelectionMode(javafx.scene.control.SelectionMode) TreeMap(java.util.TreeMap) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) ResultDialog(com.kyj.fx.voeditor.visual.component.ResultDialog) Button(javafx.scene.control.Button) Connection(java.sql.Connection) DbUtil(com.kyj.fx.voeditor.visual.util.DbUtil) LoggerFactory(org.slf4j.LoggerFactory) ToExcelFileFunction(com.kyj.fx.voeditor.visual.functions.ToExcelFileFunction) EncrypUtil(com.kyj.fx.voeditor.visual.util.EncrypUtil) ContextMenu(javafx.scene.control.ContextMenu) WindowEvent(javafx.stage.WindowEvent) TableView(javafx.scene.control.TableView) SqlKeywords(com.kyj.fx.voeditor.visual.component.text.SqlKeywords) Orientation(javafx.geometry.Orientation) HBox(javafx.scene.layout.HBox) TextField(javafx.scene.control.TextField) Main(com.kyj.fx.voeditor.visual.main.Main) MenuItem(javafx.scene.control.MenuItem) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) Collectors(java.util.stream.Collectors) TreeView(javafx.scene.control.TreeView) ISchemaTreeItem(com.kyj.fx.voeditor.visual.component.sql.functions.ISchemaTreeItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) List(java.util.List) SqlTab(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTab) Entry(java.util.Map.Entry) RowMapper(org.springframework.jdbc.core.RowMapper) Optional(java.util.Optional) DateUtil(com.kyj.fx.voeditor.visual.util.DateUtil) MouseEvent(javafx.scene.input.MouseEvent) HashMap(java.util.HashMap) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) Function(java.util.function.Function) BigDataDVO(com.kyj.fx.voeditor.visual.framework.BigDataDVO) TableColumn(javafx.scene.control.TableColumn) Insets(javafx.geometry.Insets) FxCollectors(com.kyj.fx.voeditor.visual.util.FxCollectors) Tooltip(javafx.scene.control.Tooltip) KeyCode(javafx.scene.input.KeyCode) ObjectProperty(javafx.beans.property.ObjectProperty) Modality(javafx.stage.Modality) Logger(org.slf4j.Logger) Label(javafx.scene.control.Label) Iterator(java.util.Iterator) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) Consumer(java.util.function.Consumer) ActionEvent(javafx.event.ActionEvent) Stage(javafx.stage.Stage) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) Collections(java.util.Collections) SharedMemory(com.kyj.fx.voeditor.visual.momory.SharedMemory) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) ToExcelFileFunction(com.kyj.fx.voeditor.visual.functions.ToExcelFileFunction) File(java.io.File) Map(java.util.Map) TreeMap(java.util.TreeMap) HashMap(java.util.HashMap) Pair(javafx.util.Pair)

Example 19 with ActionEvent

use of javafx.event.ActionEvent in project Gargoyle by callakrsos.

the class MysqlPane method menuExportInsertScriptOnAction.

@Override
public void menuExportInsertScriptOnAction(ActionEvent e) {
    Optional<Pair<String, String[]>> showTableInputDialog = showTableInputDialog(f -> f.getName());
    // DialogUtil.showInputDialog("table Name", "테이블명을 입력하세요.");
    if (showTableInputDialog == null)
        return;
    showTableInputDialog.ifPresent(op -> {
        if (op == null || op.getValue() == null)
            return;
        String schemaName = op.getValue()[0];
        String _tableName = op.getValue()[1];
        String tableName = "";
        if (ValueUtil.isNotEmpty(schemaName)) {
            tableName = String.format("`%s`.%s", schemaName, _tableName);
        }
        ObservableList<Map<String, Object>> items = getTbResult().getItems();
        Map<String, Object> map = items.get(0);
        final Set<String> keySet = map.keySet();
        StringBuilder clip = new StringBuilder();
        String insertPreffix = "insert into " + tableName;
        String collect = keySet.stream().collect(Collectors.joining(",", "(", ")"));
        String insertMiddle = " values ";
        List<String> valueList = items.stream().map(v -> {
            return ValueUtil.toJSONObject(v);
        }).map(v -> {
            Iterator<String> iterator = keySet.iterator();
            List<Object> values = new ArrayList<>();
            while (iterator.hasNext()) {
                String columnName = iterator.next();
                Object value = v.get(columnName);
                values.add(value);
            }
            return values;
        }).map(list -> {
            return list.stream().map(str -> {
                if (str == null)
                    return null;
                else {
                    String convert = str.toString();
                    convert = convert.substring(1, convert.length() - 1);
                    if (convert.indexOf("'") >= 0) {
                        try {
                            convert = StringUtils.replace(convert, "'", "''");
                        } catch (Exception e1) {
                            e1.printStackTrace();
                        }
                    }
                    return "'".concat(convert).concat("'");
                }
            }).collect(Collectors.joining(",", "(", ")"));
        }).map(str -> {
            return new StringBuilder().append(insertPreffix).append(collect).append(insertMiddle).append(str).append(";\n").toString();
        }).collect(Collectors.toList());
        valueList.forEach(str -> {
            clip.append(str);
        });
        SimpleTextView parent = new SimpleTextView(clip.toString());
        parent.setWrapText(false);
        FxUtil.createStageAndShow(String.format("[InsertScript] Table : %s", tableName), parent, stage -> {
        });
    });
}
Also used : Connection(java.sql.Connection) TreeItem(javafx.scene.control.TreeItem) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) Supplier(java.util.function.Supplier) StringUtils(org.apache.commons.lang3.StringUtils) ArrayList(java.util.ArrayList) TableItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.commons.TableItemTree) Map(java.util.Map) MySQLDatabaseItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.mysql.MySQLDatabaseItemTree) Pair(javafx.util.Pair) Iterator(java.util.Iterator) DatabaseTreeNode(com.kyj.fx.voeditor.visual.component.sql.dbtree.DatabaseTreeNode) Set(java.util.Set) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) Collectors(java.util.stream.Collectors) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) List(java.util.List) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) ActionEvent(javafx.event.ActionEvent) Stage(javafx.stage.Stage) DatabaseItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.commons.DatabaseItemTree) Optional(java.util.Optional) ObservableList(javafx.collections.ObservableList) Iterator(java.util.Iterator) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ArrayList(java.util.ArrayList) List(java.util.List) ObservableList(javafx.collections.ObservableList) Map(java.util.Map) Pair(javafx.util.Pair)

Example 20 with ActionEvent

use of javafx.event.ActionEvent in project Gargoyle by callakrsos.

the class SystemLayoutViewController method treeProjectFileOnKeyPressed.

/********************************
	 * 작성일 : 2016. 6. 11. 작성자 : KYJ
	 *
	 * 트리 키 클릭 이벤트
	 *
	 * @param event
	 ********************************/
public void treeProjectFileOnKeyPressed(KeyEvent event) {
    if (event.getCode() == KeyCode.R && event.isControlDown() && event.isShiftDown() && !event.isAltDown()) {
        try {
            GagoyleWorkspaceOpenResourceView resourceView = new GagoyleWorkspaceOpenResourceView();
            ResultDialog<File> show = resourceView.show();
            File data = show.getData();
            if (data != null && data.exists()) {
                TreeItem<FileWrapper> search = search(data);
                treeProjectFile.getSelectionModel().select(search);
                treeProjectFile.getFocusModel().focus(treeProjectFile.getSelectionModel().getSelectedIndex());
                treeProjectFile.scrollTo(treeProjectFile.getSelectionModel().getSelectedIndex());
                openFile(data);
            }
        } catch (Exception e) {
            LOGGER.error(ValueUtil.toString(e));
        }
    } else if (event.getCode() == KeyCode.DELETE && !event.isControlDown() && !event.isShiftDown() && !event.isAltDown()) {
        //이벤트 발생시킴.
        ActionEvent.fireEvent(tail -> tail.append((event1, tail1) -> {
            deleteFileMenuItemOnAction((ActionEvent) event1);
            return event1;
        }), new ActionEvent());
    } else if (KeyCode.F5 == event.getCode()) {
        TreeItem<FileWrapper> selectedItem = treeProjectFile.getSelectionModel().getSelectedItem();
        if (selectedItem != null)
            refleshWorkspaceTreeItem(selectedItem);
    }
}
Also used : Arrays(java.util.Arrays) StringUtils(org.apache.commons.lang.StringUtils) MultipleSelectionModel(javafx.scene.control.MultipleSelectionModel) ListChangeListener(javafx.collections.ListChangeListener) JavaProjectFileTreeItem(com.kyj.fx.voeditor.visual.component.JavaProjectFileTreeItem) FileUtil(com.kyj.fx.voeditor.visual.util.FileUtil) Path(java.nio.file.Path) SystemUtils(org.apache.commons.lang.SystemUtils) SplitPane(javafx.scene.control.SplitPane) Pair(javafx.util.Pair) Event(javafx.event.Event) KeyEvent(javafx.scene.input.KeyEvent) PluginLoader(com.kyj.fx.voeditor.visual.loder.PluginLoader) Platform(javafx.application.Platform) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) XMLTextView(com.kyj.fx.voeditor.visual.component.popup.XMLTextView) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) CodeAnalysisJavaTextArea(com.kyj.fx.voeditor.visual.component.text.CodeAnalysisJavaTextArea) DbExecListener(com.kyj.fx.voeditor.visual.util.DbExecListener) SVNViewer(com.kyj.fx.voeditor.visual.component.scm.SVNViewer) TreeItem(javafx.scene.control.TreeItem) FXCollections(javafx.collections.FXCollections) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) FilePropertiesComposite(com.kyj.fx.voeditor.visual.component.file.FilePropertiesComposite) FXMLLoader(javafx.fxml.FXMLLoader) SpecResource(com.kyj.fx.voeditor.visual.words.spec.auto.msword.ui.model.SpecResource) UtubeDownloaderComposite(com.kyj.fx.voeditor.visual.component.utube.UtubeDownloaderComposite) Properties(java.util.Properties) ImageViewPane(com.kyj.fx.voeditor.visual.component.ImageViewPane) TitledPane(javafx.scene.control.TitledPane) Node(javafx.scene.Node) IOException(java.io.IOException) FileUtils(org.apache.commons.io.FileUtils) RuntimeClassUtil(com.kyj.fx.voeditor.visual.util.RuntimeClassUtil) File(java.io.File) ReadOnlySingletonConsole(com.kyj.fx.voeditor.visual.component.console.ReadOnlySingletonConsole) GoogleTrendComposite(com.kyj.fx.voeditor.visual.component.google.trend.GoogleTrendComposite) Menu(javafx.scene.control.Menu) ContextMenuEvent(javafx.scene.input.ContextMenuEvent) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) NrchRealtimeSrchFlowComposite(com.kyj.fx.voeditor.visual.component.nrch.realtime.NrchRealtimeSrchFlowComposite) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) ImageView(javafx.scene.image.ImageView) ResultDialog(com.kyj.fx.voeditor.visual.component.ResultDialog) SkinManager(com.kyj.fx.voeditor.visual.momory.SkinManager) Image(javafx.scene.image.Image) EventHandler(javafx.event.EventHandler) Button(javafx.scene.control.Button) DbUtil(com.kyj.fx.voeditor.visual.util.DbUtil) LoggerFactory(org.slf4j.LoggerFactory) NullExpresion(com.kyj.fx.voeditor.visual.util.NullExpresion) JavaSVNManager(com.kyj.scm.manager.svn.java.JavaSVNManager) SVNWcDbClient(com.kyj.scm.manager.svn.java.SVNWcDbClient) PDFImageBasePane(com.kyj.fx.voeditor.visual.component.PDFImageBasePane) VBox(javafx.scene.layout.VBox) SelectWorkspaceView(com.kyj.fx.voeditor.visual.component.popup.SelectWorkspaceView) PMDCheckedListComposite(com.kyj.fx.voeditor.visual.component.pmd.PMDCheckedListComposite) Parent(javafx.scene.Parent) JavaProjectMemberFileTreeItem(com.kyj.fx.voeditor.visual.component.JavaProjectMemberFileTreeItem) ContextMenu(javafx.scene.control.ContextMenu) GargoyleExtensionFilters(com.kyj.fx.voeditor.visual.util.GargoyleExtensionFilters) CommonsSqllPan(com.kyj.fx.voeditor.visual.component.sql.view.CommonsSqllPan) WindowEvent(javafx.stage.WindowEvent) FXMLTextView(com.kyj.fx.voeditor.visual.component.popup.FXMLTextView) GagoyleWorkspaceOpenResourceView(com.kyj.fx.voeditor.visual.component.popup.GagoyleWorkspaceOpenResourceView) TextField(javafx.scene.control.TextField) Main(com.kyj.fx.voeditor.visual.main.Main) MenuItem(javafx.scene.control.MenuItem) PMDUtil(com.kyj.fx.voeditor.visual.util.PMDUtil) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) DockTab(com.kyj.fx.voeditor.visual.component.dock.tab.DockTab) TreeView(javafx.scene.control.TreeView) JarWrapper(com.kyj.fx.voeditor.visual.loder.JarWrapper) FXML(javafx.fxml.FXML) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) Priority(javafx.scene.layout.Priority) List(java.util.List) GagoyleParentBeforeLoad(com.kyj.fx.voeditor.visual.framework.GagoyleParentBeforeLoad) SpecTabPane(com.kyj.fx.voeditor.visual.words.spec.auto.msword.ui.tabs.SpecTabPane) GagoyleParentOnLoaded(com.kyj.fx.voeditor.visual.framework.GagoyleParentOnLoaded) Optional(java.util.Optional) LogViewComposite(com.kyj.fx.voeditor.visual.component.text.LogViewComposite) DateUtil(com.kyj.fx.voeditor.visual.util.DateUtil) ReadOnlyConsole(com.kyj.fx.voeditor.visual.component.console.ReadOnlyConsole) Scene(javafx.scene.Scene) DockTabPane(com.kyj.fx.voeditor.visual.component.dock.tab.DockTabPane) DesignerFxComposite(com.kyj.fx.voeditor.visual.component.pmd.DesignerFxComposite) BigTextView(com.kyj.fx.voeditor.visual.component.popup.BigTextView) JavaProcessMonitor(com.kyj.fx.voeditor.visual.component.bci.view.JavaProcessMonitor) MouseEvent(javafx.scene.input.MouseEvent) WebViewConsole(com.kyj.fx.voeditor.visual.component.console.WebViewConsole) FileWrapper(com.kyj.fx.voeditor.visual.component.FileWrapper) ProgramSpecUtil(com.kyj.fx.voeditor.visual.words.spec.auto.msword.util.ProgramSpecUtil) JavaTextView(com.kyj.fx.voeditor.visual.component.popup.JavaTextView) Tooltip(javafx.scene.control.Tooltip) GargoyleException(com.kyj.fx.voeditor.visual.exceptions.GargoyleException) KeyCode(javafx.scene.input.KeyCode) WebView(javafx.scene.web.WebView) ObjectProperty(javafx.beans.property.ObjectProperty) Logger(org.slf4j.Logger) CaptureScreenComposite(com.kyj.fx.voeditor.visual.component.capture.CaptureScreenComposite) ProxyServerComposite(com.kyj.fx.voeditor.visual.component.proxy.ProxyServerComposite) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) FileInputStream(java.io.FileInputStream) ProjectFileTreeItemCreator(com.kyj.fx.voeditor.visual.component.ProjectFileTreeItemCreator) ActionEvent(javafx.event.ActionEvent) SystemConsole(com.kyj.fx.voeditor.visual.component.console.SystemConsole) Stage(javafx.stage.Stage) Closeable(java.io.Closeable) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) InputStream(java.io.InputStream) SharedMemory(com.kyj.fx.voeditor.visual.momory.SharedMemory) GagoyleWorkspaceOpenResourceView(com.kyj.fx.voeditor.visual.component.popup.GagoyleWorkspaceOpenResourceView) ActionEvent(javafx.event.ActionEvent) FileWrapper(com.kyj.fx.voeditor.visual.component.FileWrapper) File(java.io.File) IOException(java.io.IOException) GargoyleException(com.kyj.fx.voeditor.visual.exceptions.GargoyleException)

Aggregations

ActionEvent (javafx.event.ActionEvent)37 List (java.util.List)11 Label (javafx.scene.control.Label)11 ObservableList (javafx.collections.ObservableList)10 FxUtil (com.kyj.fx.voeditor.visual.util.FxUtil)9 ArrayList (java.util.ArrayList)9 Optional (java.util.Optional)9 Button (javafx.scene.control.Button)9 MenuItem (javafx.scene.control.MenuItem)9 Stage (javafx.stage.Stage)9 ResourceLoader (com.kyj.fx.voeditor.visual.momory.ResourceLoader)8 DialogUtil (com.kyj.fx.voeditor.visual.util.DialogUtil)8 ValueUtil (com.kyj.fx.voeditor.visual.util.ValueUtil)8 File (java.io.File)8 MouseEvent (javafx.scene.input.MouseEvent)8 Pair (javafx.util.Pair)8 Logger (org.slf4j.Logger)8 ConfigResourceLoader (com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader)7 Iterator (java.util.Iterator)7 FXCollections (javafx.collections.FXCollections)7