本文整理匯總了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();
}
}