本文整理了Java中javafx.scene.paint.Color.web()
方法的一些代码示例,展示了Color.web()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Color.web()
方法的具体详情如下:
包路径:javafx.scene.paint.Color
类名称:Color
方法名:web
暂无
代码示例来源:origin: speedment/speedment
@Override
public void initialize(URL location, ResourceBundle resources) {
title.setTextFill(Color.web("#45a6fc")); // TODO Use styleClass instead
header.setText("Component Explorer");
final RootItem root = new RootItem(speedment);
root.getChildren().addAll(components());
tree.setRoot(root);
close.setOnAction(newCloseHandler());
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void init(final DoubleProperty rotationAngle, final double initControlX1, final double initControlY1) {
final Circle outerCircle = new Circle(centerX, centerY, radius * 2, Color.web("blue", 0.5));
代码示例来源:origin: com.aquafx-project/aquafx
private ColorPicker createAccentColorPicker() {
ColorPicker colorPicker = new ColorPicker(Color.web("#0096C9"));
colorPicker.getCustomColors().addAll(Color.TRANSPARENT, Color.web("#0096C9"), Color.web("#4fb6d6"), Color.web("#f3622d"),
Color.web("#fba71b"), Color.web("#57b757"), Color.web("#41a9c9"), Color.web("#888"), Color.RED, Color.ORANGE,
Color.YELLOW, Color.GREEN, Color.CYAN, Color.BLUE, Color.PURPLE, Color.MAGENTA, Color.BLACK);
colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
@Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
setAccentColor(c);
}
});
return colorPicker;
}
代码示例来源:origin: com.aquafx-project/aquafx
private ColorPicker createBaseColorPicker() {
ColorPicker colorPicker = new ColorPicker(Color.TRANSPARENT);
colorPicker.getCustomColors().addAll(Color.TRANSPARENT, Color.web("#f3622d"), Color.web("#fba71b"), Color.web("#57b757"),
Color.web("#41a9c9"), Color.web("#888"), Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.CYAN,
Color.BLUE, Color.PURPLE, Color.MAGENTA, Color.BLACK);
colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
@Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
setBaseColor(c);
}
});
return colorPicker;
}
代码示例来源:origin: com.aquafx-project/aquafx
private ColorPicker createBackgroundColorPicker() {
ColorPicker colorPicker = new ColorPicker(Color.TRANSPARENT);
colorPicker.getCustomColors().addAll(Color.TRANSPARENT, Color.web("#f3622d"), Color.web("#fba71b"), Color.web("#57b757"),
Color.web("#41a9c9"), Color.web("#888"), Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.CYAN,
Color.BLUE, Color.PURPLE, Color.MAGENTA, Color.BLACK);
colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
@Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
if (c == null) {
backgroundColor = null;
} else {
backgroundColor = c;
}
updateUserAgentStyleSheet();
}
});
return colorPicker;
}
代码示例来源:origin: org.jrebirth.af/core
/**
* Build a Web (hexa).
*
* @param wColor the web color enum
*
* @return the javafx color
*/
private Color buildWebColor(final WebColor wColor) {
Color color = null;
if (wColor.opacity() >= 1.0) {
color = Color.web(HEXA_PREFIX + wColor.hex());
} else {
color = Color.web(HEXA_PREFIX + wColor.hex(), wColor.opacity());
}
return color;
}
代码示例来源:origin: com.intuit.karate/karate-core
public void refresh() {
textArea.clear();
text = "";
resultLabel.setText(idle);
resultLabel.setTextFill(Color.web("#8c8c8c"));
}
代码示例来源:origin: eu.agrosense.spi/session
@Override
public void run() {
final Scene scene = new Scene(new Browser(rootCallback), 750, 500, Color.web("#666970"));
fxPanel.setScene(scene);
}
});
代码示例来源:origin: com.github.almasb/fxgl-base
private static Image loadTilesetImage(Tileset tileset) {
String imageName = tileset.getImage();
imageName = imageName.substring(imageName.lastIndexOf("/") + 1);
return tileset.getTransparentcolor().isEmpty()
? FXGL.getAssetLoader().loadTexture(imageName).getImage()
: FXGL.getAssetLoader().loadTexture(imageName,
Color.web(tileset.getTransparentcolor())).getImage();
}
}
代码示例来源:origin: PhoenicisOrg/phoenicis
protected void drawLeftImage() {
AnchorPane pane = new AnchorPane();
pane.setPrefWidth(187);
Stop[] stops = new Stop[] { new Stop(0, Color.web("#3c79b2")), new Stop(1, Color.web("#2d5d8b")) };
RadialGradient gradient = new RadialGradient(0, 0, 0.5, 0.5, 1, true, CycleMethod.NO_CYCLE, stops);
Background background = new Background(new BackgroundFill(gradient, null, null));
pane.setBackground(background);
Text text = new Text(this.parent.getLeftImageText());
text.setFill(Color.WHITE);
text.setFont(Font.font("Maven Pro", 50));
text.setRotate(-90);
pane.setPadding(new Insets(-50));
pane.getChildren().add(text);
AnchorPane.setBottomAnchor(text, 160.0);
AnchorPane.setRightAnchor(text, -40.0);
getParent().getRoot().setLeft(pane);
}
代码示例来源:origin: com.intuit.karate/karate-core
text = "";
resultLabel = new Label(idle);
resultLabel.setTextFill(Color.web("#8c8c8c"));
resultLabel.setPadding(new Insets(3.0, 0, 0, 0));
resultLabel.setFont(new Font(15));
if (!stepParseSuccess) {
resultLabel.setText(syntaxError);
resultLabel.setTextFill(Color.web("#D52B1E"));
} else {
resultLabel.setText(idle);
resultLabel.setTextFill(Color.web("#8c8c8c"));
stepModified = true;
if (!stepParseSuccess) {
resultLabel.setText(syntaxError);
resultLabel.setTextFill(Color.web("#D52B1E"));
} else {
if (run().getStatus().equals("passed")) {
resultLabel.setText(passed);
resultLabel.setTextFill(Color.web("#53B700"));
} else {
resultLabel.setText(failed);
resultLabel.setTextFill(Color.web("#D52B1E"));
代码示例来源:origin: com.jfoenix/jfoenix
private void init(final DoubleProperty rotationAngle, final double initControlX1, final double initControlY1) {
final Circle outerCircle = new Circle(centerX, centerY, radius * 2, Color.web("blue", 0.5));
内容来源于网络,如有侵权,请联系作者删除!