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))); } }
VBox.setVgrow(contentPlaceHolder, Priority.ALWAYS); contentPlaceHolder.getStyleClass().add("resize-border"); contentPlaceHolder.setBorder(new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY,
box.setPrefSize(20, 20); box.setMaxSize(20, 20); box.setBorder(new Border(new BorderStroke(control.getUnCheckedColor(), BorderStrokeStyle.SOLID, new CornerRadii(0),
dayCell.setAlignment(Pos.BASELINE_CENTER); dayCell.setBorder( new Border(new BorderStroke(Color.TRANSPARENT, BorderStrokeStyle.SOLID, CornerRadii.EMPTY,
box.setBorder(new Border(new BorderStroke(selection ? getSkinnable().getCheckedColor() : getSkinnable().getUnCheckedColor(), BorderStrokeStyle.SOLID, new CornerRadii(2),
Interpolator.EASE_BOTH))); windowDecoratorAnimation.setOnFinished((finish) -> { contentPlaceHolder.setBorder(new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY,
paletteBox.getStyleClass().add("color-palette"); paletteBox.setBackground(new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY))); paletteBox.setBorder(new Border(new BorderStroke(Color.valueOf("#9E9E9E"), BorderStrokeStyle.SOLID, CornerRadii.EMPTY,
box.setBorder(new Border(new BorderStroke(control.getUnCheckedColor(), BorderStrokeStyle.SOLID, new CornerRadii(2),
return new Border(new BorderStroke( pane.getBackground() .getFills()
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))); } }
newBorderStrokes.add(new BorderStroke( bs.getTopStroke(), bs.getRightStroke(), bs.getBottomStroke(), bs.getLeftStroke(), topStrokeStyle, bs.getRightStyle(), bs.getBottomStyle(), bs.getLeftStyle(),
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 ); }
Color inner = raised ? shadowColor : highlightColor; Color outer = raised ? highlightColor : shadowColor; BorderStroke innerStroke = new BorderStroke( inner, BorderStrokeStyle.SOLID, new CornerRadii(topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius, false), new BorderWidths(1)); BorderStroke outerStroke = new BorderStroke( outer, BorderStrokeStyle.SOLID,
box.setPrefSize(20, 20); box.setMaxSize(20, 20); box.setBorder(new Border(new BorderStroke(control.getUnCheckedColor(), BorderStrokeStyle.SOLID, new CornerRadii(0),
/** * 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; }
dayCell.setAlignment(Pos.BASELINE_CENTER); dayCell.setBorder( new Border(new BorderStroke(Color.TRANSPARENT, BorderStrokeStyle.SOLID, CornerRadii.EMPTY,
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));
box.setBorder(new Border(new BorderStroke(selection ? ((JFXCheckBox) getSkinnable()).getCheckedColor() : ((JFXCheckBox) getSkinnable()).getUnCheckedColor(), BorderStrokeStyle.SOLID, new CornerRadii(2),