javafx.scene.paint.Color#BLACK源码实例Demo

下面列出了javafx.scene.paint.Color#BLACK 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: charts   文件: SunburstChart.java
public SunburstChart(final TreeNode<T> TREE) {
    backgroundPaint        = Color.TRANSPARENT;
    borderPaint            = Color.TRANSPARENT;
    borderWidth            = 0d;
    segments               = new ArrayList<>(64);
    _visibleData           = VisibleData.NAME;
    _textOrientation       = TextOrientation.TANGENT;
    _backgroundColor       = Color.WHITE;
    _textColor             = Color.BLACK;
    _useColorFromParent    = false;
    _decimals              = 0;
    _interactive           = false;
    _autoTextColor         = true;
    _brightTextColor       = BRIGHT_TEXT_COLOR;
    _darkTextColor         = DARK_TEXT_COLOR;
    _useChartItemTextColor = false;
    formatString           = "%.0f";
    tree                   = TREE;
    levelMap               = new HashMap<>(8);
    sizeListener           = o -> resize();
    initGraphics();
    registerListeners();
}
 
源代码2 项目: OEE-Designer   文件: GradientLookup.java
@SuppressWarnings("unchecked")
public Color getColorAt(final double POSITION_OF_COLOR) {
       if (stops.isEmpty()) return Color.BLACK;

       final double POSITION = Helper.clamp(0.0, 1.0, POSITION_OF_COLOR);
       final Color COLOR;
       if (stops.size() == 1) {
           final Map<Double, Color> ONE_ENTRY = (Map<Double, Color>) stops.entrySet().iterator().next();
           COLOR = stops.get(ONE_ENTRY.keySet().iterator().next()).getColor();
       } else {
           Stop lowerBound = stops.get(0.0);
           Stop upperBound = stops.get(1.0);
           for (Double fraction : stops.keySet()) {
               if (Double.compare(fraction,POSITION) < 0) {
                   lowerBound = stops.get(fraction);
               }
               if (Double.compare(fraction, POSITION) > 0) {
                   upperBound = stops.get(fraction);
                   break;
               }
           }
           COLOR = interpolateColor(lowerBound, upperBound, POSITION);
       }
       return COLOR;
   }
 
源代码3 项目: Enzo   文件: Symbol.java
public Symbol(final SymbolType SYMBOL_TYPE, final double SIZE, final Color COLOR, final boolean RESIZEABLE) {
    symbolType = new SimpleObjectProperty<>(this, "symbolType", (null == SYMBOL_TYPE) ? SymbolType.NONE : SYMBOL_TYPE);
    color      = new SimpleObjectProperty<>(this, "color", (null == COLOR) ? Color.BLACK : COLOR);
    size       = SIZE;
    resizeable = RESIZEABLE;
    if (!RESIZEABLE) {
        setMinSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
        setMaxSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
    }
    setPrefSize(size * getSymbolType().WIDTH_FACTOR, size * getSymbolType().HEIGHT_FACTOR);
    getStylesheets().add(getClass().getResource("symbols.css").toExternalForm());
    getStyleClass().setAll("symbol");
    init();
    initGraphics();
    registerListeners();
}
 
源代码4 项目: RadialFx   文件: RadialColorMenu.java
public RadialColorMenu() {
selectedColor = new SimpleObjectProperty<Paint>(Color.BLACK);
itemExtMouseHandler = new ItemExtEventHandler();

final Color[] colors = new Color[] { Color.BLACK, Color.web("00275b"),
	Color.web("008021"), Color.web("8e0000"), Color.web("ff8800") };

int i = 0;
for (final Color color : colors) {

    addColorItem(color, i * 360d / colors.length, 360d / colors.length);

    i++;
}

final Circle center = new Circle();
center.fillProperty().bind(selectedColor);
center.setRadius(40);
center.setCenterX(0);
center.setCenterY(0);

getChildren().add(center);
   }
 
源代码5 项目: helloiot   文件: IconColor.java
@Override
public Node buildIcon(StringFormat format, byte[] value) {
    Color  c;   
    try {
        c = Color.valueOf(format.value(value).asString());    
    } catch (Exception e) {
        c = Color.BLACK;
    }
    return IconBuilder.create(icon, 48.0).color(c).build();
}
 
