Search in sources :

Example 1 with BorderWidths

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);
}
Also used : BorderWidths(javafx.scene.layout.BorderWidths) ArrayList(java.util.ArrayList) BorderStroke(javafx.scene.layout.BorderStroke) Border(javafx.scene.layout.Border)

Example 2 with BorderWidths

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);
}
Also used : BorderWidths(javafx.scene.layout.BorderWidths) WidgetColor(org.csstudio.display.builder.model.properties.WidgetColor) Color(javafx.scene.paint.Color) CommonWidgetProperties.propBorderColor(org.csstudio.display.builder.model.properties.CommonWidgetProperties.propBorderColor) BorderStroke(javafx.scene.layout.BorderStroke) Border(javafx.scene.layout.Border)

Example 3 with BorderWidths

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))));
}
Also used : Background(javafx.scene.layout.Background) BorderWidths(javafx.scene.layout.BorderWidths) BackgroundFill(javafx.scene.layout.BackgroundFill) BorderStroke(javafx.scene.layout.BorderStroke) CornerRadii(javafx.scene.layout.CornerRadii) Border(javafx.scene.layout.Border)

Example 4 with BorderWidths

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();
}
Also used : Background(javafx.scene.layout.Background) BorderWidths(javafx.scene.layout.BorderWidths) Canvas(javafx.scene.canvas.Canvas) BackgroundFill(javafx.scene.layout.BackgroundFill) BorderStroke(javafx.scene.layout.BorderStroke) Pane(javafx.scene.layout.Pane) Border(javafx.scene.layout.Border)

Example 5 with BorderWidths

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);
}
Also used : BorderWidths(javafx.scene.layout.BorderWidths) BorderStroke(javafx.scene.layout.BorderStroke) CornerRadii(javafx.scene.layout.CornerRadii) Border(javafx.scene.layout.Border)

Aggregations

Border (javafx.scene.layout.Border)17 BorderStroke (javafx.scene.layout.BorderStroke)17 BorderWidths (javafx.scene.layout.BorderWidths)17 Background (javafx.scene.layout.Background)10 BackgroundFill (javafx.scene.layout.BackgroundFill)10 CornerRadii (javafx.scene.layout.CornerRadii)9 Insets (javafx.geometry.Insets)6 ArrayList (java.util.ArrayList)3 Text (javafx.scene.text.Text)3 List (java.util.List)2 ObservableList (javafx.collections.ObservableList)2 Pane (javafx.scene.layout.Pane)2 Region (javafx.scene.layout.Region)2 StackPane (javafx.scene.layout.StackPane)2 Color (javafx.scene.paint.Color)2 Rectangle (javafx.scene.shape.Rectangle)2 Club (com.kendy.entity.Club)1 LMSumInfo (com.kendy.entity.LMSumInfo)1 IGargoyleChartAdapter (com.kyj.fx.voeditor.visual.framework.adapter.IGargoyleChartAdapter)1 ValueUtil (com.kyj.fx.voeditor.visual.util.ValueUtil)1