本文整理了Java中javafx.scene.paint.Color.<init>()
方法的一些代码示例,展示了Color.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Color.<init>()
方法的具体详情如下:
包路径:javafx.scene.paint.Color
类名称:Color
方法名:<init>
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
return new Color(red, green, blue, 1);
代码示例来源:origin: jfoenixadmin/JFoenix
void createOverlay() {
if (overlayRect == null) {
overlayRect = new OverLayRipple();
overlayRect.setClip(getMask());
getChildren().add(0, overlayRect);
if (ripplerFill.get() instanceof Color) {
overlayRect.setFill(new Color(((Color) ripplerFill.get()).getRed(),
((Color) ripplerFill.get()).getGreen(),
((Color) ripplerFill.get()).getBlue(),
0.2));
}else{
overlayRect.setFill(Color.TRANSPARENT);
}
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
/**
* {@inheritDoc}
*/
@Override
protected void interpolate(double frac) {
if (start == null) {
starting();
}
Color newColor = start.interpolate(end, frac);
if (Color.TRANSPARENT.equals(start)) {
newColor = new Color(end.getRed(), end.getGreen(), end.getBlue(), newColor.getOpacity());
}
region.get().setBackground(new Background(new BackgroundFill(newColor, radii, insets)));
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
Color[] colors = new Color[numColors];
for (int i = 0; i < numColors; i++) {
colors[i] = new Color(RAW_VALUES[i * 3] / 255,
RAW_VALUES[(i * 3) + 1] / 255, RAW_VALUES[(i * 3) + 2] / 255,
1.0);
代码示例来源:origin: jfoenixadmin/JFoenix
setScaleY(0);
if (ripplerFill.get() instanceof Color) {
Color circleColor = new Color(((Color) ripplerFill.get()).getRed(),
((Color) ripplerFill.get()).getGreen(),
((Color) ripplerFill.get()).getBlue(),
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
public StyleableObjectProperty<Paint> selectionBorderColorProperty() {
if (selectionBorderColor == null) {
selectionBorderColor = new SimpleStyleableObjectProperty<>(
StyleableProperties.SELECTION_BORDER_COLOR,
Window.this, "selectionBorderColor",
new Color(0.3, 0.7, 1.0, 1.0));
}
return selectionBorderColor;
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
public Paint getSelectionBorderColor() {
return selectionBorderColor == null ? new Color(0.3, 0.7, 1.0, 1.0) : selectionBorderColor.get();
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
protected void handleAsNumber(Number value) {
double c = parse(value);
super.setValueInternal(new Color(c, c, c, 1d));
}
}
代码示例来源:origin: org.processing/core
@Override
protected void fillFromCalc() {
super.fillFromCalc();
context.setFill(new Color(fillR, fillG, fillB, fillA));
}
代码示例来源:origin: us.ihmc/ihmc-javafx-toolkit
public static JavaFXGraphColors simulationConstructionSetStyle()
{
JavaFXGraphColors simulationConstructionSetStyle = new JavaFXGraphColors();
simulationConstructionSetStyle.setLabelColor(Color.WHITE);
simulationConstructionSetStyle.setBackgroundColor(new Color(180.0 / 255.0, 220 / 255.0, 240 / 255.0, 1.0));
simulationConstructionSetStyle.setGridAxisColor(Color.GRAY);
simulationConstructionSetStyle.setGridEveryOneColor(new Color(230 / 255.0, 240 / 255.0, 250 / 255.0, 1.0));
simulationConstructionSetStyle.setGridEveryFiveColor(new Color(180 / 255.0, 190 / 255.0, 210 / 255.0, 1.0));
simulationConstructionSetStyle.setGridEveryTenColor(new Color(180 / 255.0, 190 / 255.0, 210 / 255.0, 1.0));
simulationConstructionSetStyle.setSelectionColor(Color.RED);
return simulationConstructionSetStyle;
}
代码示例来源:origin: org.processing/core
@Override
protected void strokeFromCalc() {
super.strokeFromCalc();
context.setStroke(new Color(strokeR, strokeG, strokeB, strokeA));
}
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-visualizers
public static Color toTransparentColor(Color opaqueColor, double opacity)
{
double red = opaqueColor.getRed();
double green = opaqueColor.getGreen();
double blue = opaqueColor.getBlue();
return new Color(red, green, blue, opacity);
}
代码示例来源:origin: us.ihmc/ihmc-path-planning-visualizers
public static Color toTransparentColor(Color opaqueColor, double opacity)
{
double red = opaqueColor.getRed();
double green = opaqueColor.getGreen();
double blue = opaqueColor.getBlue();
return new Color(red, green, blue, opacity);
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
idRegEx = new SimpleStringProperty((String) in.readObject());
occurrenceRegEx = new SimpleStringProperty((String) in.readObject());
conversationIdRegEx = new SimpleStringProperty((String) in.readObject());
loglevelRegEx = new SimpleStringProperty((String) in.readObject());
contextRegEx = new SimpleStringProperty((String) in.readObject());
workflowInstanceIdRegEx = new SimpleStringProperty((String) in.readObject());
correlationIdRegEx = new SimpleStringProperty((String) in.readObject());
transactionIdRegEx = new SimpleStringProperty((String) in.readObject());
messageTypeRegEx = new SimpleStringProperty((String) in.readObject());
double r = in.readDouble();
double g = in.readDouble();
double b = in.readDouble();
double o = in.readDouble();
color = new SimpleObjectProperty<Color>(new Color(r, g, b, o));
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
public VCanvas() {
Rectangle rect = new Rectangle();
rect.setStroke(new Color(1, 1, 1, 1));
rect.setFill(new Color(0, 0, 0, 0.5));
contentProperty().addListener((ov, oldV, newV) -> {
if (newV != null) {
MouseControlUtil.
addSelectionRectangleGesture((Parent) newV, rect);
}
});
setContent(innerCanvas);
getStyleClass().add("vflow-background");
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
protected void handleAsMap(Map<?, ?> map) {
if (map.isEmpty()) {
super.setValueInternal(null);
return;
}
double r = getMapValue(map, "red", 0d);
double g = getMapValue(map, "green", 0d);
double b = getMapValue(map, "blue", 0d);
double a = getMapValue(map, "alpha", 1d);
super.setValueInternal(new Color(r, g, b, a));
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
protected void initStyle() {
connectionPath.getStyleClass().setAll(
"vnode-connection", "vnode-connection-" + type);
receiverConnectorUI.getStyleClass().setAll(
"vnode-connection-receiver",
"vnode-connection-receiver-" + type);
getReceiverUI().setFill(new Color(0, 1.0, 0, 0.0));
getReceiverUI().setStroke(new Color(0, 1.0, 0, 0.0));
getReceiverUI().setStrokeWidth(3);
}
代码示例来源:origin: com.jfoenix/jfoenix
void createOverlay() {
if (overlayRect == null) {
overlayRect = new OverLayRipple();
overlayRect.setClip(getMask());
getChildren().add(0, overlayRect);
if (ripplerFill.get() instanceof Color) {
overlayRect.setFill(new Color(((Color) ripplerFill.get()).getRed(),
((Color) ripplerFill.get()).getGreen(),
((Color) ripplerFill.get()).getBlue(),
0.2));
}else{
overlayRect.setFill(Color.TRANSPARENT);
}
}
}
代码示例来源:origin: us.ihmc/ihmc-javafx-toolkit
private static Material convertMaterial(AppearanceDefinition appearance)
{
float r = appearance.getColor().getX();
float g = appearance.getColor().getY();
float b = appearance.getColor().getZ();
double transparency = appearance.getTransparency();
if (appearance instanceof YoAppearanceRGBColor)
{
transparency = 1.0 - transparency;
}
Color color = new Color(r, g, b, transparency);
PhongMaterial res = new PhongMaterial(color);
res.setSpecularColor(Color.WHITE);
return res;
}
代码示例来源:origin: com.jfoenix/jfoenix
/**
* {@inheritDoc}
*/
@Override
protected void interpolate(double frac) {
if (start == null) {
starting();
}
Color newColor = start.interpolate(end, frac);
if (Color.TRANSPARENT.equals(start)) {
newColor = new Color(end.getRed(), end.getGreen(), end.getBlue(), newColor.getOpacity());
}
region.get().setBackground(new Background(new BackgroundFill(newColor, radii, insets)));
}
}
内容来源于网络,如有侵权,请联系作者删除!