use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class Main method start.
@Override
public void start(Stage primaryStage) {
try {
BorderPane root = new BorderPane();
Scene scene = new Scene(root, 400, 400);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class SqlMultiplePane method addNewTabResult.
/********************************
* 작성일 : 2016. 4. 20. 작성자 : KYJ
*
*
* @return
********************************/
private Tab addNewTabResult() {
TableView<Map<String, Object>> tbResult = new TableView<>();
// Cell 단위로 선택
tbResult.getSelectionModel().setCellSelectionEnabled(true);
tbResult.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
tbResult.getItems().addListener((ListChangeListener<Map<String, Object>>) arg0 -> {
int size = arg0.getList().size();
lblStatus.textProperty().set(size + " row");
});
tbResult.setOnKeyPressed(this::tbResultOnKeyClick);
{
tcSelectRow = new TableColumn<>("↓");
tcSelectRow.setMaxWidth(20);
tcSelectRow.setSortable(false);
tcSelectRow.setCellFactory(cell -> {
return new DragSelectionCell(tbResult);
});
// Table Select Drag 처리
endRowIndexProperty.addListener(event -> tableSelectCell());
endColIndexProperty.addListener(event -> tableSelectCell());
}
BorderPane tbResultLayout = new BorderPane(tbResult);
lblStatus = new Label("Ready...");
lblStatus.setMaxHeight(50d);
tbResultLayout.setBottom(lblStatus);
createResultTableContextMenu(tbResult);
Tab tab = new Tab("Example", tbResultLayout);
return tab;
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class SqlMultiplePane method getSelectedTbResult.
/********************************
* 작성일 : 2016. 4. 20. 작성자 : KYJ
*
* 선택된 테이블 탭을 리턴함. 없는경우 null을 리턴
*
* @return
********************************/
@SuppressWarnings("unchecked")
private TableView<Map<String, Object>> getSelectedTbResult() {
Tab selectedItem = getSelectedTab();
selectedItem = (Tab) ValueUtil.decode(selectedItem, selectedItem, addNewTabResult());
BorderPane borderPane = (BorderPane) selectedItem.getContent();
TableView<Map<String, Object>> content = (TableView<Map<String, Object>>) borderPane.getCenter();
return content;
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class GagoyleSpreadSheetView method init.
public void init() {
BorderPane root = new BorderPane();
status = new Label();
root.setCenter(ssv);
root.setBottom(status);
getChildren().add(root);
this.addEventFilter(MouseEvent.ANY, event -> {
status.textProperty().set(String.format(" x: %s y : %s", event.getX(), event.getY()));
});
this.addEventHandler(KeyEvent.KEY_PRESSED, this::spreadSheetKeyPress);
// {
// Node node = new ImageView(new Image(GagoyleSpreadSheetView.class.getResourceAsStream("testImage.jpg"), 500, 500, false, false));
// new DragDropWrapping(this, node);
// getChildren().add(node);
// }
// {
// Node node = new ImageView(new Image(GagoyleSpreadSheetView.class.getResourceAsStream("testImage.jpg"), 500, 500, false, false));
// new DragDropWrapping(this, node);
// getChildren().add(node);
// }
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class DialogUtil method open.
/**
* 특정 location에 위치한 fxml파일을 팝업형태로 로드한다.
*
* @Date 2015. 10. 15.
* @param packageLocation
* @param fxmlName
* @param width
* @param height
* @param modal
* @throws IOException
* @User KYJ
*/
public static void open(Class<?> packageLocation, String fxmlName, int width, int height, boolean modal) throws IOException {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(packageLocation.getResource(fxmlName));
Parent parent = loader.load();
BorderPane borderPane = new BorderPane(parent);
Stage stage = new Stage();
Scene scene = new Scene(borderPane, width, height);
stage.setScene(scene);
if (modal)
stage.initModality(Modality.WINDOW_MODAL);
stage.setAlwaysOnTop(true);
stage.initOwner(SharedMemory.getPrimaryStage());
stage.show();
// stage.setScene(borderPane, 800, 500);
}
Aggregations