當前位置: 首頁>>代碼示例>>Java>>正文


Java SimpleLongProperty.set方法代碼示例

本文整理匯總了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();
}
 
開發者ID:uom-daris,項目名稱:daris,代碼行數:24,代碼來源:BackgroundServiceProperties.java

示例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();
  }
}
 
開發者ID:Esri,項目名稱:arcgis-runtime-samples-java,代碼行數:36,代碼來源:CalculateDistance3dController.java


注:本文中的javafx.beans.property.SimpleLongProperty.set方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。