當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。