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();
}
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();
}
}
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();
}
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();
}
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;
}
Aggregations