use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class Main method start.
// public Main() {
//
//
// }
@Override
public void start(Stage primaryStage) throws IOException {
// 초기화 처리
callInitializers();
// setApplicationUncaughtExceptionHandler();
// 어플리케이션 타이틀 지정
primaryStage.setTitle(APPLICATION_TITLE);
// 화면 중앙 위치.
primaryStage.centerOnScreen();
// 메인 스테이지 클로즈 이벤트 구현.
primaryStage.setOnCloseRequest(onPrimaryStageCloseRequest);
/* [시작 ]초기 워크스페이스 선택 지정. */
String baseDir = ResourceLoader.getInstance().get(ResourceLoader.BASE_DIR);
if (baseDir == null || baseDir.isEmpty() || !new File(baseDir).exists()) {
SelectWorkspaceView selectWorkspaceView = new SelectWorkspaceView();
@SuppressWarnings("rawtypes") ResultDialog show = selectWorkspaceView.showAndWait();
if (ResultDialog.CANCEL == show.getStatus()) {
Platform.exit();
return;
}
}
try {
// 예상치 못한 에외에 대한 대비 로직구현.
setApplicationUncaughtExceptionHandler();
// 클래스 로딩같은 어플리케이션이 메모리에 로딩됨과 동기에 무거운 처리를 비동기로 로딩하는 로직이 구현되있음.
SharedMemory.init();
// PrimaryStage를 공유변수로 지정하기 위한 로직 처리.
SharedMemory.setPrimaryStage(primaryStage);
// Main Application을 로드
BorderPane mainParent = setNewRootView();
Scene scene = new Scene(mainParent, 1280, 900);
// SkinManager.getInstance().resetSkin();
scene.getStylesheets().add(SkinManager.getInstance().getSkin());
scene.getStylesheets().add(SkinManager.getInstance().getButtonSkin());
primaryStage.setScene(scene);
primaryStage.show();
} catch (Exception e) {
LOGGER.error(ValueUtil.toString(e));
}
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class Main method loadMainLayout.
/********************************
* 작성일 : 2016. 7. 26. 작성자 : KYJ
*
* Appliucation 메인로직.
*
* @return
* @throws IOException
********************************/
BorderPane loadMainLayout() throws IOException {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(Main.class.getResource("layout/SystemLayoutView.fxml"));
BorderPane borderpane = loader.load();
return borderpane;
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class DAOLoaderController method menuHistoryOnAction.
/**
* 히스토리 이력을 살펴보는경우 사용
*
* @작성자 : KYJ
* @작성일 : 2015. 11. 6.
* @param event
*/
public void menuHistoryOnAction(ActionEvent event) {
Map<String, Object> selectedItem = tbSrchDao.getSelectionModel().getSelectedItem();
if (selectedItem == null)
return;
String packageName = ValueUtil.emptyThan(selectedItem.get("PACKAGE_NAME"), "").toString();
String className = ValueUtil.emptyThan(selectedItem.get("CLASS_NAME"), "").toString();
// Stage primaryStage = SharedMemory.getPrimaryStage();
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("packageName", packageName);
paramMap.put("className", className);
try {
List<TbmSysDaoMethodsHDVO> select = listHistoryItems(paramMap);
CommonsBaseGridView<TbmSysDaoMethodsHDVO> commonsBaseGridView = new CommonsBaseGridView<>(TbmSysDaoMethodsHDVO.class, select);
TableViewSelectionModel<TbmSysDaoMethodsHDVO> selectionModel = commonsBaseGridView.getSelectionModel();
selectionModel.setSelectionMode(SelectionMode.MULTIPLE);
BorderPane borderPane = new BorderPane();
Label value = new Label("History");
value.setStyle("-fx-font-size:75px");
borderPane.setTop(value);
SqlKeywords sqlKeyword = new SqlKeywords();
borderPane.setBottom(sqlKeyword);
SplitPane splitPane = new SplitPane(commonsBaseGridView, sqlKeyword);
splitPane.setOrientation(Orientation.VERTICAL);
borderPane.setCenter(splitPane);
commonsBaseGridView.setOnMouseClicked(ev -> {
if (ev.getClickCount() == 2) {
try {
TbmSysDaoMethodsHDVO selectedItem2 = commonsBaseGridView.getSelectionModel().getSelectedItem();
String histTsp = selectedItem2.getHistTsp();
String sqlBody = getSqlBody(histTsp);
sqlKeyword.setContent(sqlBody);
} catch (Exception e) {
LOGGER.error(ValueUtil.toString(e));
}
}
});
MenuItem compare = new MenuItem("Compare.");
compare.setDisable(true);
compare.setOnAction(ev -> {
ObservableList<TbmSysDaoMethodsHDVO> selectedItems = commonsBaseGridView.getSelectionModel().getSelectedItems();
if (selectedItems.size() == 2) {
compare(selectedItems.get(0), selectedItems.get(1));
}
});
ContextMenu historyContextMenu = new ContextMenu(compare);
historyContextMenu.setOnShowing(ev -> {
if (selectionModel.getSelectedItems().size() == 2) {
compare.setDisable(false);
} else {
compare.setDisable(true);
}
});
commonsBaseGridView.setContextMenu(historyContextMenu);
Scene scene = new Scene(borderPane);
Stage stage = new Stage();
stage.initOwner(SharedMemory.getPrimaryStage());
stage.setScene(scene);
stage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class SystemLayoutViewController method lblSystemConsoleOnMouseClick.
@FXML
public void lblSystemConsoleOnMouseClick(MouseEvent e) {
if (systemConsoleProperty.get() != null)
return;
ReadOnlyConsole console = null;
try {
console = SystemConsole.getInstance();
console.init();
systemConsoleProperty.set(console);
Stage stage = new Stage();
BorderPane root = new BorderPane(console);
Scene scene = new Scene(root, 700, 300);
scene.getStylesheets().add(SkinManager.getInstance().getSkin());
stage.setScene(scene);
double x = SharedMemory.getPrimaryStage().getX();
double y = SharedMemory.getPrimaryStage().getY();
stage.setTitle("System Console");
stage.setX(x);
stage.setY(y);
stage.setAlwaysOnTop(false);
stage.initOwner(SharedMemory.getPrimaryStage());
stage.centerOnScreen();
stage.setOnCloseRequest(ev -> {
systemConsoleProperty.set(null);
try {
SystemConsole.getInstance().close();
} catch (Exception e1) {
e1.printStackTrace();
}
});
stage.show();
} catch (Exception ex) {
DialogUtil.showExceptionDailog(ex);
LOGGER.error(ValueUtil.toString(ex));
}
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class SystemLayoutViewController method lblSVNOnAction.
@FXML
public void lblSVNOnAction(ActionEvent e) {
try {
Scene scene = new Scene(new BorderPane(new SVNViewer()), 1100, 900);
scene.getStylesheets().add(SkinManager.getInstance().getSkin());
FxUtil.createStageAndShow(scene, stage -> {
stage.setTitle("SVN");
stage.initOwner(SharedMemory.getPrimaryStage());
stage.setAlwaysOnTop(false);
stage.centerOnScreen();
});
// Stage stage = new Stage();
// Scene scene = new Scene(new BorderPane(new SVNViewer()), 1100,
// 900);
//
//
// scene.getStylesheets().add(SkinManager.getInstance().getSkin());
// stage.setScene(scene);
// stage.initOwner(SharedMemory.getPrimaryStage());
//
// stage.setTitle("SVN");
// stage.setAlwaysOnTop(false);
// stage.centerOnScreen();
// stage.show();
} catch (Exception ex) {
LOGGER.error(ValueUtil.toString(ex));
DialogUtil.showExceptionDailog(ex);
}
}
Aggregations