use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class DesignerFx method createXPathQueryPanel.
private BorderPane createXPathQueryPanel() {
BorderPane borderPane = new BorderPane();
// JPanel p = new JPanel();
// p.setLayout(new BorderLayout());
// xpathQueryArea.setBorder(BorderFactory.createLineBorder(Color.black));
// makeTextComponentUndoable(xpathQueryArea);
// ScrollPane scrollPane = new ScrollPane(xpathQueryArea);
// scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
// scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
final Button b = createGoButton();
BorderPane topBorderPane = new BorderPane();
// JPanel topPanel = new JPanel();
// topPanel.setLayout(new BorderLayout());
Label value = new Label("XPath Query (if any):");
// value.setPrefSize(Label.USE_COMPUTED_SIZE, Double.MAX_VALUE);
value.setAlignment(Pos.CENTER_LEFT);
HBox value2 = new HBox(5, value);
value2.setPadding(new Insets(5, 5, 5, 5));
topBorderPane.setLeft(value2);
// topPanel.add(new JLabel("XPath Query (if any):"), BorderLayout.WEST);
// topPanel.add(createXPathVersionPanel(), BorderLayout.EAST);
topBorderPane.setRight(createXPathVersionPanel());
borderPane.setBottom(b);
// SwingNode scrollPaneFx = new SwingNode();
// createSwingContent(scrollPaneFx, scrollPane);
borderPane.setCenter(xpathQueryArea);
// p.add(topPanel, BorderLayout.NORTH);
// p.add(scrollPane, BorderLayout.CENTER);
borderPane.setTop(topBorderPane);
// createSwingContent(swingNode, p);
return borderPane;
}
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);
// }
}
Aggregations