private void swapLabelsColor(Label lbl1, Label lbl2) { Paint color = lbl1.getTextFill(); lbl1.setTextFill(lbl2.getTextFill()); lbl2.setTextFill(color); }
void init() { calendarPlaceHolder.setOpacity(1); if(unit.get() == TimeUnit.HOURS){ selectedHourLabel.setTextFill(Color.rgb(255, 255, 255, 0.87)); }else{ selectedMinLabel.setTextFill(Color.rgb(255, 255, 255, 0.87)); } }
void init() { calendarPlaceHolder.setOpacity(1); selectedDateLabel.setTextFill(Color.WHITE); selectedYearLabel.setTextFill(Color.rgb(255, 255, 255, 0.67)); yearsListView.setOpacity(0); yearsListView.setVisible(false); }
protected BorderPane createCalendarMonthLabelPane() { monthYearLabel = new Label(); monthYearLabel.getStyleClass().add(SPINNER_LABEL); monthYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 13)); monthYearLabel.setTextFill(DEFAULT_COLOR); BorderPane monthContainer = new BorderPane(); monthContainer.setMinHeight(50); monthContainer.setCenter(monthYearLabel); monthContainer.setPadding(new Insets(2, 12, 2, 12)); return monthContainer; }
selectedHourLabel.setTextFill(Color.WHITE); selectedHourLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS)); selectedMinLabel.setTextFill(fadedColor); selectedMinLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedMinLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.MINUTES)); separatorLabel.setTextFill(fadedColor); separatorLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); periodPMLabel.setTextFill(fadedColor); periodPMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodPMLabel.setOnMouseClicked((click) -> period.set("PM")); periodAMLabel.setTextFill(fadedColor); periodAMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodAMLabel.setOnMouseClicked((click) -> period.set("AM")); periodAMLabel.setTextFill(Color.WHITE); } else { periodPMLabel.setTextFill(Color.WHITE);
@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()); }
selectedYearLabel.setTextFill(Color.rgb(255, 255, 255, 0.67)); selectedYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); selectedDateLabel.setTextFill(Color.WHITE); selectedDateLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 32));
label.setFont(Font.font(ROBOTO, FontWeight.BOLD, 12)); label.setTextFill(val == time.getMinute() ? Color.rgb(255, 255, 255, 0.87) : Color.rgb(0, 0, 0, 0.87)); selectedMinLabel.textProperty().addListener((o, oldVal, newVal) -> { if (Integer.parseInt(newVal) == Integer.parseInt(label.getText())) { label.setTextFill(Color.rgb(255, 255, 255, 0.87)); } else { label.setTextFill(Color.rgb(0, 0, 0, 0.87));
label.setTextFill(((val == time.getHour() % 12 || (val == 12 && time.getHour() % 12 == 0)) && !is24HourView) ? Color.rgb(255, 255, 255, 0.87) : Color.rgb(0, 0, 0, 0.87)); selectedHourLabel.textProperty().addListener((o, oldVal, newVal) -> { if (Integer.parseInt(newVal) == Integer.parseInt(label.getText())) { label.setTextFill(Color.rgb(255, 255, 255, 0.87)); } else { label.setTextFill(Color.rgb(0, 0, 0, 0.87)); label.setTextFill((val == time.getHour() % 24 || (val == 0 && time.getHour() % 24 == 0) && is24HourView) ? Color.rgb(255, 255, 255, 0.54) : Color.rgb(0, 0, 0, 0.54)); selectedHourLabel.textProperty().addListener((o, oldVal, newVal) -> { if (Integer.parseInt(newVal) == Integer.parseInt(label.getText())) { label.setTextFill(Color.rgb(255, 255, 255, 0.54)); } else { label.setTextFill(Color.rgb(0, 0, 0, 0.54));
private void updateColor() { final ColorPicker colorPicker = (ColorPicker) getSkinnable(); Color color = colorPicker.getValue(); // update picker box color Color circleColor = color == null ? Color.WHITE : color; Circle colorCircle = new Circle(); colorCircle.setFill(circleColor); colorCircle.setLayoutX(colorBox.getWidth() / 4); colorCircle.setLayoutY(colorBox.getHeight() / 2); colorBox.getChildren().add(colorCircle); Timeline animateColor = new Timeline(new KeyFrame(Duration.millis(240), new KeyValue(colorCircle.radiusProperty(), 200, Interpolator.EASE_BOTH))); animateColor.setOnFinished((finish) -> { JFXNodeUtils.updateBackground(colorBox.getBackground(), colorBox, colorCircle.getFill()); colorBox.getChildren().remove(colorCircle); }); animateColor.play(); // update label color displayNode.setTextFill(circleColor.grayscale().getRed() < 0.5 ? Color.valueOf( "rgba(255, 255, 255, 0.87)") : Color.valueOf("rgba(0, 0, 0, 0.87)")); if (colorLabelVisible.get()) { displayNode.setText(JFXNodeUtils.colorToHex(circleColor)); } else { displayNode.setText(""); } }
for (Node tabNode : tabs.lookupAll(".tab")) { for (Node node : tabNode.lookupAll(".tab-label")) { ((Label) node).setTextFill(fontColor);
private void swapLabelsColor(Label lbl1, Label lbl2) { Paint color = lbl1.getTextFill(); lbl1.setTextFill(lbl2.getTextFill()); lbl2.setTextFill(color); }
void init() { calendarPlaceHolder.setOpacity(1); if(unit.get() == TimeUnit.HOURS){ selectedHourLabel.setTextFill(Color.rgb(255, 255, 255, 0.87)); }else{ selectedMinLabel.setTextFill(Color.rgb(255, 255, 255, 0.87)); } }
void init() { calendarPlaceHolder.setOpacity(1); selectedDateLabel.setTextFill(Color.WHITE); selectedYearLabel.setTextFill(Color.rgb(255, 255, 255, 0.67)); yearsListView.setOpacity(0); yearsListView.setVisible(false); }
public void refresh() { textArea.clear(); text = ""; resultLabel.setText(idle); resultLabel.setTextFill(Color.web("#8c8c8c")); }
@Nonnull public static Label placeholder(@Nonnull String text) { Label placeholder = new Label(text); placeholder.setFont(new Font(30.0)); placeholder.setTextFill(Color.gray(0.4)); placeholder.setTextAlignment(TextAlignment.CENTER); placeholder.setAlignment(Pos.CENTER); placeholder.setStyle("-fx-background-color: #f8f8f8"); return placeholder; }
private void updateOtherPlayerShield(Group g, INavigableVessel vessel) { g.getChildren().remove(shield); shield = createShield(vessel); g.getChildren().add(shield); Color shieldColor = getShieldBaseColor(vessel); Color textColor = calculateContrastColor(shieldColor); shipGroupSize.setTextFill(textColor); }
protected BorderPane createCalendarMonthLabelPane() { monthYearLabel = new Label(); monthYearLabel.getStyleClass().add(SPINNER_LABEL); monthYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 13)); monthYearLabel.setTextFill(DEFAULT_COLOR); BorderPane monthContainer = new BorderPane(); monthContainer.setMinHeight(50); monthContainer.setCenter(monthYearLabel); monthContainer.setPadding(new Insets(2, 12, 2, 12)); return monthContainer; }
public DragButton(@Nonnull String text) { setCursor(Cursor.W_RESIZE); rectangle = new Rectangle(); rectangle.setFill(Color.GRAY); rectangle.setArcHeight(5.0); rectangle.setArcWidth(5.0); line = new Line(); label = Components.label(text); label.setTextFill(Color.WHITE); getChildren().addAll(rectangle, line, label); }
public static Label createLabel(String text, Character icon) { Label label = new Label(text); label.setTextFill(Color.GRAY); label.setFont(new Font(20)); label.setGraphicTextGap(6); Text iconT = createIconText(icon, 24); iconT.setFill(Color.GRAY); label.setGraphic(iconT); return label; }