Java 类javafx.beans.binding.IntegerExpression 实例源码

项目:fx-log    文件:EditableListPane.java   
private void configureButtonsActivation() {
    BooleanBinding noItemSelected = list.getSelectionModel().selectedItemProperty().isNull();
    IntegerExpression selectedItemIndex = list.getSelectionModel().selectedIndexProperty();
    BooleanBinding selectedItemIsUsed = selectedItemIndex.isEqualTo(itemInUseIndex);
    BooleanBinding selectedItemIsFirst = list.getSelectionModel().selectedIndexProperty().isEqualTo(0);
    IntegerExpression lastIndex =
            Bindings.createIntegerBinding(() -> list.getItems().size() - 1, list.itemsProperty());
    BooleanBinding selectedItemIsLast = list.getSelectionModel().selectedIndexProperty().isEqualTo(lastIndex);

    addButton.disableProperty().bind(isNewItemTextValid().not());
    duplicateButton.disableProperty().bind(noItemSelected);
    removeButton.disableProperty().bind(noItemSelected.or(selectedItemIsUsed));
    moveUpButton.disableProperty().bind(noItemSelected.or(selectedItemIsFirst));
    moveDownButton.disableProperty().bind(noItemSelected.or(selectedItemIsLast));
}
项目:assertj-javafx    文件:IntegerTest.java   
@Test
public void testIntegerExpression(){
    final IntegerExpression actual = IntegerExpression.integerExpression(new SimpleIntegerProperty(12));

    assertThat(actual).hasValue(12);

    assertThat(actual).hasSameValue(actual);
}
项目:fx-log    文件:UIUtils.java   
public static BooleanBinding lastItemIsSelected(TableView<?> tableView) {
    IntegerExpression lastIndex =
            Bindings.createIntegerBinding(() -> tableView.getItems().size() - 1, tableView.itemsProperty());
    return tableView.getSelectionModel().selectedIndexProperty().isEqualTo(lastIndex);
}
项目:SmartModInserter    文件:Bindings.java   
public static IntegerExpression collectionSize(ObservableList list) {
    SimpleIntegerProperty ret = new SimpleIntegerProperty(list.size());
    list.addListener((ListChangeListener) change -> ret.set(list.size()));
    return ret;
}
项目:ISAAC    文件:CommonMenusDataProvider.java   
public IntegerExpression getObservableStringCount()
{
    return stringCount;
}
项目:ISAAC    文件:CommonMenusDataProvider.java   
public IntegerExpression getObservableObjectCount()
{
    return objectCount;
}
项目:ISAAC    文件:CommonMenusDataProvider.java   
public IntegerExpression getObservableNumberCount()
{
    return numberCount;
}
项目:ISAAC    文件:CommonMenusTaskIdProvider.java   
public IntegerExpression getObservableTaskIdCount()
{
    return taskIdCount;
}
项目:ISAAC    文件:CommonMenusNIdProvider.java   
public IntegerExpression getObservableNidCount()
{
    return nidCount;
}