本文整理汇总了Java中javafx.beans.property.IntegerProperty类的典型用法代码示例。如果您正苦于以下问题:Java IntegerProperty类的具体用法?Java IntegerProperty怎么用?Java IntegerProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntegerProperty类属于javafx.beans.property包,在下文中一共展示了IntegerProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: undo
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
private void undo() {
History.HistoryAction action = history.undo();
if (action == null) {
return;
}
if (action instanceof History.Stat) {
History.Stat statAction = (History.Stat) action;
pokemon.setStatRange(statAction);
} else if (action instanceof History.Evolution) {
pokemon.unevolve();
} else if (action instanceof History.EvAdded) {
History.EvAdded evAction = (History.EvAdded) action;
String stat = evAction.getStat();
IntegerProperty statProperty = pokemon.getEffortValues().get(stat);
statProperty.set(statProperty.get() - 1);
}
}
示例2: build
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public final Location build() {
Location location = new Location();
properties.forEach((key, property) -> {
if ("name".equals(key)) {
location.setName(((StringProperty) properties.get(key)).get());
} else if ("timestamp".equals(key)) {
location.setTimestamp(((ObjectProperty<Instant>) properties.get(key)).get());
} else if ("latitude".equals(key)) {
location.setLatitude(((DoubleProperty) properties.get(key)).get());
} else if ("longitude".equals(key)) {
location.setLongitude(((DoubleProperty) properties.get(key)).get());
} else if ("altitude".equals(key)) {
location.setAltitude(((DoubleProperty) properties.get(key)).get());
} else if ("info".equals(key)) {
location.setInfo(((StringProperty) properties.get(key)).get());
} else if ("color".equals(key)) {
location.setColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("zoomLevel".equals(key)) {
location.setZoomLevel(((IntegerProperty) properties.get(key)).get());
}
});
return location;
}
示例3: testDecrementLargeAmount
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
@Test
void testDecrementLargeAmount() {
final IntegerProperty onscreenBase = new SimpleIntegerProperty(10);
when(sequenceVisualizer.getOnScreenBasesCountProperty()).thenReturn(onscreenBase);
interact(() -> sequenceController.decrementLargeAction(mock(ActionEvent.class)));
verify(sequenceVisualizer).decrementOffset(onscreenBase.get());
}
示例4: updateOn
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public void updateOn(IntegerProperty updateCountProperty) {
updateCountProperty.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable,
Number oldValue, Number newValue) {
if (debug)
LOGGER.log(Level.INFO, "Plot "+JFXCanValuePlot.this.title+" "+newValue+" updates");
if (newValue.doubleValue()>3)
update();
}
});
}
示例5: PageService
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public PageService(Supplier<List<Map.Entry<String, CurseProject>>> entries,
ObservableList<T> tiles,
StringProperty placeholder, IntegerProperty count) {
this.entries = entries;
this.tiles = tiles;
this.placeholder = placeholder;
this.count = count;
this.setExecutor(Executors.newSingleThreadExecutor());
}
示例6: testSaveInt
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
@Test
public void testSaveInt() {
// given
String name = "int";
int value = Integer.MAX_VALUE;
IntegerProperty property = new SimpleIntegerProperty(null, name, value);
// when
PreferencesUtils.save(property, preferences);
// then
int saved = preferences.getInt(name, -1);
assertEquals(value, saved);
}
示例7: testReadWhenSavedValueIsWrongType
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
@Test
public void testReadWhenSavedValueIsWrongType() {
// given
int initialValue = 10;
IntegerProperty property = new SimpleIntegerProperty(null, "value", initialValue);
preferences.putBoolean("value", false);
// when
PreferencesUtils.read(property, preferences);
// then
assertEquals(initialValue, property.getValue().intValue());
}
示例8: PLPRegFile
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
/***
* PLPRegFile constructor. It creates all the registers and initializes to default value
*/
public PLPRegFile()
{
this.registers = new IntegerProperty[NUMBER_OF_REGISTERS];
this.regInstructions = new BooleanProperty[NUMBER_OF_REGISTERS];
for(int i = 0; i < NUMBER_OF_REGISTERS; i++)
this.registers[i] = new SimpleIntegerProperty(DEFAULT_REGISTER_VALUE);
for(int i = 0; i < NUMBER_OF_REGISTERS; i++)
this.regInstructions[i] = new SimpleBooleanProperty(false);
this.namedRegisters = buildNamedRegistersMap();
}
示例9: getRegisterValueProperty
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
/**
* This gets the value of the given register. It actually gives the property so we can bind to any other object
* @param registerName Register whose value property needs to be fetched
* @return returns the registers value propery.
*/
public IntegerProperty getRegisterValueProperty(String registerName)
{
int index = convertNameToIndex(registerName);
if (registerIndexIsValid(index))
return registers[index];
else
return null;
}
示例10: RegisterRow
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public RegisterRow(String register, IntegerProperty content,
TextField editContent)
{
this.registerName = new SimpleStringProperty(register);
this.content = content;
this.editContent = new TextField();
}
示例11: MemoryMapRow
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public MemoryMapRow(int index, String moduleName, IntegerProperty startAddress,
IntegerProperty endAddress, CheckBox enable)
{
this.index = index;
this.moduleName = moduleName;
this.startAddress = startAddress;
this.endAddress = endAddress;
this.enable = new CheckBox();
}
示例12: build
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public final AreaHeatMap build() {
final AreaHeatMap CONTROL = new AreaHeatMap();
for (String key : properties.keySet()) {
if ("prefSize".equals(key)) {
Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
} else if ("colorMapping".equals(key)) {
CONTROL.setColorMapping(((ObjectProperty<ColorMapping>) properties.get(key)).get());
} else if("useColorMapping".equals(key)) {
CONTROL.setUseColorMapping(((BooleanProperty) properties.get(key)).get());
} else if ("quality".equals(key)) {
CONTROL.setQuality(((IntegerProperty) properties.get(key)).get());
} else if ("heatMapOpacity".equals(key)) {
CONTROL.setHeatMapOpacity(((DoubleProperty) properties.get(key)).get());
} else if ("dataPointsVisible".equals(key)) {
CONTROL.setDataPointsVisible(((BooleanProperty) properties.get(key)).get());
} else if ("smoothedHull".equals(key)) {
CONTROL.setSmoothedHull(((BooleanProperty) properties.get(key)).get());
} else if ("discreteColors".equals(key)) {
CONTROL.setDiscreteColors(((BooleanProperty) properties.get(key)).get());
} else if ("noOfCloserInfluentPoints".equals(key)) {
CONTROL.setNoOfCloserInfluentPoints(((IntegerProperty) properties.get(key)).get());
}
}
if (properties.keySet().contains("dataPointsArray")) {
CONTROL.setDataPoints(((ObjectProperty<DataPoint[]>) properties.get("dataPointsArray")).get());
}
if(properties.keySet().contains("dataPointsList")) {
CONTROL.setDataPoints(((ObjectProperty<List<DataPoint>>) properties.get("dataPointsList")).get());
}
return CONTROL;
}
示例13: powerPorperty
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
default IntegerProperty powerPorperty() {
return power;
}
示例14: rampancyProperty
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public IntegerProperty rampancyProperty() {
return rampancy;
}
示例15: simulationTimeoutProperty
import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public IntegerProperty simulationTimeoutProperty() {
return simulationTimeout;
}