源代码6 项目: mzmine3   文件: SimpleColorPalette.java
@Nonnull
public Color getMainColor() {
  if (isValid()) {
    return get(MAIN_COLOR);
  }
  return Color.BLACK;
}
 
源代码7 项目: Cryogen   文件: Frosty.java
public void setBlur(int amount) {
    blurAmount = amount;
    beFocused = new DropShadow(BlurType.THREE_PASS_BOX, Color.BLACK, 15, 0.1, 0, 0);
    beUnfocused = new DropShadow(BlurType.THREE_PASS_BOX, Color.DARKGREY, 15, 0, 0, 0);
    BoxBlur bb = new BoxBlur(amount, amount, 3);
    //beFocused.setInput(bb); background.setEffect(beFocused);
    //beUnfocused.setInput(bb); background.setEffect(beUnfocused);
    //bb.setInput(beFocused);
    background.setEffect(bb);
    shadow.setEffect(beFocused);
}
 
源代码8 项目: Medusa   文件: LcdSkin.java
private void updateSectionColors() {
    int listSize = sections.size();
    sectionColorMap.clear();
    for (int i = 0 ; i < listSize ; i++) {
        Color sectionColor = sections.get(i).getColor();
        Color lcdForegroundColor;
        if (Helper.isMonochrome(sectionColor)) {
            lcdForegroundColor = Helper.isDark(sectionColor) ? Color.WHITE : Color.BLACK;
        } else {
            lcdForegroundColor = Color.hsb(sectionColor.getHue(), sectionColor.getSaturation(), sectionColor.getBrightness() * 0.3);
        }
        Color lcdBackgroundColor = Color.color(sectionColor.getRed(), sectionColor.getGreen(), sectionColor.getBlue(), 0.1);
        sectionColorMap.put(sections.get(i), getSectionColors(lcdBackgroundColor, lcdForegroundColor));
    }
}
 
源代码9 项目: mzmine3   文件: ColorParameter.java
public ColorParameter(String name, String description) {
  this(name, description, Color.BLACK);
}
 
源代码10 项目: charts   文件: LegendItem.java
public LegendItem(final String TEXT, final Color SYMBOL_COLOR) {
    this(Symbol.CIRCLE, TEXT, SYMBOL_COLOR, Color.WHITE, Color.BLACK);
}
 
源代码11 项目: charts   文件: Series.java
public Series(final T... ITEMS) {
    this(Arrays.asList(ITEMS), ChartType.SCATTER, "", Color.TRANSPARENT, Color.BLACK, Color.BLACK, Color.BLACK, Symbol.CIRCLE);
}
 
源代码12 项目: charts   文件: ChartItem.java
public ChartItem(final String NAME, final double VALUE, final Color FILL, final Instant TIMESTAMP) {
    this(NAME, VALUE, FILL, Color.TRANSPARENT, Color.BLACK, TIMESTAMP, false, 800);
}
 
源代码13 项目: arma-dialog-creator   文件: ProgressRenderer.java
public ProgressRenderer(ArmaControl control, ArmaResolution resolution, Env env) {
	super(control, resolution, env);
	this.border = new Border(2, Color.BLACK);
	{
		ConfigProperty colorFrame = myControl.findProperty(ConfigPropertyLookup.COLOR_FRAME);
		addValueListener(colorFrame.getName(), (observer, oldValue, newValue) -> {
			if (newValue instanceof SVColor) {
				getBackgroundColorObserver().updateValue((SVColor) newValue);
			}
		});
		colorFrame.setValue(new SVColorArray(getBackgroundColor()));
	}

	blinkControlHandler = new BlinkControlHandler(this, ConfigPropertyLookup.BLINKING_PERIOD);

	addValueListener(ConfigPropertyLookup.COLOR_BAR, (observer, oldValue, newValue) -> {
		if (newValue instanceof SVColor) {
			colorBar = ((SVColor) newValue).toJavaFXColor();
			updateTintedTexture();
			requestRender();
		}
	});

	addValueListener(ConfigPropertyLookup.TEXTURE, (observer, oldValue, newValue) -> {
		textureHelper.updateAsync(newValue, mode -> {
			updateTintedTexture();
			return null;
		});
	});

	addValueListener(ConfigPropertyLookup.STYLE, (observer, oldValue, newValue) -> {
		newValue = MiscHelpers.getGroup(this.env, newValue, control);
		if (newValue != null) {
			SVControlStyleGroup g = (SVControlStyleGroup) newValue;
			horizProgress = g.hasStyle(ControlStyle.HORIZONTAL);
			requestRender();
		}
	});

	tooltipRenderer = new TooltipRenderer(
			this.myControl, this,
			ConfigPropertyLookup.TOOLTIP_COLOR_SHADE,
			ConfigPropertyLookup.TOOLTIP_COLOR_TEXT,
			ConfigPropertyLookup.TOOLTIP_COLOR_BOX,
			ConfigPropertyLookup.TOOLTIP
	);

	updateTintedTexture();
}
 
