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));
}
}
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));
}
}
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();
}
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));
}
}
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);
}
});
}
Aggregations