本文整理汇总了Java中javafx.beans.property.SimpleLongProperty.set方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleLongProperty.set方法的具体用法?Java SimpleLongProperty.set怎么用?Java SimpleLongProperty.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.beans.property.SimpleLongProperty
的用法示例。
在下文中一共展示了SimpleLongProperty.set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BackgroundServiceProperties
import javafx.beans.property.SimpleLongProperty; //导入方法依赖的package包/类
public BackgroundServiceProperties(long id) {
_backgroundServiceProperty = new SimpleObjectProperty<BackgroundService>();
_idProperty = new SimpleLongProperty();
_idProperty.set(id);
_stateProperty = new SimpleObjectProperty<RemoteTask.State>();
_nameProperty = new SimpleStringProperty();
_descriptionProperty = new SimpleStringProperty();
_currentActivityProperty = new SimpleStringProperty();
_errorProperty = new SimpleStringProperty();
_operationsTotalProperty = new SimpleLongProperty();
_operationsTotalProperty.set(0);
_operationsCompletedProperty = new SimpleLongProperty();
_operationsCompletedProperty.set(0);
_startTimeProperty = new SimpleObjectProperty<Date>();
_endTimeProperty = new SimpleObjectProperty<Date>();
_execTimeProperty = new SimpleObjectProperty<Double>();
_execTimeProperty.set(0.0);
_progressProperty = new SimpleObjectProperty<Double>();
_progressProperty.set(0.0);
_progressMessageProperty = new SimpleStringProperty();
_bsm = new BackgroundServiceMonitor(id, this);
startMonitor();
}
示例2: initialize
import javafx.beans.property.SimpleLongProperty; //导入方法依赖的package包/类
/**
* Called after FXML loads. Sets up scene and map and configures property bindings.
*/
public void initialize() {
try {
// create a scene and add to view
ArcGISScene scene = new ArcGISScene();
scene.setBasemap(Basemap.createImagery());
sceneView.setArcGISScene(scene);
// adds elevation to surface
Surface surface = new Surface();
surface.getElevationSources().add(new ArcGISTiledElevationSource(ELEVATION_IMAGE_SERVICE));
scene.setBaseSurface(surface);
createGraphics();
// set viewpoint of camera above graphics
Camera camera = new Camera(39, -101, 10000000, 10.0, 0.0, 0.0);
sceneView.setViewpointCamera(camera);
setupAnimation();
// automatically updates distance between graphics to view
distance = new SimpleLongProperty();
txtDistance.textProperty().bind(distance.asString());
// set beginning distance of two graphics
distance.set(Math.round(calculateDirectLinearDistance(redPoint, greenPoint)));
} catch (Exception e) {
// on any error, display the stack trace.
e.printStackTrace();
}
}