Search in sources :

Example 66 with FXMLLoader

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

the class FxUtil method createNewFxmlLoader.

/**
	 * @작성자 : KYJ
	 * @작성일 : 2016. 11. 28.
	 * @return
	 */
public static FXMLLoader createNewFxmlLoader() {
    FXMLLoader loader = new FXMLLoader();
    loader.setBuilderFactory(GargoyleBuilderFactory.getInstance());
    return loader;
}
Also used : FXMLLoader(javafx.fxml.FXMLLoader)

Example 67 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 68 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 69 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 70 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)

Aggregations

FXMLLoader (javafx.fxml.FXMLLoader)86 IOException (java.io.IOException)46 Scene (javafx.scene.Scene)30 Stage (javafx.stage.Stage)20 Parent (javafx.scene.Parent)19 BorderPane (javafx.scene.layout.BorderPane)16 Pane (javafx.scene.layout.Pane)13 StackPane (javafx.scene.layout.StackPane)13 URL (java.net.URL)12 FXML (javafx.fxml.FXML)10 ActionEvent (javafx.event.ActionEvent)8 List (java.util.List)7 File (java.io.File)6 Properties (java.util.Properties)6 ObservableList (javafx.collections.ObservableList)5 Node (javafx.scene.Node)5 JavaSVNManager (com.kyj.scm.manager.svn.java.JavaSVNManager)4 UncheckedIOException (java.io.UncheckedIOException)4 TextField (javafx.scene.control.TextField)4 MouseEvent (javafx.scene.input.MouseEvent)4