当前位置: 首页>>代码示例>>Java>>正文


Java IntegerProperty类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:wartab,项目名称:gen7-iv-calculator,代码行数:18,代码来源:CalculatorPresenter.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:25,代码来源:LocationBuilder.java

示例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());
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:9,代码来源:SequenceControllerTest.java

示例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();
    }

   });
}
 
开发者ID:BITPlan,项目名称:can4eve,代码行数:15,代码来源:JFXCanValuePlot.java

示例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());
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:10,代码来源:PageService.java

示例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);
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:15,代码来源:PreferencesUtilsTest.java

示例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());
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:14,代码来源:PreferencesUtilsTest.java

示例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();
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:18,代码来源:PLPRegFile.java

示例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;
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:14,代码来源:PLPRegFile.java

示例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();
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:8,代码来源:CpuWindow.java

示例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();
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:10,代码来源:CpuWindow.java

示例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;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:33,代码来源:AreaHeatMapBuilder.java

示例13: powerPorperty

import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
default IntegerProperty powerPorperty() {
  return power;
}
 
开发者ID:comtel2000,项目名称:fritz-home-skill,代码行数:4,代码来源:Powermeter.java

示例14: rampancyProperty

import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public IntegerProperty rampancyProperty() {
    return rampancy;
}
 
开发者ID:stechy1,项目名称:drd,代码行数:4,代码来源:MeleWeaponEntry.java

示例15: simulationTimeoutProperty

import javafx.beans.property.IntegerProperty; //导入依赖的package包/类
public IntegerProperty simulationTimeoutProperty() {
  return simulationTimeout;
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:4,代码来源:GlobalConfig.java


注:本文中的javafx.beans.property.IntegerProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。