当前位置: 首页>>代码示例>>Java>>正文


Java DoubleProperty.set方法代码示例

本文整理汇总了Java中javafx.beans.property.DoubleProperty.set方法的典型用法代码示例。如果您正苦于以下问题:Java DoubleProperty.set方法的具体用法?Java DoubleProperty.set怎么用?Java DoubleProperty.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.beans.property.DoubleProperty的用法示例。


在下文中一共展示了DoubleProperty.set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startPanAnimation

import javafx.beans.property.DoubleProperty; //导入方法依赖的package包/类
private void startPanAnimation(double velocity, Timeline timeline, DoubleProperty animatedPan, DoubleProperty pan) {
    if (isRunning(timeline)) {
        return;
    }
    double durationInMillis = 1e10;
    double distance = velocity * durationInMillis;
    animatedPan.set(pan.get());
    KeyValue keyValue = new KeyValue(animatedPan, animatedPan.get() - distance);
    KeyFrame keyFrame = new KeyFrame(Duration.millis(durationInMillis), keyValue);
    timeline.getKeyFrames().setAll(keyFrame);
    timeline.playFromStart();
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:13,代码来源:DragBehavior.java

示例2: bind

import javafx.beans.property.DoubleProperty; //导入方法依赖的package包/类
public void bind(final DoubleProperty property, final String propertyName) {
    String value = props.getProperty(propertyName);
    if (value != null) {
        property.set(Double.valueOf(value));
    }
    property.addListener(new InvalidationListener() {

        @Override
        public void invalidated(Observable o) {
            props.setProperty(propertyName, property.getValue().toString());
        }
    });
}
 
开发者ID:comtel2000,项目名称:mokka7,代码行数:14,代码来源:SessionManager.java

示例3: setPointCircles

import javafx.beans.property.DoubleProperty; //导入方法依赖的package包/类
public void setPointCircles(MouseEvent event, Circle controlPointCircle, DoubleProperty controlPointX,
                            DoubleProperty controlPointY) {

    double x = event.getX() + controlPointCircle.getLayoutX();
    double y = event.getY() + controlPointCircle.getLayoutY();
    double dataX = getXAxis().getValueForDisplay(x).doubleValue();
    double dataY = getYAxis().getValueForDisplay(y).doubleValue();
    controlPointX.set(clamp(dataX));
    controlPointY.set(clamp(dataY));
    requestChartLayout();
}
 
开发者ID:EricCanull,项目名称:fxexperience2,代码行数:12,代码来源:SplineEditor.java

示例4: configureDividerPosition

import javafx.beans.property.DoubleProperty; //导入方法依赖的package包/类
private void configureDividerPosition() {
    String stored = propertyStore.getProperty(PropertyKey.DIVIDER_POSITION);
    DoubleProperty dividerPosition = outerPane.getDividers().get(0).positionProperty();
    if (stored != null && MathFunctions.canParseDouble(stored)) {
        initialDividerPosition = Double.parseDouble(stored);
    } else {
        initialDividerPosition = DEFAULT_DIVIDER_POSITION;
    }
    dividerPosition.set(initialDividerPosition);
    dividerPosition.addListener((v, o, n) -> propertyStore.setProperty(PropertyKey.DIVIDER_POSITION, "" + n.doubleValue()));
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:12,代码来源:AnimationEditorComponent.java

示例5: progressSet

import javafx.beans.property.DoubleProperty; //导入方法依赖的package包/类
private static void progressSet(DoubleProperty progress, double value) {
    if (progress != null) progress.set(value);
}
 
开发者ID:RodrigoSantiago,项目名称:VortexCompiler,代码行数:4,代码来源:Library.java

示例6: onAnimatedPanChanged

import javafx.beans.property.DoubleProperty; //导入方法依赖的package包/类
private void onAnimatedPanChanged(DoubleProperty animatedPan, DoubleProperty pan) {
    pan.set(Math.round(animatedPan.get()));
    if (onDragged != null) {
        onDragged.accept(calculateDragDelta());
    }
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:7,代码来源:DragBehavior.java


注:本文中的javafx.beans.property.DoubleProperty.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。