Search in sources :

Example 21 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 22 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 23 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 24 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)

Example 25 with BorderPane

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);
}
Also used : BorderPane(javafx.scene.layout.BorderPane) Parent(javafx.scene.Parent) Stage(javafx.stage.Stage) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader)

Aggregations

BorderPane (javafx.scene.layout.BorderPane)93 Scene (javafx.scene.Scene)56 Button (javafx.scene.control.Button)19 Label (javafx.scene.control.Label)16 FXMLLoader (javafx.fxml.FXMLLoader)14 Stage (javafx.stage.Stage)13 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 HashMap (java.util.HashMap)8 TableView (javafx.scene.control.TableView)8 HBox (javafx.scene.layout.HBox)8 Insets (javafx.geometry.Insets)7 TextField (javafx.scene.control.TextField)7 Map (java.util.Map)6 MenuItem (javafx.scene.control.MenuItem)6 TableColumn (javafx.scene.control.TableColumn)6 FXML (javafx.fxml.FXML)5