/* * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javafx.scene.shape; /** Builder class for javafx.scene.shape.Shape @see javafx.scene.shape.Shape @deprecated This class is deprecated and will be removed in the next version * @since JavaFX 2.0 */ @javax.annotation.Generated("Generated by javafx.builder.processor.BuilderProcessor") @Deprecated public abstract class ShapeBuilder> extends javafx.scene.NodeBuilder { protected ShapeBuilder() { } private int __set; private void __set(int i) { __set |= 1 << i; } public void applyTo(javafx.scene.shape.Shape x) { super.applyTo(x); int set = __set; while (set != 0) { int i = Integer.numberOfTrailingZeros(set); set &= ~(1 << i); switch (i) { case 0: x.setFill(this.fill); break; case 1: x.setSmooth(this.smooth); break; case 2: x.setStroke(this.stroke); break; case 3: x.getStrokeDashArray().addAll(this.strokeDashArray); break; case 4: x.setStrokeDashOffset(this.strokeDashOffset); break; case 5: x.setStrokeLineCap(this.strokeLineCap); break; case 6: x.setStrokeLineJoin(this.strokeLineJoin); break; case 7: x.setStrokeMiterLimit(this.strokeMiterLimit); break; case 8: x.setStrokeType(this.strokeType); break; case 9: x.setStrokeWidth(this.strokeWidth); break; } } } private javafx.scene.paint.Paint fill; /** Set the value of the {@link javafx.scene.shape.Shape#getFill() fill} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B fill(javafx.scene.paint.Paint x) { this.fill = x; __set(0); return (B) this; } private boolean smooth; /** Set the value of the {@link javafx.scene.shape.Shape#isSmooth() smooth} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B smooth(boolean x) { this.smooth = x; __set(1); return (B) this; } private javafx.scene.paint.Paint stroke; /** Set the value of the {@link javafx.scene.shape.Shape#getStroke() stroke} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B stroke(javafx.scene.paint.Paint x) { this.stroke = x; __set(2); return (B) this; } private java.util.Collection strokeDashArray; /** Add the given items to the List of items in the {@link javafx.scene.shape.Shape#getStrokeDashArray() strokeDashArray} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeDashArray(java.util.Collection x) { this.strokeDashArray = x; __set(3); return (B) this; } /** Add the given items to the List of items in the {@link javafx.scene.shape.Shape#getStrokeDashArray() strokeDashArray} property for the instance constructed by this builder. */ public B strokeDashArray(java.lang.Double... x) { return strokeDashArray(java.util.Arrays.asList(x)); } private double strokeDashOffset; /** Set the value of the {@link javafx.scene.shape.Shape#getStrokeDashOffset() strokeDashOffset} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeDashOffset(double x) { this.strokeDashOffset = x; __set(4); return (B) this; } private javafx.scene.shape.StrokeLineCap strokeLineCap; /** Set the value of the {@link javafx.scene.shape.Shape#getStrokeLineCap() strokeLineCap} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeLineCap(javafx.scene.shape.StrokeLineCap x) { this.strokeLineCap = x; __set(5); return (B) this; } private javafx.scene.shape.StrokeLineJoin strokeLineJoin; /** Set the value of the {@link javafx.scene.shape.Shape#getStrokeLineJoin() strokeLineJoin} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeLineJoin(javafx.scene.shape.StrokeLineJoin x) { this.strokeLineJoin = x; __set(6); return (B) this; } private double strokeMiterLimit; /** Set the value of the {@link javafx.scene.shape.Shape#getStrokeMiterLimit() strokeMiterLimit} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeMiterLimit(double x) { this.strokeMiterLimit = x; __set(7); return (B) this; } private javafx.scene.shape.StrokeType strokeType; /** Set the value of the {@link javafx.scene.shape.Shape#getStrokeType() strokeType} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeType(javafx.scene.shape.StrokeType x) { this.strokeType = x; __set(8); return (B) this; } private double strokeWidth; /** Set the value of the {@link javafx.scene.shape.Shape#getStrokeWidth() strokeWidth} property for the instance constructed by this builder. */ @SuppressWarnings("unchecked") public B strokeWidth(double x) { this.strokeWidth = x; __set(9); return (B) this; } }