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


Java SimpleLongProperty類代碼示例

本文整理匯總了Java中javafx.beans.property.SimpleLongProperty的典型用法代碼示例。如果您正苦於以下問題:Java SimpleLongProperty類的具體用法?Java SimpleLongProperty怎麽用?Java SimpleLongProperty使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SimpleLongProperty類屬於javafx.beans.property包,在下文中一共展示了SimpleLongProperty類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PLPRegFile

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
/***
 * PLPRegFile constructor. It creates all the registers and initializes to default value
 */
public PLPRegFile()
{
	this.registers = new LongProperty[NUMBER_OF_REGISTERS];
	this.regInstructions = new BooleanProperty[NUMBER_OF_REGISTERS];
	
	for(int i = 0; i < NUMBER_OF_REGISTERS; i++)
		this.registers[i] = new SimpleLongProperty(DEFAULT_REGISTER_VALUE);
	
	for(int i = 0; i < NUMBER_OF_REGISTERS; i++)
		this.regInstructions[i] = new SimpleBooleanProperty(false);
		
	
	this.namedRegisters = buildNamedRegistersMap();
	EventRegistry.getGlobalRegistry().register(this);
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:19,代碼來源:PLPRegFile.java

示例2: TX

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
private TX(int id, String desc, BigDecimal amount){
    this.amount = new SimpleStringProperty(amount.toPlainString());
    this.desc = new SimpleStringProperty(desc);
    this.id = new SimpleIntegerProperty(id);
    this.sortID = id;

    this.timeFilled = new SimpleLongProperty(0);
    this.status = new SimpleStringProperty("Requested");
    this.pin = new SimpleStringProperty("");
}
 
開發者ID:Roxas240,項目名稱:CryptoPayAPI,代碼行數:11,代碼來源:Main.java

示例3: HourMinSecTextField

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
public HourMinSecTextField(String time) {
    super(time);
    this.time = new SimpleLongProperty();
    timePattern = Pattern.compile("\\d\\d:\\d\\d:\\d\\d");
    if (!validate(time)) {
        throw new IllegalArgumentException("Invalid time: " + time);
    }

    hours = new ReadOnlyIntegerWrapper(this, "hours");
    minutes = new ReadOnlyIntegerWrapper(this, "minutes");
    hours.bind(new TimeUnitBinding(Unit.HOURS));
    minutes.bind(new TimeUnitBinding(Unit.MINUTES));
    seconds = new ReadOnlyIntegerWrapper(this, "seconds");
    seconds.bind(new TimeUnitBinding(Unit.SECONDS));

    this.time.bind(seconds.add(minutes.multiply(60).add(hours.multiply(60))));
}
 
開發者ID:innFactory,項目名稱:JFXC,代碼行數:18,代碼來源:HourMinSecTextField.java

示例4: MediaRhythm

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
public MediaRhythm(String mediaString)
{
	Media m = new Media(mediaString);
	mediaPlayer = new MediaPlayer(m);
	mediaPlayer.pause();
	beatProperty = new SimpleLongProperty(0L);
	isPlaying = false;
	startedPauseAt = 0L;
	timer = new AnimationTimer()
	{

		@Override
		public void handle(long now)
		{
			update();
		}
	};
	
}
 
開發者ID:GeePawHill,項目名稱:contentment,代碼行數:20,代碼來源:MediaRhythm.java

示例5: TorrentFileEntry

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
public TorrentFileEntry(final String name, final String path, 
		final long length, final boolean selected, final Image fileImage) {
	this.priority = new SimpleObjectProperty<>(selected? FilePriority.NORMAL : FilePriority.SKIP);
	this.progress = new SimpleDoubleProperty();
	
	this.selected = new SimpleBooleanProperty(selected);		
	this.name = new SimpleStringProperty(name);
	this.path = new SimpleStringProperty(path);
	
	this.pieceCount = new SimpleLongProperty();
	this.firstPiece = new SimpleLongProperty();
	this.selectionLength = new SimpleLongProperty(selected? length : 0);

	this.length = new SimpleLongProperty(length);
	this.done = new SimpleLongProperty();
	
	this.fileImage = fileImage;
}
 
開發者ID:veroslav,項目名稱:jfx-torrent,代碼行數:19,代碼來源:TorrentFileEntry.java

示例6: TorrentView

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
public TorrentView(final QueuedTorrent queuedTorrent) {
    this.priority = new SimpleIntegerProperty(0);
    this.selectedLength = new SimpleLongProperty(0);
    this.queuedTorrent = queuedTorrent;

    obtainedPieces = new BitSet(this.queuedTorrent.getMetaData().getTotalPieces());
    fileTree = new FileTree(queuedTorrent.getMetaData(), queuedTorrent.getProgress());

    this.priority.addListener((obs, oldV, newV) ->
            lifeCycleChange.setValue(String.valueOf(newV.intValue())));

    queuedTorrent.statusProperty().addListener((obs, oldV, newV) -> {
        final TorrentStatusChangeEvent statusChangeEvent = new TorrentStatusChangeEvent(this, oldV, newV);
        statusChangeListeners.forEach(l -> l.onTorrentStatusChanged(statusChangeEvent));
    });

    queuedTorrent.addPriorityChangeListener(event ->
            priorityChangeListeners.forEach(l -> l.onTorrentPriorityChanged(event)));

    this.saveDirectory = queuedTorrent.getProgress().getSavePath().toString();
}
 
開發者ID:veroslav,項目名稱:jfx-torrent,代碼行數:22,代碼來源:TorrentView.java

示例7: 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

示例8: refreshPingTime

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
public void refreshPingTime() {
    XYChart.Data<String, Number> point = new XYChart.Data<>();
    point.setXValue(String.valueOf(counter));
    LongProperty responseTime = new SimpleLongProperty();

    Runnable doneListener = () -> {
        Platform.runLater(() -> {
            final long timeInMs = responseTime.get();
            System.out.println("Ping time: " + timeInMs);
            point.setYValue(timeInMs);
            pingSeries.getData().add(point);
        });
    };
    service.ping("http://" + uri, responseTime::set, errorSink::setText, doneListener);

}
 
開發者ID:AdamBien,項目名稱:floyd,代碼行數:17,代碼來源:PingPresenter.java

示例9: Rule

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
public Rule(long id,String operation, double amount, String coin, String direction, double target, 
        String currency, String comment,String executedOrderResponse, boolean active, boolean executed, 
        String market, String executedTimestamp, boolean seen, boolean visualize) {
    this.id = new SimpleLongProperty(id);
    this.operation =  new SimpleStringProperty(operation);
    this.amount = new SimpleDoubleProperty(amount);
    this.coin =  new SimpleStringProperty(coin);
    this.direction =  new SimpleStringProperty(direction);
    this.target = new SimpleDoubleProperty(target);
    this.currency =  new SimpleStringProperty(currency);
    this.comment =  new SimpleStringProperty(comment);
    this.executedOrderResponse =  new SimpleStringProperty(executedOrderResponse);
    this.active = new SimpleBooleanProperty(active);
    this.executed = new SimpleBooleanProperty(executed);   
    this.market =  new SimpleStringProperty(market);
    this.executedTimestamp =  new SimpleStringProperty(executedTimestamp);
    this.seen= new SimpleBooleanProperty(seen);
    this.visualize = new SimpleBooleanProperty(visualize);
}
 
開發者ID:adv0r,項目名稱:botcoin,代碼行數:20,代碼來源:Rule.java

示例10: beforeEach

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
@BeforeEach
void beforeEach() {
    viewPointProperty = new SimpleLongProperty(0);
    radiusProperty = new SimpleIntegerProperty(0);

    graphDimensionsCalculator = mock(GraphDimensionsCalculator.class);
    when(graphDimensionsCalculator.getViewPointProperty()).thenReturn(viewPointProperty);
    when(graphDimensionsCalculator.getRadiusProperty()).thenReturn(radiusProperty);
    when(graphDimensionsCalculator.getNodeCountProperty()).thenReturn(new SimpleIntegerProperty(65));

    graphMovementCalculator = new GraphMovementCalculator(graphDimensionsCalculator);
    graphMovementCalculator.getPanningSensitivityProperty().set(1);
    graphMovementCalculator.getZoomingSensitivityProperty().set(1);
}
 
開發者ID:ProgrammingLife2017,項目名稱:hygene,代碼行數:15,代碼來源:GraphMovementCalculatorTest.java

示例11: ProcessorManager

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
private ProcessorManager(IMediaReader toProcess, AdvancedOptions options, String baseFileName, IProcessor... processors) {
    this.toProcess = toProcess;
    this.processors = new ArrayList<>(); // TODO: Thread safe list here instead?
    this.processors.addAll(Arrays.asList(processors));
    this.queue = new LinkedBlockingQueue<>();
    this.status = new SimpleLongProperty(0l);
    this.options = options;
    this.baseFileName = baseFileName;
}
 
開發者ID:ciphertechsolutions,項目名稱:IO,代碼行數:10,代碼來源:ProcessorManager.java

示例12: testSaveLong

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
@Test
public void testSaveLong() {
  // given
  String name = "long";
  long value = Long.MAX_VALUE;
  LongProperty property = new SimpleLongProperty(null, name, value);

  // when
  PreferencesUtils.save(property, preferences);

  // then
  long saved = preferences.getLong(name, -1);
  assertEquals(value, saved);
}
 
開發者ID:wpilibsuite,項目名稱:shuffleboard,代碼行數:15,代碼來源:PreferencesUtilsTest.java

示例13: testReadLong

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
@Test
public void testReadLong() {
  // given
  String name = "long";
  long value = Long.MIN_VALUE;
  LongProperty property = new SimpleLongProperty(null, name, -value);

  // when
  preferences.putLong(name, value);

  // then
  PreferencesUtils.read(property, preferences);
  assertEquals(property.getValue().longValue(), value);
}
 
開發者ID:wpilibsuite,項目名稱:shuffleboard,代碼行數:15,代碼來源:PreferencesUtilsTest.java

示例14: bind

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
/**
 * set bindings
 * 
 * @param canProperties
 */
public void bind(Map<String, Property<?>> canProperties) {
  this.canProperties = canProperties;
  // bind values by name
  CANValuePane[] canValuePanes = { chargePane, odoPane };
  for (CANValuePane canValuePane : canValuePanes) {
    if (canValuePane != null) {
      for (Entry<String, Gauge> gaugeEntry : canValuePane.getGaugeMap()
          .entrySet()) {
        Gauge gauge = gaugeEntry.getValue();
        bind(gauge.valueProperty(),
            this.canProperties.get(gaugeEntry.getKey()), true);
      }
    }
  }
  if (dashBoardPane != null) {
    bind(dashBoardPane.getRpmGauge().valueProperty(),
        this.canProperties.get("RPM"));
    bind(dashBoardPane.rpmMax.valueProperty(),
        this.canProperties.get("RPM-max"), true);
    bind(dashBoardPane.rpmAvg.valueProperty(),
        this.canProperties.get("RPM-avg"), true);
    bind(dashBoardPane.getRpmSpeedGauge().valueProperty(),
        this.canProperties.get("RPMSpeed"));
    bind(dashBoardPane.rpmSpeedMax.valueProperty(),
        this.canProperties.get("RPMSpeed-max"), true);
    bind(dashBoardPane.rpmSpeedAvg.valueProperty(),
        this.canProperties.get("RPMSpeed-avg"), true);
  }
  if (clockPane != null) {
    ObservableValue<?> vehicleState = this.canProperties.get("vehicleState");
    SimpleLongProperty msecsProperty = (SimpleLongProperty) this.canProperties
        .get("msecs");
    if (vehicleState != null && msecsProperty != null) {
      msecsProperty.addListener((obs, oldValue, newValue) -> super.clockPane
          .updateMsecs(newValue, (State) vehicleState.getValue()));
    }
  }
}
 
開發者ID:BITPlan,項目名稱:can4eve,代碼行數:44,代碼來源:JFXTripletDisplay.java

示例15: postConstruct

import javafx.beans.property.SimpleLongProperty; //導入依賴的package包/類
/**
 * things to do / initialize after I a was constructed
 */
public void postConstruct() {
  initCanValues("ACAmps", "ACVolts", "ACPlug","ACPower", "Accelerator",
      "BatteryCapacity", "BlinkerLeft", "BlinkerRight", "BreakPedal",
      "BreakPressed", "CellCount", "CellTemperature", "CellVoltage",
      "ChargerTemp", "Climate", "DCAmps", "DCVolts", "DCPower", "DoorOpen",
      "HeadLight", "HighBeam", "Key", "MotorTemp", "Odometer", "ParkingLight",
      "Range", "RPM", "RPMSpeed", "ShifterPosition", "SOC", "Speed",
      "SteeringWheelPosition", "SteeringWheelMovement", "TripRounds",
      "TripOdo", "VentDirection", "VIN");
  // VIN2 is not used...
  // add all available PIDs to the available raw values
  for (Pid pid : getVehicleGroup().getPids()) {
    // FIXME - do we keep the convention for raw values?
    CANInfo pidInfo = pid.getFirstInfo();
    if (debug) {
      // LOGGER.log(Level.INFO,"rawValue "+pidInfo.getPid().getPid()+"
      // added");
    }
    getCanRawValues().put(pid.getPid(), new CANRawValue(pidInfo));
  }
  cpm.get("VIN").getCanValue().activate();
  // VIN.activate();
  // properties
  msecsRunningProperty = new SimpleLongProperty();
  vehicleStateProperty = new SimpleObjectProperty<Vehicle.State>();

}
 
開發者ID:BITPlan,項目名稱:can4eve,代碼行數:31,代碼來源:OBDTriplet.java


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