本文整理汇总了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);
}
示例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("");
}
示例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))));
}
示例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();
}
};
}
示例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;
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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()));
}
}
}
示例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>();
}