Java 类javafx.beans.property.ReadOnlyDoubleWrapper 实例源码

项目:afc    文件:Vector2ifx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public DoubleProperty lengthProperty() {
    if (this.lengthProperty == null) {
        this.lengthProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH);
        this.lengthProperty.bind(Bindings.createDoubleBinding(() ->
            Math.sqrt(lengthSquaredProperty().doubleValue()), lengthSquaredProperty()));
    }
    return this.lengthProperty;
}
项目:afc    文件:Vector2ifx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public DoubleProperty lengthSquaredProperty() {
    if (this.lengthSquareProperty == null) {
        this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED);
        this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() -> {
            return Vector2ifx.this.x.doubleValue() * Vector2ifx.this.x.doubleValue()
                    + Vector2ifx.this.y.doubleValue() * Vector2ifx.this.y.doubleValue();
        }, this.x, this.y));
    }
    return this.lengthSquareProperty;
}
项目:afc    文件:UnitVectorProperty.java   
private void init() {
    final Vector2dfx v = getGeomFactory().newVector();
    this.x = new ReadOnlyDoubleWrapper(v, MathFXAttributeNames.X);
    this.y = new ReadOnlyDoubleWrapper(v, MathFXAttributeNames.X);
    v.set(this.x, this.y);
    super.set(v);
}
项目:afc    文件:Rectangle2dfx.java   
/** Replies the property that is the width of the box.
 *
 * @return the width property.
 */
@Pure
public DoubleProperty widthProperty() {
    if (this.width == null) {
        this.width = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.WIDTH);
        this.width.bind(Bindings.subtract(maxXProperty(), minXProperty()));
    }
    return this.width;
}
项目:afc    文件:Rectangle2dfx.java   
/** Replies the property that is the height of the box.
 *
 * @return the height property.
 */
@Pure
public DoubleProperty heightProperty() {
    if (this.height == null) {
        this.height = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.HEIGHT);
        this.height.bind(Bindings.subtract(maxYProperty(), minYProperty()));
    }
    return this.height;
}
项目:afc    文件:Vector2dfx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public ReadOnlyDoubleProperty lengthProperty() {
    if (this.lengthProperty == null) {
        this.lengthProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH);
        this.lengthProperty.bind(Bindings.createDoubleBinding(() ->
                Math.sqrt(lengthSquaredProperty().doubleValue()), lengthSquaredProperty()));
    }
    return this.lengthProperty.getReadOnlyProperty();
}
项目:afc    文件:Vector2dfx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public ReadOnlyDoubleProperty lengthSquaredProperty() {
    if (this.lengthSquareProperty == null) {
        this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED);
        this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() ->
            Vector2dfx.this.x.doubleValue() * Vector2dfx.this.x.doubleValue()
                    + Vector2dfx.this.y.doubleValue() * Vector2dfx.this.y.doubleValue(), this.x, this.y));
    }
    return this.lengthSquareProperty.getReadOnlyProperty();
}
项目:afc    文件:Path2dfx.java   
/** Replies the path length property.
 *
 * @return the length property.
 */
public DoubleProperty lengthProperty() {
    if (this.length == null) {
        this.length = new ReadOnlyDoubleWrapper();
        this.length.bind(Bindings.createDoubleBinding(() -> Path2afp.calculatesPathLength(getPathIterator()),
                innerTypesProperty(), innerCoordinatesProperty()));
    }
    return this.length;
}
项目:afc    文件:Vector3ifx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public DoubleProperty lengthProperty() {
    if (this.lengthProperty == null) {
        this.lengthProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH);
        this.lengthProperty.bind(Bindings.createDoubleBinding(() ->
            Math.sqrt(lengthSquaredProperty().doubleValue()), lengthSquaredProperty()));
    }
    return this.lengthProperty;
}
项目:afc    文件:Vector3ifx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public DoubleProperty lengthSquaredProperty() {
    if (this.lengthSquareProperty == null) {
        this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED);
        this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() ->
                Vector3ifx.this.x.doubleValue() * Vector3ifx.this.x.doubleValue()
                        + Vector3ifx.this.y.doubleValue() * Vector3ifx.this.y.doubleValue()
                        + Vector3ifx.this.z.doubleValue() * Vector3ifx.this.z.doubleValue(), this.x, this.y, this.z));
    }
    return this.lengthSquareProperty;
}
项目:afc    文件:Vector3dfx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public ReadOnlyDoubleProperty lengthProperty() {
    if (this.lengthProperty == null) {
        this.lengthProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH);
        this.lengthProperty.bind(Bindings.createDoubleBinding(() ->
            Math.sqrt(lengthSquaredProperty().doubleValue()), lengthSquaredProperty()));
    }
    return this.lengthProperty.getReadOnlyProperty();
}
项目:afc    文件:Vector3dfx.java   
/** Replies the property that represents the length of the vector.
 *
 * @return the length property
 */
