use of javafx.scene.layout.BorderWidths in project cryptomator by cryptomator.
the class DraggableListCell method createDropPositionBorder.
private Border createDropPositionBorder(double verticalCursorPosition) {
boolean isUpperHalf = verticalCursorPosition < this.getHeight() / 2.0;
final double topBorder = isUpperHalf ? DROP_LINE_WIDTH : 0.0;
final double bottomBorder = !isUpperHalf ? DROP_LINE_WIDTH : 0.0;
final BorderWidths borderWidths = new BorderWidths(topBorder, 0.0, bottomBorder, 0.0);
final BorderStroke dragStroke = new BorderStroke(DROP_LINE_COLOR, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, borderWidths, Insets.EMPTY);
final List<BorderStroke> strokes = new ArrayList<BorderStroke>(defaultBorderStrokes);
strokes.add(0, dragStroke);
return new Border(strokes, defaultBorderImages);
}
use of javafx.scene.layout.BorderWidths in project org.csstudio.display.builder by kasemir.
the class RegionBaseRepresentation method custom_border_changed.
private void custom_border_changed(final WidgetProperty<?> property, final Object old_value, final Object new_value) {
final Integer width = border_width_prop.getValue();
if (width <= 0)
custom_border = null;
else {
final Color color = JFXUtil.convert(border_color_prop.getValue());
custom_border = new Border(new BorderStroke(color, solid, CornerRadii.EMPTY, new BorderWidths(width)));
}
dirty_border.mark();
toolkit.scheduleUpdate(this);
}
use of javafx.scene.layout.BorderWidths in project blue by kunstmusik.
the class BSBGroupView method updateBorderColor.
private void updateBorderColor() {
label.setBackground(new Background(new BackgroundFill(bsbGroup.getBorderColor(), new CornerRadii(4, 4, 0, 0, false), Insets.EMPTY)));
resizePane.setBorder(new Border(new BorderStroke(bsbGroup.getBorderColor(), BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(1))));
}
use of javafx.scene.layout.BorderWidths in project tilesfx by HanSolo.
the class SunburstChart method initGraphics.
// ******************** Initialization ************************************
private void initGraphics() {
if (Double.compare(getPrefWidth(), 0.0) <= 0 || Double.compare(getPrefHeight(), 0.0) <= 0 || Double.compare(getWidth(), 0.0) <= 0 || Double.compare(getHeight(), 0.0) <= 0) {
if (getPrefWidth() > 0 && getPrefHeight() > 0) {
setPrefSize(getPrefWidth(), getPrefHeight());
} else {
setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
}
}
segmentPane = new Pane();
chartCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
chartCanvas.setMouseTransparent(true);
chartCtx = chartCanvas.getGraphicsContext2D();
pane = new Pane(segmentPane, chartCanvas);
pane.setBackground(new Background(new BackgroundFill(backgroundPaint, CornerRadii.EMPTY, Insets.EMPTY)));
pane.setBorder(new Border(new BorderStroke(borderPaint, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(borderWidth))));
getChildren().setAll(pane);
prepareData();
}
use of javafx.scene.layout.BorderWidths in project tilesfx by HanSolo.
the class PlusMinusTileSkin method decrement.
private void decrement() {
minusLabel.setTextFill(tile.getActiveColor());
minusLabel.setBorder(new Border(new BorderStroke(tile.getActiveColor(), BorderStrokeStyle.SOLID, new CornerRadii(1024), new BorderWidths(size * 0.01))));
double newValue = clamp(minValue, maxValue, tile.getValue() - tile.getIncrement());
tile.setValue(newValue);
}
Aggregations