源代码14 项目: gef   文件: NodePart.java
private Circle node(double x, double y) {
	return new Circle(x, y, 5, Color.BLACK);
}
 
源代码15 项目: charts   文件: XYSeries.java
public XYSeries(final List<T> ITEMS, final ChartType TYPE, final boolean SHOW_POINTS) {
    this(ITEMS, TYPE, "", Color.TRANSPARENT, Color.BLACK, Symbol.CIRCLE, SHOW_POINTS);
}
 
源代码16 项目: charts   文件: LegendItem.java
public LegendItem(final Symbol SYMBOL, final String TEXT, final Color SYMBOL_FILL) {
    this(SYMBOL, TEXT, SYMBOL_FILL, Color.WHITE, Color.BLACK);
}
 
源代码17 项目: charts   文件: ChartItem.java
public ChartItem(final String NAME, final double VALUE) {
    this(NAME, VALUE, Color.rgb(233, 30, 99), Color.TRANSPARENT, Color.BLACK, Instant.now(), false, 800);
}
 
源代码18 项目: aurous-app   文件: MediaPlayerScene.java
public Scene createScene(final String sourceURL) throws Throwable {

		final Group root = new Group();
		root.autosize();
		MediaUtils.activeMedia = sourceURL;
		final String trailer = MediaUtils.getMediaURL(sourceURL);

		media = new Media(trailer);

		player = new MediaPlayer(media);

		view = new MediaView(player);
		view.setFitWidth(1);
		view.setFitHeight(1);
		view.setPreserveRatio(false);

		// System.out.println("media.width: "+media.getWidth());

		final Scene scene = new Scene(root, 1, 1, Color.BLACK);

		player.play();

		player.setOnReady(() -> {
			ControlPanel.seek().setValue(0);

		});
		player.currentTimeProperty().addListener(
				(observableValue, duration, current) -> {

					final long currentTime = (long) current.toMillis();

					final long totalDuration = (long) player.getMedia()
							.getDuration().toMillis();
					updateTime(currentTime, totalDuration);

				});

		// PlayerUtils.activeYoutubeVideo = youtubeVideo;
		if (sourceURL.equals("https://www.youtube.com/watch?v=kGubD7KG9FQ")) {
			player.pause();
		}

		UISession.setMediaPlayer(player);
		UISession.setMediaView(view);
		UISession.setMedia(media);

		return (scene);
	}
 
源代码19 项目: charts   文件: XYSeries.java
public XYSeries() {
    this(null, ChartType.SCATTER, "", Color.TRANSPARENT, Color.BLACK, Symbol.CIRCLE,true);
}
 
源代码20 项目: JImageHash   文件: Hash.java
/**
 * Creates a visual representation of the hash mapping the hash values to the
 * section of the rescaled image used to generate the hash assuming default bit
 * encoding.
 * 
 * <p>
 * Some hash algorithms may chose to construct their hashes in a non default
 * manner (e.g. {@link com.github.kilianB.hashAlgorithms.DifferenceHash}). In
 * this case {@link #toImage(int, HashingAlgorithm)} may help to resolve the
 * issue;
 * 
 * @param blockSize scaling factor of each pixel in the has. each bit of the
 *                  hash will be represented to blockSize*blockSize pixels
 * 
 * @return A black and white image representing the individual bits of the hash
 */
public BufferedImage toImage(int blockSize) {
	Color[] colorArr = new Color[] { Color.WHITE, Color.BLACK };
	int[] colorIndex = new int[hashLength];

	for (int i = 0; i < hashLength; i++) {
		colorIndex[i] = hashValue.testBit(i) ? 1 : 0;
	}
	return toImage(colorIndex, colorArr, blockSize);
}