public void updateDisabled() { final boolean disabled = control.isDisable(); line.setBorder(!disabled ? Border.EMPTY : new Border(new BorderStroke(control.getUnFocusColor(), BorderStrokeStyle.DASHED, CornerRadii.EMPTY, new BorderWidths(1)))); line.setBackground(new Background( new BackgroundFill(disabled ? Color.TRANSPARENT : control.getUnFocusColor(), CornerRadii.EMPTY, Insets.EMPTY))); } }
BorderStrokeStyle.SOLID, new CornerRadii(0), new BorderWidths(lineThick))));
BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(5)))); dayCell.setFont(Font.font(ROBOTO, FontWeight.BOLD, 12)); dayCells.add(dayCell);
BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 4, 4, 4))));
BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(2))));
BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(2)))); box.getChildren().setAll(indeterminateMark, mark);
BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 4, 4, 4)))); contentPlaceHolder.getStyleClass().add("resize-border"); });
BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 4, 4,
private BorderStroke buildStroke() { return new BorderStroke( null, BorderStrokeStyle.NONE, null, new BorderWidths(top, right, bottom, left), Insets.EMPTY); } }
/** * A factory method for creating a simple solid line border with no corner radius.<br/> * @param paint The color, gradient, or image pattern to use. * @param thickness The border thickness. * @return A new border object. */ public static Border createSimpleLineBorder(Paint paint, double thickness) { final Preconditions p = new Preconditions(); p.checkNull(paint, "PARAM(paint) cannot be null."); p.checkArgument(0d <= thickness, "PARAM(thickness) must be greater than or equal to zero."); p.reportViolations(); return new Border(new BorderStroke(paint, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(thickness))); } // END createSimpleLineBorder
public void updateDisabled() { final boolean disabled = control.isDisable(); line.setBorder(!disabled ? Border.EMPTY : new Border(new BorderStroke(control.getUnFocusColor(), BorderStrokeStyle.DASHED, CornerRadii.EMPTY, new BorderWidths(1)))); line.setBackground(new Background( new BackgroundFill(disabled ? Color.TRANSPARENT : control.getUnFocusColor(), CornerRadii.EMPTY, Insets.EMPTY))); } }
private void update() { this.setBorder( new Border( new BorderStroke( this.borderColor, BorderStrokeStyle.SOLID, new CornerRadii( 30 ), new BorderWidths( 1.25 ), null ) ) ); this.setBackground( new Background( new BackgroundFill( this.backgroundColor, new CornerRadii( 30 ), null ) ) ); this.setPadding( new Insets( 10, 15, 10, 15 ) ); this.setTextFill( this.foregroundColor ); }
BorderStrokeStyle.SOLID, new CornerRadii(topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius, false), new BorderWidths(1)); BorderStroke outerStroke = new BorderStroke( outer, BorderStrokeStyle.SOLID, new CornerRadii(topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius, false), new BorderWidths(1), new Insets(1));
/** * Builds the {@link Border} and {@link Borders#addBorder(Border) adds it} * to the list of borders to wrap around the given Node (which will be * constructed and returned when {@link Borders#build()} is called. */ public Borders build() { BorderStroke borderStroke = new BorderStroke( topColor, rightColor, bottomColor, leftColor, strokeStyle, strokeStyle, strokeStyle, strokeStyle, new CornerRadii(topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius, false), new BorderWidths(topThickness, rightThickness, bottomThickness, leftThickness), null); BorderStroke outerPadding = new EmptyBorders(parent) .padding(outerTopPadding, outerRightPadding, outerBottomPadding, outerLeftPadding) .buildStroke(); BorderStroke innerPadding = new EmptyBorders(parent) .padding(innerTopPadding, innerRightPadding, innerBottomPadding, innerLeftPadding) .buildStroke(); parent.addBorder(new StrokeBorder(null, outerPadding)); parent.addBorder(new StrokeBorder(title, borderStroke)); parent.addBorder(new StrokeBorder(null, innerPadding)); return parent; }
BorderStrokeStyle.SOLID, new CornerRadii(8), new BorderWidths(2))); private static final Border red = new Border(new BorderStroke(Color.RED, BorderStrokeStyle.SOLID, new CornerRadii(8), new BorderWidths(2))); private static final Border blue = new Border(new BorderStroke(Color.BLUE, BorderStrokeStyle.SOLID, new CornerRadii(8), new BorderWidths(2))); private static final Color yellow = Color.YELLOW.deriveColor(0, .9, 1, 1);
display.setAlignment(Pos.CENTER_RIGHT); VBox.setVgrow(display, Priority.NEVER); display.setBorder(new Border(new BorderStroke(Color.GREEN, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(3))));
BorderStrokeStyle.SOLID, new CornerRadii(0), new BorderWidths(lineThick))));
BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(5)))); dayCell.setFont(Font.font(ROBOTO, FontWeight.BOLD, 12)); dayCells.add(dayCell);
BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 4, 4, 4))));
detailViewWrapper.setBorder(new Border(new BorderStroke(Color.GREY, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(2)))); detailViewWrapper.setPadding(new Insets(3)); VBox.setMargin(detailView,new Insets(3,0,0,0));