当前位置: 首页>>代码示例>>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;未经允许,请勿转载。