Search in sources :

Example 31 with BorderPane

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;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HBox(jfxtras.scene.layout.HBox) Insets(javafx.geometry.Insets) RadioButton(javafx.scene.control.RadioButton) Button(javafx.scene.control.Button) Label(javafx.scene.control.Label) JLabel(javax.swing.JLabel)

Example 32 with 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();
    }
}
Also used : BorderPane(javafx.scene.layout.BorderPane) Scene(javafx.scene.Scene)

Example 33 with BorderPane

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;
}
Also used : Button(javafx.scene.control.Button) SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) CheckComboBox(org.controlsfx.control.CheckComboBox) Connection(java.sql.Connection) DbUtil(com.kyj.fx.voeditor.visual.util.DbUtil) LoggerFactory(org.slf4j.LoggerFactory) NullExpresion(com.kyj.fx.voeditor.visual.util.NullExpresion) ToExcelFileFunction(com.kyj.fx.voeditor.visual.functions.ToExcelFileFunction) Application(javafx.application.Application) TabPane(javafx.scene.control.TabPane) ListChangeListener(javafx.collections.ListChangeListener) EncrypUtil(com.kyj.fx.voeditor.visual.util.EncrypUtil) ContextMenu(javafx.scene.control.ContextMenu) Map(java.util.Map) SQLPaneMotionable(com.kyj.fx.voeditor.visual.component.sql.functions.SQLPaneMotionable) GargoyleExtensionFilters(com.kyj.fx.voeditor.visual.util.GargoyleExtensionFilters) SimpleIntegerProperty(javafx.beans.property.SimpleIntegerProperty) VariableMappingView(com.kyj.fx.voeditor.visual.component.popup.VariableMappingView) DockPos(com.kyj.fx.voeditor.visual.component.dock.pane.DockPos) DockPane(com.kyj.fx.voeditor.visual.component.dock.pane.DockPane) TableView(javafx.scene.control.TableView) SystemUtils(org.apache.commons.lang.SystemUtils) HBox(javafx.scene.layout.HBox) Pair(javafx.util.Pair) MenuItem(javafx.scene.control.MenuItem) KeyEvent(javafx.scene.input.KeyEvent) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) Collectors(java.util.stream.Collectors) TreeView(javafx.scene.control.TreeView) ISchemaTreeItem(com.kyj.fx.voeditor.visual.component.sql.functions.ISchemaTreeItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) List(java.util.List) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) SqlTab(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTab) RowMapper(org.springframework.jdbc.core.RowMapper) Optional(java.util.Optional) DateUtil(com.kyj.fx.voeditor.visual.util.DateUtil) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) TableViewSelectionModel(javafx.scene.control.TableView.TableViewSelectionModel) MouseButton(javafx.scene.input.MouseButton) TreeItem(javafx.scene.control.TreeItem) MouseEvent(javafx.scene.input.MouseEvent) FXCollections(javafx.collections.FXCollections) HashMap(java.util.HashMap) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) DockNode(com.kyj.fx.voeditor.visual.component.dock.pane.DockNode) GagoyleTabProxy(com.kyj.fx.voeditor.visual.main.layout.GagoyleTabProxy) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) Supplier(java.util.function.Supplier) IntegerProperty(javafx.beans.property.IntegerProperty) BigDataDVO(com.kyj.fx.voeditor.visual.framework.BigDataDVO) TableColumn(javafx.scene.control.TableColumn) Tooltip(javafx.scene.control.Tooltip) KeyCode(javafx.scene.input.KeyCode) Color(javafx.scene.paint.Color) Modality(javafx.stage.Modality) Logger(org.slf4j.Logger) Label(javafx.scene.control.Label) Iterator(java.util.Iterator) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) StringConverter(javafx.util.StringConverter) SchoolMgrerSpreadSheetView(com.kyj.fx.voeditor.visual.main.layout.SchoolMgrerSpreadSheetView) File(java.io.File) SqlTabPane(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTabPane) Menu(javafx.scene.control.Menu) Consumer(java.util.function.Consumer) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) ActionEvent(javafx.event.ActionEvent) SelectionMode(javafx.scene.control.SelectionMode) Stage(javafx.stage.Stage) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) Collections(java.util.Collections) SharedMemory(com.kyj.fx.voeditor.visual.momory.SharedMemory) BorderPane(javafx.scene.layout.BorderPane) SqlTab(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTab) Tab(javafx.scene.control.Tab) Label(javafx.scene.control.Label) Map(java.util.Map) HashMap(java.util.HashMap) TableColumn(javafx.scene.control.TableColumn) TableView(javafx.scene.control.TableView)

Example 34 with BorderPane

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;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) SqlTab(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTab) Tab(javafx.scene.control.Tab) Map(java.util.Map) HashMap(java.util.HashMap) TableView(javafx.scene.control.TableView)

Example 35 with BorderPane

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);
//		}
}
Also used : BorderPane(javafx.scene.layout.BorderPane) Label(javafx.scene.control.Label)

Aggregations

BorderPane (javafx.scene.layout.BorderPane)95 Scene (javafx.scene.Scene)58 Button (javafx.scene.control.Button)19 Label (javafx.scene.control.Label)17 FXMLLoader (javafx.fxml.FXMLLoader)14 Stage (javafx.stage.Stage)14 StackPane (javafx.scene.layout.StackPane)12 IOException (java.io.IOException)11 Parameter (aima.gui.fx.framework.Parameter)10 SimulationPaneBuilder (aima.gui.fx.framework.SimulationPaneBuilder)10 File (java.io.File)10 HBox (javafx.scene.layout.HBox)9 HashMap (java.util.HashMap)8 Insets (javafx.geometry.Insets)8 TextField (javafx.scene.control.TextField)8 Map (java.util.Map)6 MenuItem (javafx.scene.control.MenuItem)6 TableColumn (javafx.scene.control.TableColumn)6 TableView (javafx.scene.control.TableView)6 List (java.util.List)5