Search in sources :

Example 16 with BorderPane

use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.

the class TilesMainLayoutApp method start.

@Override
public void start(Stage primaryStage) throws Exception {
    FXMLLoader loader = new FXMLLoader();
    loader.setLocation(TilesMainLayoutApp.class.getResource("TilesMainLayoutApp.fxml"));
    BorderPane root = loader.load();
    Scene sc = new Scene(root);
    root.getStylesheets().add(getClass().getResource("TilesMainLayoutApp.css").toExternalForm());
    primaryStage.setScene(sc);
    primaryStage.show();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader)

Example 17 with BorderPane

use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.

the class SimpleSQLResultViewExam method start.

@Override
public void start(Stage primaryStage) throws Exception {
    try {
        SharedMemory.setPrimaryStage(primaryStage);
        BorderPane mainParent = new BorderPane();
        Scene scene = new Scene(mainParent, 1280, 900);
        primaryStage.setScene(scene);
        HashMap<String, Object> param = new HashMap<String, Object>();
        param.put("userId", new String[] { "kyjun.kim", "zz" });
        String sql = "SELECT * FROM sos.tbm_sm_user WHERE 1=1 " + " #if($userId) " + " AND  USER_ID = :userId " + " #end ";
        SimpleSQLResultView simpleSQLResultView = new SimpleSQLResultView(sql, param);
        simpleSQLResultView.show();
        primaryStage.show();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HashMap(java.util.HashMap) SimpleSQLResultView(com.kyj.fx.voeditor.visual.component.popup.SimpleSQLResultView) Scene(javafx.scene.Scene)

Example 18 with BorderPane

use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.

the class SpecExample method start.

@Override
public void start(Stage primaryStage) throws Exception {
    String projectDir = System.getProperty("user.dir");
    File file = new File(projectDir, "src/main/java/com/kyj/fx/voeditor/visual/example/SpecExample.java");
    SpecResource specResource = new SpecResource(new File(projectDir), file);
    SpecTabPane center = new SpecTabPane(specResource);
    Button btnCapture = new Button("SnapShot");
    ImageView ivOrigin = new ImageView();
    btnCapture.setOnAction(ev -> {
        FxUtil.snapShot(center, new File("example.png"));
        FxUtil.printJob(primaryStage, center);
    });
    Text text1 = new Text("Big italic red text");
    text1.setFill(Color.RED);
    text1.setFont(Font.font("Helvetica", FontPosture.ITALIC, 40));
    Text text2 = new Text(" little bold blue text");
    text2.setFill(Color.BLUE);
    text2.setFont(Font.font("Helvetica", FontWeight.BOLD, 10));
    TextFlow textFlow = new TextFlow(text1, text2);
    BorderPane root = new BorderPane(center);
    root.setTop(new HBox(textFlow, btnCapture));
    root.setBottom(ivOrigin);
    root.setPrefSize(800, 600);
    Scene value = new Scene(root, 800, 600);
    primaryStage.setScene(value);
    primaryStage.show();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HBox(javafx.scene.layout.HBox) SpecResource(com.kyj.fx.voeditor.visual.words.spec.auto.msword.ui.model.SpecResource) SpecTabPane(com.kyj.fx.voeditor.visual.words.spec.auto.msword.ui.tabs.SpecTabPane) Button(javafx.scene.control.Button) Text(javafx.scene.text.Text) TextFlow(javafx.scene.text.TextFlow) ImageView(javafx.scene.image.ImageView) Scene(javafx.scene.Scene) File(java.io.File)

Example 19 with BorderPane

use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.

the class WebViewExam method start.

/***********************************************************************************/
/* 이벤트 구현 */
@Override
public void start(Stage primaryStage) throws Exception {
    WebView view = new WebView();
    WebEngine engine = view.getEngine();
    engine.setJavaScriptEnabled(true);
    engine.setCreatePopupHandler(new Callback<PopupFeatures, WebEngine>() {

        @Override
        public WebEngine call(PopupFeatures p) {
            Stage stage = new Stage(StageStyle.UTILITY);
            WebView wv2 = new WebView();
            VBox vBox = new VBox(5);
            vBox.getChildren().add(wv2);
            vBox.getChildren().add(new Button("업로딩"));
            wv2.getEngine().setJavaScriptEnabled(true);
            stage.setScene(new Scene(vBox));
            stage.show();
            return wv2.getEngine();
        }
    });
    engine.getLoadWorker().stateProperty().addListener(new ChangeListener<State>() {

        @Override
        public void changed(ObservableValue ov, State oldState, State newState) {
            if (newState == Worker.State.SUCCEEDED) {
                primaryStage.setTitle(engine.getLocation());
            }
        }
    });
    engine.setConfirmHandler(new Callback<String, Boolean>() {

        @Override
        public Boolean call(String param) {
            System.out.println("confirm handler : " + param);
            return true;
        }
    });
    engine.setOnAlert((WebEvent<String> wEvent) -> {
        System.out.println("Alert Event  -  Message:  " + wEvent.getData());
    });
    engine.load("http://localhost:15501/MemoWebapp/SmartEditor2.html");
    primaryStage.setScene(new Scene(new BorderPane(view), 1200, 700));
    primaryStage.show();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) PopupFeatures(javafx.scene.web.PopupFeatures) ObservableValue(javafx.beans.value.ObservableValue) Scene(javafx.scene.Scene) WebEngine(javafx.scene.web.WebEngine) Button(javafx.scene.control.Button) State(javafx.concurrent.Worker.State) Stage(javafx.stage.Stage) WebView(javafx.scene.web.WebView) WebEvent(javafx.scene.web.WebEvent) VBox(javafx.scene.layout.VBox)

Example 20 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)

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