本文整理汇总了Java中javafx.scene.paint.Color.AQUA属性的典型用法代码示例。如果您正苦于以下问题:Java Color.AQUA属性的具体用法?Java Color.AQUA怎么用?Java Color.AQUA使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javafx.scene.paint.Color
的用法示例。
在下文中一共展示了Color.AQUA属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleScene
private Scene simpleScene() {
try {
VBox root = new VBox();
Pane pane = new Pane();
Rectangle rectangle = new Rectangle(100, 100, Color.AQUA);
pane.getChildren().addAll(rectangle);
VerticalResizeContainerController controller = new VerticalResizeContainerController(pane);
root.getChildren().addAll(controller.getView());
VBox.setVgrow(controller.getView(), Priority.ALWAYS);
Scene scene = new Scene(root, 800, 600);
return scene;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
示例2: start
@Override
public void start(Stage stage) {
VBox box = new VBox();
Scene scene = new Scene(box, 180, 180);
stage.setScene(scene);
stage.setTitle("ScrollPaneSample");
box.getChildren().addAll(sp, fileName);
VBox.setVgrow(sp, Priority.ALWAYS);
fileName.setLayoutX(30);
fileName.setLayoutY(160);
sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
Color[] colors = new Color[] { Color.RED, Color.ALICEBLUE, Color.AQUA, Color.BEIGE, Color.BLANCHEDALMOND };
for (int i = 0; i < 10; i++) {
int cindex = (i + 5) % 5;
Rectangle rectangle = new Rectangle(100, 50, colors[cindex]);
rectangles[i] = rectangle;
hb.getChildren().add(rectangle);
}
sp.setPrefSize(115, 150);
sp.setContent(hb);
fileName.setOnMouseClicked((e) -> {
scrollTo(rectangles[4]);
});
stage.show();
}
示例3: start
@Override
public void start(final Stage stage) throws Exception {
this.com.start();
this.consolePipe.open();
this.processManager.start();
stage.setTitle("Boutique-de-jus Bootstrap Control");
stage.initStyle(StageStyle.DECORATED);
FXMLLoader loader = new FXMLLoader(getClass().getResource("/main.fxml"));
loader.setControllerFactory((c) -> {
try {
Object controller = c.newInstance();
if (ProcessController.class.isAssignableFrom(c)) {
((ProcessController) controller).setup(this.com,
this.consolePipe,
this.scheduler,
this.processManager);
}
return controller;
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
});
TabPane tabPane = loader.load();
Scene scene = new Scene(tabPane, 1024, 768, Color.AQUA);
scene.getStylesheets().add(getClass().getResource("/style.css").toExternalForm());
stage.setScene(scene);
stage.show();
/*
Notifications.create()
.title("Achievement unlocked")
.text("Bring up a Desktop Notification!")
.hideAfter(Duration.seconds(2))
.showWarning();
*/
}
示例4: main
/** SOLID
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Auto vocho = new Auto(); // instancia de Auto
Auto auto = new Auto();//instacia de un auto
System.out.println(auto.getColor());
auto.setColor("AMARILLO HUEVO");
System.out.println(auto.getColor());
System.out.println(auto.getModelo());
auto.setModelo(2018);
System.out.println(auto.getModelo());
Auto combi = new Auto("vw", ColorAuto.NAYELY);
System.out.println(combi.getColor());
combi.setColor("rosa bebe");
System.out.println(combi.getColor());
Auto puingDurmiendo = new Auto("SOTAVENTO", new ColorAuto());
System.out.println(puingDurmiendo.colorAutoD());
Auto autoNuevo = new Auto("MI AUTO", Color.AQUA);
System.out.println(autoNuevo.getColorJ().getGreen());
}
示例5: clickSelectCardHandle
@FXML
public void clickSelectCardHandle(Event event){
ImageView tmp = (ImageView) event.getSource();
LocatedImage img = (LocatedImage) tmp.getImage();
this.carteClicked = img.getURL();
if(this.carteSelected.contains(img.getURL())){
tmp.setEffect(null);
this.carteSelected.remove( img.getURL());
}else{
DropShadow ds = new DropShadow(20,Color.AQUA);
tmp.setEffect(ds);
this.carteSelected.add( img.getURL());
}
}