Search in sources :

Example 96 with FXMLLoader

use of javafx.fxml.FXMLLoader in project Gargoyle by callakrsos.

the class SVNTreeView method menuPropertiesOnAction.

/**
	 * @작성자 : KYJ
	 * @작성일 : 2016. 8. 8.
	 * @param e
	 * @throws IOException
	 */
public void menuPropertiesOnAction(ActionEvent e) {
    TreeItem<SVNItem> selectedItem = getSelectionModel().getSelectedItem();
    try {
        if (selectedItem != null) {
            SVNItem value = selectedItem.getValue();
            Properties properties = value.getManager().getProperties();
            FXMLLoader fxmlLoader = new FXMLLoader(SVNTreeView.class.getResource("AddNewSVNRepositoryView.fxml"));
            BorderPane n = fxmlLoader.load();
            Stage window = (Stage) getParent().getScene().getWindow();
            Stage parent = (Stage) com.kyj.fx.voeditor.visual.util.ValueUtil.decode(window, window, SharedMemory.getPrimaryStage());
            Stage stage = new Stage();
            AddNewSVNRepositoryController controller = fxmlLoader.getController();
            controller.setStage(stage);
            controller.setProperties(properties);
            stage.setScene(new Scene(n));
            stage.setResizable(false);
            stage.initOwner(parent);
            stage.setTitle("Modify Location.");
            stage.centerOnScreen();
            stage.showAndWait();
            Properties result = controller.getResult();
            if (result != null) {
                SVNItem newSVNItem = new SVNRepository(new JavaSVNManager(result));
                TreeItem<SVNItem> createNode = scmTreeMaker.createNode(newSVNItem, null);
                getRoot().getChildren().remove(selectedItem);
                getRoot().getChildren().add(createNode);
            }
        }
    } catch (Exception ex) {
        LOGGER.error(ValueUtil.toString(ex));
    }
}
Also used : JavaSVNManager(com.kyj.scm.manager.svn.java.JavaSVNManager) BorderPane(javafx.scene.layout.BorderPane) Stage(javafx.stage.Stage) Properties(java.util.Properties) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader) SVNException(org.tmatesoft.svn.core.SVNException) IOException(java.io.IOException)

Example 97 with FXMLLoader

use of javafx.fxml.FXMLLoader in project Gargoyle by callakrsos.

the class SVNTreeView method menuAddNewLocationOnAction.

/**
	 * 새로운 레포지토리를 추가한다.
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2016. 4. 3.
	 * @param e
	 */
public void menuAddNewLocationOnAction(ActionEvent e) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(SVNTreeView.class.getResource("AddNewSVNRepositoryView.fxml"));
        BorderPane n = fxmlLoader.load();
        Stage window = (Stage) getParent().getScene().getWindow();
        Stage parent = (Stage) com.kyj.fx.voeditor.visual.util.ValueUtil.decode(window, window, SharedMemory.getPrimaryStage());
        Stage stage = new Stage();
        AddNewSVNRepositoryController controller = fxmlLoader.getController();
        controller.setStage(stage);
        stage.setScene(new Scene(n));
        stage.setResizable(false);
        stage.initOwner(parent);
        stage.setTitle("Add New Location.");
        stage.centerOnScreen();
        stage.showAndWait();
        Properties result = controller.getResult();
        if (result != null) {
            SVNItem newSVNItem = new SVNRepository(new JavaSVNManager(result));
            TreeItem<SVNItem> createNode = scmTreeMaker.createNode(newSVNItem, null);
            getRoot().getChildren().add(createNode);
        }
    } catch (IOException e1) {
        LOGGER.error(ValueUtil.toString(e1));
    }
}
Also used : JavaSVNManager(com.kyj.scm.manager.svn.java.JavaSVNManager) BorderPane(javafx.scene.layout.BorderPane) Stage(javafx.stage.Stage) IOException(java.io.IOException) Scene(javafx.scene.Scene) Properties(java.util.Properties) FXMLLoader(javafx.fxml.FXMLLoader)

Example 98 with FXMLLoader

use of javafx.fxml.FXMLLoader in project Gargoyle by callakrsos.

the class TableInformationFrameView method loader.

/**
	 * TableInformationFrameView.class 패키지에 속한 FXML 로더
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2015. 12. 31.
	 * @param fxml
	 * @return
	 * @throws IOException
	 */
private <T> T loader(String fxml) throws IOException {
    FXMLLoader loader = new FXMLLoader();
    loader.setLocation(TableInformationFrameView.class.getResource(fxml));
    return loader.load();
}
Also used : FXMLLoader(javafx.fxml.FXMLLoader)

Example 99 with FXMLLoader

use of javafx.fxml.FXMLLoader in project Gargoyle by callakrsos.

the class DaoWizardViewController method menuToVoEditorOnAction.

/********************************
	 * 작성일 : 2016. 2. 27. 작성자 : KYJ
	 *
	 * 내용 : VO에티터로 결과내용을 전달처리한다.
	 *******************************/