public ReadOnlyDoubleProperty lengthSquaredProperty() {
    if (this.lengthSquareProperty == null) {
        this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED);
        this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() ->
            Vector3dfx.this.x.doubleValue() * Vector3dfx.this.x.doubleValue()
                    + Vector3dfx.this.y.doubleValue() * Vector3dfx.this.y.doubleValue()
                    + Vector3dfx.this.z.doubleValue() * Vector3dfx.this.z.doubleValue(), this.x, this.y, this.z));
    }
    return this.lengthSquareProperty.getReadOnlyProperty();
}
项目:afc    文件:UnitVectorProperty3dfx.java   
private void init() {
    final Vector3dfx v = getGeomFactory().newVector();
    this.x = new ReadOnlyDoubleWrapper(v, MathFXAttributeNames.X);
    this.y = new ReadOnlyDoubleWrapper(v, MathFXAttributeNames.Y);
    this.z = new ReadOnlyDoubleWrapper(v, MathFXAttributeNames.Z);
    v.set(this.x, this.y, this.z);
    super.set(v);
}
项目:afc    文件:Path3dfx.java   
/** Replies the path length property.
 *
 * @return the length property.
 */
public DoubleProperty lengthProperty() {
    if (this.length == null) {
        this.length = new ReadOnlyDoubleWrapper();
        this.length.bind(Bindings.createDoubleBinding(() ->
            Path3afp.computeLength(getPathIterator()),
            innerTypesProperty(), innerCoordinatesProperty()));
    }
    return this.length;
}
项目:afc    文件:RectangularPrism3dfx.java   
/** Replies the property that is the width of the box.
 *
 * @return the width property.
 */
@Pure
public DoubleProperty widthProperty() {
    if (this.width == null) {
        this.width = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.WIDTH);
        this.width.bind(Bindings.subtract(maxXProperty(), minXProperty()));
    }
    return this.width;
}
项目:afc    文件:RectangularPrism3dfx.java   
/** Replies the property that is the height of the box.
 *
 * @return the height property.
 */
@Pure
public DoubleProperty heightProperty() {
    if (this.height == null) {
        this.height = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.HEIGHT);
        this.height.bind(Bindings.subtract(maxYProperty(), minYProperty()));
    }
    return this.height;
}
项目:afc    文件:RectangularPrism3dfx.java   
/** Replies the property that is the depth of the box.
 *
 * @return the depth property.
 */
@Pure
public DoubleProperty depthProperty() {
    if (this.depth == null) {
        this.depth = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.DEPTH);
        this.depth.bind(Bindings.subtract(maxZProperty(), minZProperty()));
    }
    return this.depth;
}
项目:afc    文件:UnitVectorProperty.java   
private ReadOnlyDoubleWrapper internalXProperty() {
    if (this.x == null) {
        init();
    }
    return this.x;
}
项目:afc    文件:UnitVectorProperty.java   
private ReadOnlyDoubleWrapper internalYProperty() {
    if (this.y == null) {
        init();
    }
    return this.y;
}
项目:afc    文件:UnitVectorProperty3dfx.java   
private ReadOnlyDoubleWrapper internalXProperty() {
    if (this.x == null) {
        init();
    }
    return this.x;
}
项目:afc    文件:UnitVectorProperty3dfx.java   
private ReadOnlyDoubleWrapper internalYProperty() {
    if (this.y == null) {
        init();
    }
    return this.y;
}
项目:afc    文件:UnitVectorProperty3dfx.java   
private ReadOnlyDoubleWrapper internalZProperty() {
    if (this.z == null) {
        init();
    }
    return this.z;
}