/***
* 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);
}
java类javafx.beans.property.SimpleLongProperty的实例源码
PLPRegFile.java 文件源码
项目:WebPLP
阅读 50
收藏 0
点赞 0
评论 0
Main.java 文件源码
项目:CryptoPayAPI
阅读 37
收藏 0
点赞 0
评论 0
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("");
}
HourMinSecTextField.java 文件源码
项目:JFXC
阅读 35
收藏 0
点赞 0
评论 0
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))));
}
MediaRhythm.java 文件源码
项目:contentment
阅读 35
收藏 0
点赞 0
评论 0
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();
}
};
}
TorrentFileEntry.java 文件源码
项目:jfx-torrent
阅读 38
收藏 0
点赞 0
评论 0
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;
}
TorrentView.java 文件源码
项目:jfx-torrent
阅读 91
收藏 0
点赞 0
评论 0
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();
}
BackgroundServiceProperties.java 文件源码
项目:daris
阅读 32
收藏 0
点赞 0
评论 0
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();
}
BackgroundServiceProperties.java 文件源码
项目:daris
阅读 34
收藏 0
点赞 0
评论 0
public BackgroundServiceProperties(BackgroundService bs) {
_backgroundServiceProperty = new SimpleObjectProperty<BackgroundService>();
_backgroundServiceProperty.set(bs);
_idProperty = new SimpleLongProperty();
_idProperty.set(bs.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();
checked(bs);
_bsm = new BackgroundServiceMonitor(bs.id(), this);
startMonitor();
}
PingPresenter.java 文件源码
项目:floyd
阅读 42
收藏 0
点赞 0
评论 0
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);
}
Rule.java 文件源码
项目:botcoin
阅读 37
收藏 0
点赞 0
评论 0
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);
}
GraphMovementCalculatorTest.java 文件源码
项目:hygene
阅读 31
收藏 0
点赞 0
评论 0
@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);
}
ProcessorManager.java 文件源码
项目:IO
阅读 40
收藏 0
点赞 0
评论 0
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;
}
PreferencesUtilsTest.java 文件源码
项目:shuffleboard
阅读 41
收藏 0
点赞 0
评论 0
@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);
}
PreferencesUtilsTest.java 文件源码
项目:shuffleboard
阅读 38
收藏 0
点赞 0
评论 0
@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);
}
JFXTripletDisplay.java 文件源码
项目:can4eve
阅读 45
收藏 0
点赞 0
评论 0
/**
* 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()));
}
}
}
OBDTriplet.java 文件源码
项目:can4eve
阅读 43
收藏 0
点赞 0
评论 0
/**
* 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>();
}
TestAppGUI.java 文件源码
项目:can4eve
阅读 34
收藏 0
点赞 0
评论 0
@Test
public void testBinding() {
SimpleLongProperty lp = new SimpleLongProperty();
lp.setValue(4711);
keepBinding = Bindings.createLongBinding(() -> callMe(lp.get()), lp);
lp.addListener((obs, oldValue, newValue) -> callMe(newValue));
lp.setValue(1);
assertEquals(2, calledEffect);
assertEquals(2, keepBinding.get());
}
GuestRegistryScreenController.java 文件源码
项目:git-rekt
阅读 39
收藏 0
点赞 0
评论 0
/**
* Initializes the FXML controller class.
*
* Called by JavaFX.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
// Prepare to display the data
bookings = FXCollections.observableArrayList();
registryTable.setItems(bookings);
guestNameColumn.setCellValueFactory(
(param) -> {
return new SimpleStringProperty(
String.valueOf(param.getValue().getGuest().getLastName() + " , "
+ param.getValue().getGuest().getFirstName())
);
}
);
checkedInColumn.setCellValueFactory((param) -> {
return new SimpleBooleanProperty(param.getValue().isCheckedIn());
});
// Use a check box to display booleans rather than a string
checkedInColumn.setCellFactory(
(param) -> {
return new CheckBoxTableCell<>();
}
);
bookingNumberColumn.setCellValueFactory(
(param) -> {
return new SimpleLongProperty(
param.getValue().getId()
).asObject();
}
);
// Load the registry data from the database
BookingService bookingService = new BookingService();
bookings.addAll(bookingService.getDailyRegistry());
}
Sale.java 文件源码
项目:alchem
阅读 37
收藏 0
点赞 0
评论 0
public Sale(String date, Long billNumber, String patientName, String doctorName, String companyName, String mode, Float amount) {
this.date = new SimpleStringProperty(date);
this.patientName = new SimpleStringProperty(patientName);
this.doctorName = new SimpleStringProperty(doctorName);
this.companyName = new SimpleStringProperty(companyName);
this.mode = new SimpleStringProperty(mode);
this.billNumber = new SimpleLongProperty(billNumber);
this.amount = new SimpleFloatProperty(amount);
}
Purchase.java 文件源码
项目:alchem
阅读 39
收藏 0
点赞 0
评论 0
public Purchase(String date, Long billNumber, String wholesalerName, String mode, Float amount)
{
this.date=new SimpleStringProperty(date);
this.wholesalerName=new SimpleStringProperty(wholesalerName);
this.mode=new SimpleStringProperty(mode);
this.billNumber=new SimpleLongProperty(billNumber);
this.amount=new SimpleFloatProperty(amount);
}
Books.java 文件源码
项目:mountieLibrary
阅读 34
收藏 0
点赞 0
评论 0
/**
* Sets the Books ISBN
* @param isbn the books isbn number.
* @throws IllegalArgumentException in case a smaller or bigger ISBN is entered.
*/
public void setISBN(long isbn) {
if(isbn < 99999999999L || isbn > 1000000000000L)
throw new IllegalArgumentException("ISBN mus bee 12 digits.");
this.isbn = new SimpleLongProperty(isbn);
}
HourMinTextField.java 文件源码
项目:JFXC
阅读 36
收藏 0
点赞 0
评论 0
public HourMinTextField(String time) {
super(time);
this.time = new SimpleLongProperty();
timePattern = Pattern.compile("\\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));
this.time.bind(minutes.add(hours.multiply(60)));
}
Client.java 文件源码
项目:hotel
阅读 49
收藏 0
点赞 0
评论 0
public Client(Long id, String firstname, String lastname, String phone, String note) {
this.Id = new SimpleLongProperty(id);
this.FirstName = new SimpleStringProperty(firstname);
this.LastName = new SimpleStringProperty(lastname);
this.Phone = new SimpleStringProperty(phone);
this.Note = new SimpleStringProperty(note);
}
Offer.java 文件源码
项目:hotel
阅读 35
收藏 0
点赞 0
评论 0
public Offer(Long id, String name, String description, String price, String settings) {
this.Id = new SimpleLongProperty(id);
this.Name = new SimpleStringProperty(name);
this.Description = new SimpleStringProperty(description);
this.Price = new SimpleStringProperty(price);
this.Settings = new SimpleStringProperty(settings);
}
User.java 文件源码
项目:hotel
阅读 36
收藏 0
点赞 0
评论 0
public User(Long id, String login, String email, String role, Boolean isActive) {
this.Id = new SimpleLongProperty(id);
this.Login = new SimpleStringProperty(login);
this.Email = new SimpleStringProperty(email);
this.Role = new SimpleStringProperty(role);
this.IsActive = new SimpleBooleanProperty(isActive);
}
Room.java 文件源码
项目:hotel
阅读 40
收藏 0
点赞 0
评论 0
public Room(Long id, String number, String units, String type, String description, String price,
String availability, String buildingId) {
this.Id = new SimpleLongProperty(id);
this.Number = new SimpleStringProperty(number);
this.Units = new SimpleStringProperty(units);
this.Type = new SimpleStringProperty(type);
this.Description = new SimpleStringProperty(description);
this.Price = new SimpleStringProperty(price);
this.Availability = new SimpleStringProperty(availability);
this.BuildingId = new SimpleStringProperty(buildingId);
}
Building.java 文件源码
项目:hotel
阅读 36
收藏 0
点赞 0
评论 0
public Building(Long id, String number, String name, String description, String streetAndHomeNumber,
String cityAndPostalCode, String country, String longitude, String latitude) {
this.Id = new SimpleLongProperty(id);
this.Number = new SimpleStringProperty(number);
this.Name = new SimpleStringProperty(name);
this.Description = new SimpleStringProperty(description);
this.FirstLine = new SimpleStringProperty(streetAndHomeNumber);
this.SecondLine = new SimpleStringProperty(cityAndPostalCode);
this.ThridLine = new SimpleStringProperty(country);
this.Longitude = new SimpleStringProperty(longitude);
this.Latitude = new SimpleStringProperty(latitude);
}
CalculateDistance3dController.java 文件源码
项目:arcgis-runtime-samples-java
阅读 32
收藏 0
点赞 0
评论 0
/**
* 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();
}
}
RoomController.java 文件源码
项目:share_all
阅读 36
收藏 0
点赞 0
评论 0
FileItem(File file, FileType type) {
this.date = new Date();
this.user = new User();
this.file = file;
this.type = type;
this.progressProperty = new SimpleDoubleProperty((double) 0);
this.sizeProperty = new SimpleLongProperty(0);
this.isPlayingProperty = new SimpleBooleanProperty(false);
this.isProgressingProperty = new SimpleBooleanProperty(false);
this.isPhantomProperty = new SimpleBooleanProperty(true);
}
StationOverviewController.java 文件源码
项目:jarvisCli
阅读 38
收藏 0
点赞 0
评论 0
/**
* Initializes the controller class. This method is automatically called
* after the fxml file has been loaded.
*/
private void initialize() {
// Initialize the person table with the two columns.
stationNameColumn.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue(), "name"));
stationBlackMarketFlagColumn.setCellValueFactory(cellData -> new SimpleBooleanProperty(cellData.getValue(), "blackMarket"));
stationDataAgeColumn.setCellValueFactory(cellData -> new SimpleLongProperty(cellData.getValue(), "date").asObject());
}