public void menuToVoEditorOnAction(ActionEvent e) {
    ObservableList<TbpSysDaoColumnsDVO> items = tbMappings.getItems();
    if (items.isEmpty())
        return;
    DatabaseTypeMappingFunction typeConverter = new DatabaseTypeMappingFunction();
    try {
        FXMLLoader loader = FxUtil.createNewFxmlLoader();
        loader.setLocation(getClass().getResource("VoEditorView.fxml"));
        BorderPane root = loader.load();
        VoEditorController controller = loader.getController();
        List<TableModelDVO> resultItems = items.stream().map(m -> {
            TableModelDVO dvo = new TableModelDVO();
            dvo.setName(ValueUtil.getPrefixLowerTextMyEdit(m.getColumnName()));
            String programType = m.getProgramType();
            if (programType == null || programType.isEmpty()) {
                programType = typeConverter.apply(m.getColumnType());
            }
            dvo.setType(programType);
            return dvo;
        }).collect(Collectors.toList());
        controller.addItem(resultItems);
        SharedMemory.getSystemLayoutViewController().loadNewSystemTab("New VO", root);
    } catch (IOException e1) {
        LOGGER.error(ValueUtil.toString(e1));
    }
}
Also used : SimpleSQLResultView(com.kyj.fx.voeditor.visual.component.popup.SimpleSQLResultView) Arrays(java.util.Arrays) Menus(com.kyj.fx.voeditor.visual.component.Menus) DbUtil(com.kyj.fx.voeditor.visual.util.DbUtil) NumberingCellValueFactory(com.kyj.fx.voeditor.visual.component.NumberingCellValueFactory) LoggerFactory(org.slf4j.LoggerFactory) NullExpresion(com.kyj.fx.voeditor.visual.util.NullExpresion) MeerketAbstractVoOpenClassResourceView(com.kyj.fx.voeditor.visual.component.popup.MeerketAbstractVoOpenClassResourceView) ReadOnlyObjectWrapper(javafx.beans.property.ReadOnlyObjectWrapper) ContextMenu(javafx.scene.control.ContextMenu) Map(java.util.Map) FileUtil(com.kyj.fx.voeditor.visual.util.FileUtil) TableView(javafx.scene.control.TableView) TbpSysDaoColumnsDVO(kyj.Fx.dao.wizard.core.model.vo.TbpSysDaoColumnsDVO) Path(java.nio.file.Path) EditorUtil(com.kyj.fx.voeditor.util.EditorUtil) DatabaseTypeMappingFunction(com.kyj.fx.voeditor.visual.functions.DatabaseTypeMappingFunction) ClassTypeResourceLoader(com.kyj.fx.voeditor.visual.momory.ClassTypeResourceLoader) TableMasterDVO(kyj.Fx.dao.wizard.core.model.vo.TableMasterDVO) SqlKeywords(com.kyj.fx.voeditor.visual.component.text.SqlKeywords) TextField(javafx.scene.control.TextField) Pair(javafx.util.Pair) MenuItem(javafx.scene.control.MenuItem) QuerygenUtil(kyj.Fx.dao.wizard.core.util.QuerygenUtil) TbpSysDaoMethodsDVO(kyj.Fx.dao.wizard.core.model.vo.TbpSysDaoMethodsDVO) Set(java.util.Set) KeyEvent(javafx.scene.input.KeyEvent) DatabaseTableView(com.kyj.fx.voeditor.visual.component.popup.DatabaseTableView) FxDAOReadFunction(com.kyj.fx.voeditor.visual.functions.FxDAOReadFunction) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) TableDVO(kyj.Fx.dao.wizard.core.model.vo.TableDVO) Collectors(java.util.stream.Collectors) FXML(javafx.fxml.FXML) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) List(java.util.List) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) Stream(java.util.stream.Stream) Optional(java.util.Optional) ChoiceBoxTableCell(javafx.scene.control.cell.ChoiceBoxTableCell) DateUtil(com.kyj.fx.voeditor.visual.util.DateUtil) CommonsContextMenu(com.kyj.fx.voeditor.visual.component.CommonsContextMenu) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) BaseOpenClassResourceView(com.kyj.fx.voeditor.visual.component.popup.BaseOpenClassResourceView) TextArea(javafx.scene.control.TextArea) MouseEvent(javafx.scene.input.MouseEvent) CommonContextMenuEvent(com.kyj.fx.voeditor.visual.events.CommonContextMenuEvent) FXCollections(javafx.collections.FXCollections) HashMap(java.util.HashMap) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) Function(java.util.function.Function) TbmSysDaoDVO(kyj.Fx.dao.wizard.core.model.vo.TbmSysDaoDVO) TableColumn(javafx.scene.control.TableColumn) Wizardtype(com.kyj.fx.voeditor.visual.framework.daowizard.GargoyleDaoWizardFactory.Wizardtype) FXMLLoader(javafx.fxml.FXMLLoader) FxCollectors(com.kyj.fx.voeditor.visual.util.FxCollectors) JavaTextView(com.kyj.fx.voeditor.visual.component.popup.JavaTextView) DaoWizard(kyj.Fx.dao.wizard.DaoWizard) LinkedHashSet(java.util.LinkedHashSet) ClassMeta(com.kyj.fx.voeditor.core.model.meta.ClassMeta) FxDAOSaveFunction(com.kyj.fx.voeditor.visual.functions.FxDAOSaveFunction) ObjectProperty(javafx.beans.property.ObjectProperty) Logger(org.slf4j.Logger) DaoWizardConverter(com.kyj.fx.voeditor.visual.util.DaoWizardConverter) Label(javafx.scene.control.Label) Iterator(java.util.Iterator) FieldMeta(com.kyj.fx.voeditor.core.model.meta.FieldMeta) DatabaseTypeMappingResourceLoader(kyj.Fx.dao.wizard.memory.DatabaseTypeMappingResourceLoader) IOException(java.io.IOException) LockImagedYnColumn(com.kyj.fx.voeditor.visual.component.LockImagedYnColumn) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) TbpSysDaoFieldsDVO(kyj.Fx.dao.wizard.core.model.vo.TbpSysDaoFieldsDVO) StringConverter(javafx.util.StringConverter) File(java.io.File) ActionEvent(javafx.event.ActionEvent) SelectionMode(javafx.scene.control.SelectionMode) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) TableModelDVO(kyj.Fx.dao.wizard.core.model.vo.TableModelDVO) ResultDialog(com.kyj.fx.voeditor.visual.component.ResultDialog) Collections(java.util.Collections) SharedMemory(com.kyj.fx.voeditor.visual.momory.SharedMemory) BorderPane(javafx.scene.layout.BorderPane) TableModelDVO(kyj.Fx.dao.wizard.core.model.vo.TableModelDVO) IOException(java.io.IOException) TbpSysDaoColumnsDVO(kyj.Fx.dao.wizard.core.model.vo.TbpSysDaoColumnsDVO) FXMLLoader(javafx.fxml.FXMLLoader) DatabaseTypeMappingFunction(com.kyj.fx.voeditor.visual.functions.DatabaseTypeMappingFunction)

