stage

how to make transparent scene and stage in javafx?

戏子无情 提交于 2019-11-27 08:46:01
I want to have transparent progressindicator, which is indefinite. here is the code, it shows grey background state/scene. i wanted fully transparent. I tried following code, but it shows background stage which is not transparent. package application; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.ProgressIndicator; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.stage.StageStyle; public class Main extends Application { @Override public void start(Stage stage) { /* * * my css file content:

Moving an undecorated stage in javafx 2

雨燕双飞 提交于 2019-11-27 07:07:22
I've been trying to move an undecorated stage around the screen, by using the following mouse listeners: onPressed onReleased onDragged These events are from a rectangle. My idea is to move the undecorated window clicking on the rectangle and dragging all the window. @FXML protected void onRectanglePressed(MouseEvent event) { X = primaryStage.getX() - event.getScreenX(); Y = primaryStage.getY() - event.getScreenY(); } @FXML protected void onRectangleReleased(MouseEvent event) { primaryStage.setX(event.getScreenX()); primaryStage.setY(event.getScreenY()); } @FXML protected void

A javaFX Stage could be both StageStyle.UTILITY and StageStyle.TRANSPARENT?

♀尐吖头ヾ 提交于 2019-11-27 06:59:29
问题 I mean that when using a stage with stageStyle.UTILITY, I don't want to show the "solid white background " but a transparent background. I need a stage doesn't shown on the windows' task bar below(stageStyle.UTILITY can satisfy), and I need a transparent background(StageStyle.TRANSPARENT can satisfy)so that I can define the close button style of my stage. But it seems strange that stageStyle.UTILITY or StageStyle.TRANSPARENT only fit one of my request. Thank you. 回答1: Already OK! Also invoke

JavaFX Application Icon

青春壹個敷衍的年華 提交于 2019-11-27 02:40:57
Is it possible to change the application icon using JavaFX, or does it have to be done using Swing? Assuming your stage is "stage" and the file is on the filesystem: stage.getIcons().add(new Image("file:icon.png")); As per the comment below, if it's wrapped in a containing jar you'll need to use the following approach instead: stage.getIcons().add(new Image(<yourclassname>.class.getResourceAsStream("icon.png"))); user1736233 I tried this and it totally works. The code is: stage.getIcons().add( new Image( <yourclassname>.class.getResourceAsStream( "icon.png" ))); icon.png is under the same

MongoDB中的explain命令

核能气质少年 提交于 2019-11-27 01:32:24
执行命令显示结果 执行db.student_exam.find({student_age: 15}).explain(‘allPlansExecution’); { "queryPlanner" : { "plannerVersion" : 1.0, "namespace" : "myproject.student_exam", "indexFilterSet" : false, "parsedQuery" : { "student_age" : { "$eq" : 15.0 } }, "winningPlan" : { "stage" : "COLLSCAN", "filter" : { "student_age" : { "$eq" : 15.0 } }, "direction" : "forward" }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 633.0, "executionTimeMillis" : 5.0, "totalKeysExamined" : 0.0, "totalDocsExamined" : 10000.0, "executionStages" : { "stage" : "COLLSCAN", "filter" : {

JavaFX 2.0: Closing a stage (window)

99封情书 提交于 2019-11-27 01:16:04
问题 I'm making a application in JavaFX 2.0. From my main window I am starting a new window with some settings. After I am done adjusting the settings I want to press a button like "Save changes". I would like this button to save the changes and close the window. By closing i mean killing it, not placing it in the background or setting the visibility. I've read about a method Stage.close() http://docs.oracle.com/javafx/2.0/api/javafx/stage/Stage.html As you can see it's similar to the method Hide(

When to use actors in libgdx? What are cons and pros?

自作多情 提交于 2019-11-27 00:23:08
问题 I'm writing simple solar system simulator. This is my first libgdx project. I'm using a Stage and Actors for the main menu and is pretty handy especially touch events handling. But ... looking at the examples i see nobody uses actors in actual game logic. I wander if i should use actor as a parent of planet class or just write my own class tor that. The planets won't be touchable and they will be moved only between the frames so the third parameter of action MoveBy will have to be time

测试一下

隐身守侯 提交于 2019-11-26 21:06:16
测试一下Windows Live Writer.... /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.tjumyk; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.layout.AnchorPane; import javafx.stage.Stage; /** * * @author E40-G8C */ public class Main extends Application { private static Main instance; static DatabaseManager dbManager; static AnchorPane indexPage,mainPage; static AnchorPane studentPanel,classPanel,coursePanel

Moving an undecorated stage in javafx 2

眉间皱痕 提交于 2019-11-26 17:37:49
问题 I've been trying to move an undecorated stage around the screen, by using the following mouse listeners: onPressed onReleased onDragged These events are from a rectangle. My idea is to move the undecorated window clicking on the rectangle and dragging all the window. @FXML protected void onRectanglePressed(MouseEvent event) { X = primaryStage.getX() - event.getScreenX(); Y = primaryStage.getY() - event.getScreenY(); } @FXML protected void onRectangleReleased(MouseEvent event) { primaryStage

Is it possible to have a transparent utility stage in javafx? [duplicate]

这一生的挚爱 提交于 2019-11-26 17:11:54
问题 This question already has answers here : A javaFX Stage could be both StageStyle.UTILITY and StageStyle.TRANSPARENT? (5 answers) Closed 2 years ago . I know that you can set a stage to have a utility style "Stage.InitStyle(StageStyle.UTILITY);" and you can set it to have a transparent style "Stage.InitStyle(StageStyle.TRANSPARENT);" but can you have both in the same stage? I am tiring to make it so that the stage does not show as a window down in the start menu and I would like the stage to