本文整理匯總了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());
}
}