Example 100 with FXMLLoader

use of javafx.fxml.FXMLLoader in project Gargoyle by callakrsos.

the class SystemLayoutViewController method loadNewSystemTab.

/**
	 * 탭에 대해 로드함.
	 *
	 * @작성자 : KYJ
	 * @작성일 : 2015. 11. 4.
	 * @param tabName
	 * @param fxmlName
	 */
@Override
public void loadNewSystemTab(String tabName, String fxmlName) {
    Platform.runLater(() -> {
        try {
            FXMLLoader loader = FxUtil.createNewFxmlLoader();
            loader.setLocation(getClass().getResource(fxmlName));
            Parent parent = loader.load();
            if (beforeParentLoad != null && beforeParentLoad.filter(parent)) {
                beforeParentLoad.beforeLoad(parent);
                if (beforeParentLoad.isUnloadParent()) {
                    return;
                }
            }
            DockTab tab = new DockTab(tabName, parent);
            // 툴팁 처리 (클래스위치)
            tab.setTooltip(new Tooltip(loader.getController().getClass().getName()));
            addTabItem(tab);
            tab.getTabPane().getSelectionModel().select(tab);
            // 리스너 호출.
            onParentloaded.forEach(v -> {
                v.onLoad(parent);
            });
        } catch (IOException e1) {
            DialogUtil.showExceptionDailog(e1);
        }
    });
}
Also used : DockTab(com.kyj.fx.voeditor.visual.component.dock.tab.DockTab) Parent(javafx.scene.Parent) Tooltip(javafx.scene.control.Tooltip) IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader)

Aggregations

FXMLLoader (javafx.fxml.FXMLLoader)113 IOException (java.io.IOException)67 Scene (javafx.scene.Scene)37 Parent (javafx.scene.Parent)33 Stage (javafx.stage.Stage)28 URL (java.net.URL)24 FXML (javafx.fxml.FXML)24 Pane (javafx.scene.layout.Pane)24 ActionEvent (javafx.event.ActionEvent)18 AnchorPane (javafx.scene.layout.AnchorPane)18 ResourceBundle (java.util.ResourceBundle)16 BorderPane (javafx.scene.layout.BorderPane)16 Initializable (javafx.fxml.Initializable)14 JFXButton (com.jfoenix.controls.JFXButton)13 StackPane (javafx.scene.layout.StackPane)13 KeyFrame (javafx.animation.KeyFrame)12 Timeline (javafx.animation.Timeline)12 Duration (javafx.util.Duration)12 Level (java.util.logging.Level)11 Logger (java.util.logging.Logger)11