Java Code Examples for javafx.scene.paint.Color#LIGHTBLUE
The following examples show how to use
javafx.scene.paint.Color#LIGHTBLUE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ModalDialogDemo.java From oim-fx with MIT License | 6 votes |
@Override public void start(final Stage primaryStage) { primaryStage.setTitle("Hello World"); ModalDialog md = new ModalDialog(primaryStage); Group root = new Group(); Scene scene = new Scene(root, 500, 450, Color.LIGHTBLUE); Button btn = new Button(); btn.setLayoutX(250); btn.setLayoutY(240); btn.setText("Show modal dialog"); btn.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { md.show(); } }); root.getChildren().add(btn); primaryStage.setScene(scene); primaryStage.show(); }
Example 2
Source File: ShowAccountDialogTest.java From oim-fx with MIT License | 6 votes |
@Override public void start(final Stage primaryStage) { primaryStage.setTitle("Hello World"); ShowAccountDialog md = new ShowAccountDialog(primaryStage); Group root = new Group(); Scene scene = new Scene(root, 500, 450, Color.LIGHTBLUE); Button btn = new Button(); btn.setLayoutX(250); btn.setLayoutY(240); btn.setText("Show modal dialog"); btn.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { md.show(); } }); root.getChildren().add(btn); primaryStage.setScene(scene); primaryStage.show(); }
Example 3
Source File: SpaceRangerFactory.java From FXGLGames with MIT License | 6 votes |
@Spawns("projectile") public Entity newProjectile(SpawnData data) { var view = new Rectangle(30, 3, Color.LIGHTBLUE); view.setStroke(Color.WHITE); view.setArcWidth(15); view.setArcHeight(10); return entityBuilder() .type(EntityType.PROJECTILE) .from(data) .viewWithBBox(view) .collidable() .zIndex(-5) .with(new ProjectileComponent(new Point2D(1, 0), 760)) .build(); }
Example 4
Source File: SpaceRangerFactory.java From FXGLGames with MIT License | 6 votes |
@Spawns("projectile") public Entity newProjectile(SpawnData data) { var view = new Rectangle(30, 3, Color.LIGHTBLUE); view.setStroke(Color.WHITE); view.setArcWidth(15); view.setArcHeight(10); return entityBuilder() .type(EntityType.PROJECTILE) .from(data) .viewWithBBox(view) .collidable() .zIndex(-5) .with(new ProjectileComponent(new Point2D(1, 0), 760)) .build(); }
Example 5
Source File: WebViewJavaScriptToJavaDemo.java From oim-fx with MIT License | 5 votes |
@Override public void start(final Stage primaryStage) { primaryStage.setTitle("What World"); WebView webView = new WebView(); WebPage webPage = null; WebEngine webEngine = webView.getEngine(); webEngine.getLoadWorker().stateProperty().addListener((ObservableValue<? extends State> ov, State oldState, State newState) -> { System.out.println("loadWorker"); if (newState == State.SUCCEEDED) { JSObject window = (JSObject) webEngine.executeScript("window"); window.setMember("app", app); System.out.println("app"); } }); webPage = Accessor.getPageFor(webEngine); webPage.setJavaScriptEnabled(true); webPage.setEditable(false); webPage.setContextMenuEnabled(false); webView.setFocusTraversable(true); webView.getEngine().load(WebViewJavaScriptToJavaDemo.class.getResource("ScriptToJava.html").toExternalForm()); Group root = new Group(); Scene scene = new Scene(root, 1000, 550, Color.LIGHTBLUE); root.getChildren().add(webView); primaryStage.setScene(scene); primaryStage.show(); }
Example 6
Source File: WebViewJavaScriptDemo.java From oim-fx with MIT License | 4 votes |
@Override public void start(final Stage primaryStage) { primaryStage.setTitle("Hello World"); WebView webView = new WebView(); // WebPage webPage = null; WebEngine webEngine = webView.getEngine(); // JSObject window = (JSObject) webEngine.executeScript("window"); // window.setMember("app", new JavaApplication()); // webPage = Accessor.getPageFor(webEngine); // webPage.setJavaScriptEnabled(true); // webPage.setEditable(false); // webPage.setContextMenuEnabled(false); // webView.setFocusTraversable(true); StringBuilder html = new StringBuilder(); html.append("<html>"); html.append(" <head>"); html.append(" <title></title>"); html.append(" <meta charset=\"UTF-8\">"); html.append(" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"); html.append(" <script type=\"text/javascript\">"); html.append(createLastJavaScript()); html.append(createCheckElementJavaScript()); html.append(createBodyJavaScript()); html.append(" </script>"); html.append(" </head>"); html.append(" <body style=\"word-wrap:break-word;\" >"); html.append(" <a href=\"app.exit();\" onclick=\"app.exit()\">Click here to exit application</a>"); html.append(" <a href=\"javascript:void()\" onclick=\"app.show('hhh')\">hhh</a>"); html.append(" </body>"); html.append("</html>"); webEngine.getLoadWorker().stateProperty().addListener((ObservableValue<? extends State> ov, State oldState, State newState) -> { System.out.println("loadWorker"); if (newState == State.SUCCEEDED) { System.out.println("SUCCEEDED"); } }); webEngine.loadContent(html.toString(), "text/html"); Group root = new Group(); Scene scene = new Scene(root, 1000, 550, Color.LIGHTBLUE); root.getChildren().add(webView); primaryStage.setScene(scene); primaryStage.show(); }