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); } }
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; }
@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()); }
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(); } }); }
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()); }
@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); }
@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()); }
/*** * 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(); }
/** * 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; }
public RegisterRow(String register, IntegerProperty content, TextField editContent) { this.registerName = new SimpleStringProperty(register); this.content = content; this.editContent = new TextField(); }
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(); }
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; }
default IntegerProperty powerPorperty() { return power; }
public IntegerProperty rampancyProperty() { return rampancy; }
public IntegerProperty simulationTimeoutProperty() { return simulationTimeout; }
public IntegerProperty currentIndexProperty() { return currentIndex; }
public IntegerProperty minProperty() { return min; }
public IntegerProperty windowWidthProperty() { return windowWidth; }
public IntegerProperty editableClicksProperty() { return editableClicks; }
default IntegerProperty energyPorperty() { return energy; }
public IntegerProperty intProperty() { return property; }
private void updateEffortValues() { Map<String, IntegerProperty> effortValues = pokemon.getEffortValues(); Map<String, Integer> newEffortValues = EffortValueProvider.getEffortValues(gameService.getGame(), pokemon.getLevel()); effortValues.forEach((stat, effortValue) -> effortValue.set(newEffortValues.get(stat))); }
public IntegerProperty baseStatPassesProperty() { return baseStatPasses; }
public IntegerProperty baseStatMinProperty() { return baseStatMin; }
public IntegerProperty baseStatMaxProperty() { return baseStatMax; }
public IntegerProperty growthPassesProperty() { return growthPasses; }
public IntegerProperty windowHeightProperty() { return windowHeight; }
public IntegerProperty growthMaxProperty() { return growthMax; }
public IntegerProperty modMinProperty() { return modMin; }
public IntegerProperty rangeLongProperty() { return rangeLong; }
public IntegerProperty defenceNumberProperty() { return defenceNumber; }
public IntegerProperty maxPlayersProperty() { return maxPlayersProperty; }
public IntegerProperty growthMinProperty() { return growthMin; }
public IntegerProperty modPassesProperty() { return modPasses; }
public default IntegerProperty idPorperty() { return id; }
public IntegerProperty modMaxProperty() { return modMax; }
public IntegerProperty levelProperty() { return this.level; }