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.getStyleClass().add(SPINNER_LABEL); selectedHourLabel.setTextFill(Color.WHITE); selectedHourLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS)); selectedHourLabel.setMinWidth(49); selectedMinLabel.getStyleClass().add(SPINNER_LABEL); selectedMinLabel.setTextFill(fadedColor); selectedMinLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedMinLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.MINUTES)); separatorLabel.setPadding(new Insets(0, 0, 4, 0)); separatorLabel.setTextFill(fadedColor); separatorLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); periodPMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodPMLabel.setOnMouseClicked((click) -> period.set("PM")); periodAMLabel.getStyleClass().add(SPINNER_LABEL); periodAMLabel.setTextFill(fadedColor); periodAMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodAMLabel.setOnMouseClicked((click) -> period.set("AM"));
selectedYearLabel.getStyleClass().add(SPINNER_LABEL); selectedYearLabel.setTextFill(Color.rgb(255, 255, 255, 0.67)); selectedYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); selectedDateLabel.getStyleClass().add(SPINNER_LABEL); selectedDateLabel.setTextFill(Color.WHITE); selectedDateLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 32));
int val = ((i + 3) * 5) % 60; Label label = new Label(String.valueOf(unitConverter.toString(val))); label.setFont(Font.font(ROBOTO, FontWeight.BOLD, 12));
@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; }
/** * Refresh the content to be displayed on the current page. */ private void updateDisplay() { clearContents(); Page page = pages.get(currentPage); for (Line line : page.getLines()) { final Label l = new Label(line.getLine()); l.getStyleClass().add(line.getStyleClass()); if (line.getStyleClass().equals(PageSplitter.CENTERED_STYLE)){ l.setFont(control.getCenteredFont()); BorderPane centered = new BorderPane(); centered.setCenter(l); contentContainer.getChildren().add(centered); } else { switch (line.getStyleClass()) { case PageSplitter.PARAGRAPH_STYLE: l.setFont(control.getParagraphFont()); break; case PageSplitter.HEADING_STYLE: l.setFont(control.getHeaderFont()); break; default: throw new IllegalStateException("Unknown style for font setting"); } contentContainer.getChildren().add(l); } } } /**
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 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; }
/** * Create the labels and add them to the group. * @param g group the labels are added to * @param centerPoint central point around which the labels are placed. */ private void createAndAddLabels(Group g, final Point2D centerPoint) { List<String> values = control.valuesProperty(); angles = new ArrayList<>(values.size()); double angle = currentRotation.doubleValue() + 180; double step = (180.0 - 2 * currentRotation.doubleValue()) / (values.size() - 1); int radius = 120; for (String value : values) { angles.add(angle); Point2D basePoint = calculateBasePoint(centerPoint, radius, angle); Dimension2D dim = sizeing.calculate(value, control.getFont()); Label l = new Label(value); l.setFont(control.getFont()); l.getStyleClass().add("openPatricianSlider"); l.setTranslateX(basePoint.getX() - dim.getWidth() * calculateMoveFactor(angle)); l.setTranslateY(basePoint.getY() - dim.getHeight()); g.getChildren().add(l); angle += step; } double initialAngle = Math.max(INITIAL_ROTATION, control.getSelectedIndex() * step); currentRotation.setValue(initialAngle); } /**
@Override public Node apply(int idx) { Val<String> formatted = nParagraphs.map(n -> format(idx+1, n)); Label lineNo = new Label(); lineNo.setFont(DEFAULT_FONT); lineNo.setBackground(DEFAULT_BACKGROUND); lineNo.setTextFill(DEFAULT_TEXT_FILL); lineNo.setPadding(DEFAULT_INSETS); lineNo.setAlignment(Pos.TOP_RIGHT); lineNo.getStyleClass().add("lineno"); // bind label's text to a Val that stops observing area's paragraphs // when lineNo is removed from scene lineNo.textProperty().bind(formatted.conditionOnShowing(lineNo)); return lineNo; }
selectedHourLabel.getStyleClass().add(SPINNER_LABEL); selectedHourLabel.setTextFill(Color.WHITE); selectedHourLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedHourLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.HOURS)); selectedHourLabel.setMinWidth(49); selectedMinLabel.getStyleClass().add(SPINNER_LABEL); selectedMinLabel.setTextFill(fadedColor); selectedMinLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); selectedMinLabel.setOnMouseClicked((click) -> unit.set(TimeUnit.MINUTES)); separatorLabel.setPadding(new Insets(0, 0, 4, 0)); separatorLabel.setTextFill(fadedColor); separatorLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42)); periodPMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodPMLabel.setOnMouseClicked((click) -> period.set("PM")); periodAMLabel.getStyleClass().add(SPINNER_LABEL); periodAMLabel.setTextFill(fadedColor); periodAMLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); periodAMLabel.setOnMouseClicked((click) -> period.set("AM"));
selectedYearLabel.getStyleClass().add(SPINNER_LABEL); selectedYearLabel.setTextFill(Color.rgb(255, 255, 255, 0.67)); selectedYearLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 14)); selectedDateLabel.getStyleClass().add(SPINNER_LABEL); selectedDateLabel.setTextFill(Color.WHITE); selectedDateLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 32));
int val = ((i + 3) * 5) % 60; Label label = new Label(String.valueOf(unitConverter.toString(val))); label.setFont(Font.font(ROBOTO, FontWeight.BOLD, 12));
resultLabel.setTextFill(Color.web("#8c8c8c")); resultLabel.setPadding(new Insets(3.0, 0, 0, 0)); resultLabel.setFont(new Font(15)); textArea.focusedProperty().addListener((val, before, after) -> { if (!after) { // if we lost focus
innerBar.setEffect(ds); label.setFont(Font.font(16)); label.setTextFill(Color.GOLD); label.textProperty().bind(currentValue.asString("%.0f").concat("/").concat(maxValue.asString("%.0f")));
innerBar.setEffect(ds); label.setFont(Font.font(16)); label.setTextFill(Color.GOLD); label.textProperty().bind(currentValue.asString("%.0f").concat("/").concat(maxValue.asString("%.0f")));
public UiNoReportOpen() { this.setBackground( new Background( new BackgroundFill( ColorPalette.UI_BACKGROUND.getPaint(), null, null ) ) ); this.goMintLogoView.setFitWidth( 150 ); this.goMintLogoView.setFitHeight( 150 ); this.performanceViewerTitle.setFont( Font.font( 20 ) ); this.performanceViewerTitle.setTextFill( ColorPalette.UI_FOREGROUND.getPaint() ); this.performanceViewerSubTitle.setTextFill( ColorPalette.UI_SECONDARY_FOREGROUND.getPaint() ); VBox mainContainer = new VBox(); HBox secondaryContainer = new HBox(); VBox textContainer = new VBox(); Pane separator = new Pane(); separator.setPrefHeight( 2 ); separator.setMaxWidth( 500 ); separator.setBackground( new Background( new BackgroundFill( ColorPalette.UI_BACKGROUND_SECONDARY.getPaint(), null, null ) ) ); mainContainer.setSpacing( 20 ); mainContainer.setAlignment( Pos.CENTER ); mainContainer.getChildren().addAll( new UiStatusUpdate( "Current build status | Bloody Edge" ), secondaryContainer, separator, new UiButton( "Open performance report" ) ); secondaryContainer.setSpacing( 20 ); secondaryContainer.setAlignment( Pos.CENTER ); secondaryContainer.getChildren().addAll( this.goMintLogoView, textContainer ); textContainer.setSpacing( 5 ); textContainer.setAlignment( Pos.CENTER_LEFT ); textContainer.getChildren().addAll( this.performanceViewerTitle, this.performanceViewerSubTitle ); this.setAlignment( Pos.CENTER ); this.getChildren().addAll( mainContainer ); }