Java Code Examples for javafx.scene.paint.Color#BLACK
The following examples show how to use
javafx.scene.paint.Color#BLACK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RadialColorMenu.java From RadialFx with GNU Lesser General Public License v3.0 | 6 votes |
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); }
Example 2
Source File: SunburstChart.java From charts with Apache License 2.0 | 6 votes |
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(); }
Example 3
Source File: Symbol.java From Enzo with Apache License 2.0 | 6 votes |
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(); }
Example 4
Source File: GradientLookup.java From OEE-Designer with MIT License | 6 votes |
@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; }
Example 5
Source File: IconColor.java From helloiot with GNU General Public License v3.0 | 5 votes |
@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(); }
Example 6
Source File: SimpleColorPalette.java From mzmine3 with GNU General Public License v2.0 | 5 votes |
@Nonnull public Color getMainColor() { if (isValid()) { return get(MAIN_COLOR); } return Color.BLACK; }
Example 7
Source File: Frosty.java From Cryogen with GNU General Public License v2.0 | 5 votes |
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); }
Example 8
Source File: LcdSkin.java From Medusa with Apache License 2.0 | 5 votes |
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)); } }
Example 9
Source File: NodePart.java From gef with Eclipse Public License 2.0 | 4 votes |
private Circle node(double x, double y) { return new Circle(x, y, 5, Color.BLACK); }
Example 10
Source File: XYSeries.java From charts with Apache License 2.0 | 4 votes |
public XYSeries() { this(null, ChartType.SCATTER, "", Color.TRANSPARENT, Color.BLACK, Symbol.CIRCLE,true); }
Example 11
Source File: MediaPlayerScene.java From aurous-app with GNU General Public License v2.0 | 4 votes |
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); }
Example 12
Source File: ChartItem.java From charts with Apache License 2.0 | 4 votes |
public ChartItem(final String NAME, final double VALUE) { this(NAME, VALUE, Color.rgb(233, 30, 99), Color.TRANSPARENT, Color.BLACK, Instant.now(), false, 800); }
Example 13
Source File: LegendItem.java From charts with Apache License 2.0 | 4 votes |
public LegendItem(final Symbol SYMBOL, final String TEXT, final Color SYMBOL_FILL) { this(SYMBOL, TEXT, SYMBOL_FILL, Color.WHITE, Color.BLACK); }
Example 14
Source File: XYSeries.java From charts with Apache License 2.0 | 4 votes |
public XYSeries(final List<T> ITEMS, final ChartType TYPE, final boolean SHOW_POINTS) { this(ITEMS, TYPE, "", Color.TRANSPARENT, Color.BLACK, Symbol.CIRCLE, SHOW_POINTS); }
Example 15
Source File: ColorParameter.java From mzmine3 with GNU General Public License v2.0 | 4 votes |
public ColorParameter(String name, String description) { this(name, description, Color.BLACK); }
Example 16
Source File: ProgressRenderer.java From arma-dialog-creator with MIT License | 4 votes |
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(); }
Example 17
Source File: ChartItem.java From charts with Apache License 2.0 | 4 votes |
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); }
Example 18
Source File: Series.java From charts with Apache License 2.0 | 4 votes |
public Series(final T... ITEMS) { this(Arrays.asList(ITEMS), ChartType.SCATTER, "", Color.TRANSPARENT, Color.BLACK, Color.BLACK, Color.BLACK, Symbol.CIRCLE); }
Example 19
Source File: LegendItem.java From charts with Apache License 2.0 | 4 votes |
public LegendItem(final String TEXT, final Color SYMBOL_COLOR) { this(Symbol.CIRCLE, TEXT, SYMBOL_COLOR, Color.WHITE, Color.BLACK); }
Example 20
Source File: Hash.java From JImageHash with MIT License | 3 votes |
/** * 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); }