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


Java BooleanProperty类代码示例

本文整理汇总了Java中javafx.beans.property.BooleanProperty的典型用法代码示例。如果您正苦于以下问题:Java BooleanProperty类的具体用法?Java BooleanProperty怎么用?Java BooleanProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BooleanProperty类属于javafx.beans.property包,在下文中一共展示了BooleanProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testClearColumnListenerSelection

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
@Test
public void testClearColumnListenerSelection() {
  BooleanProperty wasCalled = new SimpleBooleanProperty(false);
  Selection selection = new Selection("fgrfg", 4);
  InvalidationListener listener = i -> wasCalled.set(true);
  selection.columnProperty().addListener(listener);
  selection.columnProperty().set(null);
  assertTrue(wasCalled.get());
  assertTrue(selection.columnProperty().isNull().get());

  wasCalled.set(false);
  selection.columnProperty().removeListener(listener);
  selection.setColumn("Test");
  assertFalse(wasCalled.get());
  assertEquals("Test", selection.getColumn().get());
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:17,代码来源:SelectionTest.java

示例2: build

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public final HeatMap build() {
    double              width               = 400;
    double              height              = 400;
    ColorMapping        colorMapping        = ColorMapping.LIME_YELLOW_RED;
    double              eventRadius         = 15.5;
    boolean             fadeColors          = false;
    double              heatMapOpacity      = 0.5;
    OpacityDistribution opacityDistribution = OpacityDistribution.CUSTOM;

    for (String key : properties.keySet()) {
        if ("prefSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            width  = dim.getWidth();
            height = dim.getHeight();
        } else if ("width".equals(key)) {
            width = ((DoubleProperty) properties.get(key)).get();
        } else if ("height".equals(key)) {
            height = ((DoubleProperty) properties.get(key)).get();
        } else if ("colorMapping".equals(key)) {
            colorMapping = ((ObjectProperty<ColorMapping>) properties.get(key)).get();
        } else if ("eventRadius".equals(key)) {
            eventRadius = ((DoubleProperty) properties.get(key)).get();
        } else if ("fadeColors".equals(key)) {
            fadeColors = ((BooleanProperty) properties.get(key)).get();
        } else if ("heatMapOpacity".equals(key)) {
            heatMapOpacity = ((DoubleProperty) properties.get(key)).get();
        } else if ("opacityDistribution".equals(key)) {
            opacityDistribution = ((ObjectProperty<OpacityDistribution>) properties.get(key)).get();
        }
    }

    return new HeatMap(width,  height, colorMapping, eventRadius, fadeColors, heatMapOpacity, opacityDistribution);
}
 
开发者ID:HanSolo,项目名称:worldheatmap,代码行数:34,代码来源:HeatMapBuilder.java

示例3: bind

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public void bind(BooleanProperty disableProperty) {
    cbQuantityEntities.disableProperty().unbind();
    cbQuantityEntities.disableProperty().bind(disableProperty);
    
    cbQuantityTimePeriod.disableProperty().unbind();
    cbQuantityTimePeriod.disableProperty().bind(disableProperty);
}
 
开发者ID:Naoghuman,项目名称:ABC-List,代码行数:8,代码来源:TestdataTermPresenter.java

示例4: build

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public final XYSeries build() {
    final XYSeries SERIES = new XYSeries();

    if (properties.keySet().contains("itemsArray")) {
        SERIES.setItems(((ObjectProperty<XYItem[]>) properties.get("itemsArray")).get());
    }
    if(properties.keySet().contains("itemsList")) {
        SERIES.setItems(((ObjectProperty<List<XYItem>>) properties.get("itemsList")).get());
    }

    for (String key : properties.keySet()) {
        if ("name".equals(key)) {
            SERIES.setName(((StringProperty) properties.get(key)).get());
        } else if ("fill".equals(key)) {
            SERIES.setFill(((ObjectProperty<Paint>) properties.get(key)).get());
        } else if ("stroke".equals(key)) {
            SERIES.setStroke(((ObjectProperty<Paint>) properties.get(key)).get());
        } else if ("symbolFill".equals(key)) {
            SERIES.setSymbolFill(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("symbolStroke".equals(key)) {
            SERIES.setSymbolStroke(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("symbol".equals(key)) {
            SERIES.setSymbol(((ObjectProperty<Symbol>) properties.get(key)).get());
        } else if ("chartType".equals(key)) {
            SERIES.setChartType(((ObjectProperty<ChartType>) properties.get(key)).get());
        } else if ("symbolsVisible".equals(key)) {
            SERIES.setSymbolsVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("symbolSize".equals(key)) {
            SERIES.setSymbolSize(((DoubleProperty) properties.get(key)).get());
        } else if ("strokeWidth".equals(key)) {
            SERIES.setStrokeWidth(((DoubleProperty) properties.get(key)).get());
        }
    }
    return SERIES;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:36,代码来源:XYSeriesBuilder.java

示例5: setShowOnlineDatabase

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
@Override
public void setShowOnlineDatabase(BooleanProperty showOnlineDatabase) {
    showOnlineDatabase.addListener((observable, oldValue, newValue) -> {
        if (newValue == null) {
            return;
        }

        manager.toggleDatabase(newValue);
    });
}
 
开发者ID:stechy1,项目名称:drd,代码行数:11,代码来源:ShopWeaponMeleController.java

示例6: initializeName

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
private void initializeName() {
    final SubComponent subComponent = controller.getSubComponent();
    final BooleanProperty initialized = new SimpleBooleanProperty(false);

    controller.identifier.focusedProperty().addListener((observable, oldValue, newValue) -> {
        if (newValue && !initialized.get()) {
            controller.root.requestFocus();
            initialized.setValue(true);
        }
    });

    // Set the text field to the name in the model, and bind the model to the text field
    controller.identifier.setText(subComponent.getIdentifier());
    controller.identifier.textProperty().addListener((obs, oldIdentifier, newIdentifier) -> {
        subComponent.identifierProperty().unbind();
        subComponent.setIdentifier(newIdentifier);
    });

    final Runnable updateColor = () -> {
        final Color color = subComponent.getComponent().getColor();
        final Color.Intensity colorIntensity = subComponent.getComponent().getColorIntensity();

        // Set the text color for the label
        controller.identifier.setStyle("-fx-text-fill: " + color.getTextColorRgbaString(colorIntensity) + ";");
        controller.identifier.setFocusColor(color.getTextColor(colorIntensity));
        controller.identifier.setUnFocusColor(javafx.scene.paint.Color.TRANSPARENT);

        controller.originalComponentLabel.setStyle("-fx-text-fill: " + color.getTextColorRgbaString(colorIntensity) + ";");
    };

    controller.getSubComponent().getComponent().colorProperty().addListener(observable -> updateColor.run());
    updateColor.run();

    // Center the text vertically and aff a left padding of CORNER_SIZE
    controller.identifier.setPadding(new Insets(2, 0, 0, CORNER_SIZE));
    controller.identifier.setOnKeyPressed(CanvasController.getLeaveTextAreaKeyHandler());

    controller.originalComponentLabel.setPadding(new Insets(0, 5, 0, 15));
    controller.originalComponentLabel.textProperty().bind(subComponent.getComponent().nameProperty());
}
 
开发者ID:ulriknyman,项目名称:H-Uppaal,代码行数:41,代码来源:SubComponentPresentation.java

示例7: createBoolTimingDiagram

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
/**
 * Generates a boolean timing diagram.
 *
 * @param concreteSpec the concrete specification which should be used to extract the needed
 *        information
 * @param specIoVar the variable for which a diagram should be generated
 * @param globalXAxis  global x axis used for all diagrams
 * @param selection selection that should be updated when hovering with mouse
 * @param activated only update selection if true
 * @return A {@link Pair} which holds a {@link TimingDiagramController} and a {@link CategoryAxis}
 */
public static Pair<TimingDiagramController, Axis> createBoolTimingDiagram(
    ConcreteSpecification concreteSpec, ValidIoVariable specIoVar, NumberAxis globalXAxis,
    Selection selection, BooleanProperty activated) {
  ObservableList<String> categories = FXCollections.observableArrayList();
  categories.addAll("FALSE", "TRUE");
  CategoryAxis boolCategoryAxis = new CategoryAxis(categories);
  boolCategoryAxis.setPrefWidth(30);
  boolCategoryAxis.setSide(Side.LEFT);
  boolCategoryAxis.setAutoRanging(true);
  TimingDiagramController timingDiagramController = new TimingDiagramController(globalXAxis,
      boolCategoryAxis, concreteSpec, specIoVar, selection, activated);
  return new ImmutablePair<>(timingDiagramController, boolCategoryAxis);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:25,代码来源:TimingDiagramController.java

示例8: build

import javafx.beans.property.BooleanProperty; //导入依赖的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

示例9: AuthHandler

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public AuthHandler(StringProperty host, BooleanProperty ssl, StringProperty userName, StringProperty password) {
    model = new Login();

    model.hostProperty().bindBidirectional(host);
    model.sslProperty().bindBidirectional(ssl);
    model.userNameProperty().bindBidirectional(userName);
    model.passwordProperty().bindBidirectional(password);
    
    unbindHandler = () -> {
        model.hostProperty().unbindBidirectional(host);
        model.sslProperty().unbindBidirectional(ssl);
        model.userNameProperty().unbindBidirectional(userName);
        model.passwordProperty().unbindBidirectional(password);
    };

    unbindHandler = () -> {
        model.hostProperty().unbindBidirectional(host);
        model.sslProperty().unbindBidirectional(ssl);
        model.userNameProperty().unbindBidirectional(userName);
        model.passwordProperty().unbindBidirectional(password);
    };

    model.hostProperty().addListener(this::triggerLoginTest);
    model.sslProperty().addListener(this::triggerLoginTest);
    model.userNameProperty().addListener(this::triggerLoginTest);
    model.passwordProperty().addListener(this::triggerLoginTest);

    model.statusMessageProperty().set(ApplicationState.getMessage(INCOMPLETE_FIELDS));
    model.loginConfirmedProperty().set(false);

}
 
开发者ID:Adobe-Consulting-Services,项目名称:aem-epic-tool,代码行数:32,代码来源:AuthHandler.java

示例10: PLPRegFile

import javafx.beans.property.BooleanProperty; //导入依赖的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

示例11: build

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public final XYZSeries build() {
    final XYZSeries SERIES = new XYZSeries();

    if (properties.keySet().contains("itemsArray")) {
        SERIES.setItems(((ObjectProperty<XYZItem[]>) properties.get("itemsArray")).get());
    }
    if(properties.keySet().contains("itemsList")) {
        SERIES.setItems(((ObjectProperty<List<XYZItem>>) properties.get("itemsList")).get());
    }

    for (String key : properties.keySet()) {
        if ("name".equals(key)) {
            SERIES.setName(((StringProperty) properties.get(key)).get());
        } else if ("fill".equals(key)) {
            SERIES.setFill(((ObjectProperty<Paint>) properties.get(key)).get());
        } else if ("stroke".equals(key)) {
            SERIES.setStroke(((ObjectProperty<Paint>) properties.get(key)).get());
        } else if ("symbolFill".equals(key)) {
            SERIES.setSymbolFill(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("symbolStroke".equals(key)) {
            SERIES.setSymbolStroke(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("symbol".equals(key)) {
            SERIES.setSymbol(((ObjectProperty<Symbol>) properties.get(key)).get());
        } else if ("chartType".equals(key)) {
            SERIES.setChartType(((ObjectProperty<ChartType>) properties.get(key)).get());
        } else if ("symbolsVisible".equals(key)) {
            SERIES.setSymbolsVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("symbolsVisible".equals(key)) {
            SERIES.setSymbolsVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("symbolSize".equals(key)) {
            SERIES.setSymbolSize(((DoubleProperty) properties.get(key)).get());
        } else if ("strokeWidth".equals(key)) {
            SERIES.setStrokeWidth(((DoubleProperty) properties.get(key)).get());
        }
    }
    return SERIES;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:38,代码来源:XYZSeriesBuilder.java

示例12: build

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public final ChartItem build() {
    final ChartItem ITEM = new ChartItem();
    for (String key : properties.keySet()) {
        if ("name".equals(key)) {
            ITEM.setName(((StringProperty) properties.get(key)).get());
        } else if ("value".equals(key)) {
            ITEM.setValue(((DoubleProperty) properties.get(key)).get());
        } else if("fill".equals(key)) {
            ITEM.setFill(((ObjectProperty<Color>) properties.get(key)).get());
        } else if("stroke".equals(key)) {
            ITEM.setStroke(((ObjectProperty<Color>) properties.get(key)).get());
        } else if("textColor".equals(key)) {
            ITEM.setTextColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if("timestamp".equals(key)) {
            ITEM.setTimestamp(((ObjectProperty<Instant>) properties.get(key)).get());
        } else if ("timestampDateTime".equals(key)) {
            ITEM.setTimestamp(((ObjectProperty<ZonedDateTime>) properties.get(key)).get());
        } else if("symbol".equals(key)) {
            ITEM.setSymbol(((ObjectProperty<Symbol>) properties.get(key)).get());
        } else if("animated".equals(key)) {
            ITEM.setAnimated(((BooleanProperty) properties.get(key)).get());
        } else if("animationDuration".equals(key)) {
            ITEM.setAnimationDuration(((LongProperty) properties.get(key)).get());
        }
    }
    return ITEM;
}
 
开发者ID:HanSolo,项目名称:charts,代码行数:28,代码来源:ChartItemBuilder.java

示例13: initializeName

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
private void initializeName() {
    final Component component = controller.getComponent();
    final BooleanProperty initialized = new SimpleBooleanProperty(false);

    controller.name.focusedProperty().addListener((observable, oldValue, newValue) -> {
        if (newValue && !initialized.get()) {
            controller.root.requestFocus();
            initialized.setValue(true);
        }
    });

    // Set the text field to the name in the model, and bind the model to the text field
    controller.name.setText(component.getName());
    controller.name.textProperty().addListener((obs, oldName, newName) -> {
        component.nameProperty().unbind();
        component.setName(newName);
    });

    final Runnable updateColor = () -> {
        final Color color = component.getColor();
        final Color.Intensity colorIntensity = component.getColorIntensity();

        // Set the text color for the label
        controller.name.setStyle("-fx-text-fill: " + color.getTextColorRgbaString(colorIntensity) + ";");
        controller.name.setFocusColor(color.getTextColor(colorIntensity));
        controller.name.setUnFocusColor(javafx.scene.paint.Color.TRANSPARENT);
    };

    controller.getComponent().colorProperty().addListener(observable -> updateColor.run());
    updateColor.run();

    // Center the text vertically and aff a left padding of CORNER_SIZE
    controller.name.setPadding(new Insets(2, 0, 0, CORNER_SIZE));
    controller.name.setOnKeyPressed(CanvasController.getLeaveTextAreaKeyHandler());
}
 
开发者ID:ulriknyman,项目名称:H-Uppaal,代码行数:36,代码来源:ComponentPresentation.java

示例14: TimingDiagramController

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
/**
 * Instantiates a new Timing diagram controller with a category xAxis.
 *
 * @param commonXAxis the common x axis
 * @param externalYAxis the external y axis
 * @param spec the specification
 * @param ioVariable the io variable
 * @param selection the selection that should be updated
 * @param activated property that indicates if the selection should be updated
 */
public TimingDiagramController(NumberAxis commonXAxis, CategoryAxis externalYAxis,
    ConcreteSpecification spec, ValidIoVariable ioVariable, Selection selection,
    BooleanProperty activated) {
  this.activated = activated;
  this.ioVariable = ioVariable;
  this.selection = selection;
  this.concreteSpec = spec;
  this.commonXAxis = commonXAxis;
  NumberAxis xaxis = new NumberAxis(0, 0, 1);
  CategoryAxis yaxis = new CategoryAxis();
  TimingDiagramView<String> view = new TimingDiagramView<>(xaxis, yaxis);
  this.view = view;
  XYChart.Series<Number, String> seriesData =
      Plotable.toStringSeries(spec.getColumnByName(ioVariable.getName()).getCells());
  ObservableList<XYChart.Series<Number, String>> data = FXCollections.observableArrayList();
  data.add(seriesData);
  view.getData().addAll(data);

  externalYAxis.prefHeightProperty().bind(yaxis.heightProperty());
  yaxis.setAutoRanging(true);
  yaxis.setCategories(externalYAxis.getCategories());
  xaxis.lowerBoundProperty().bind(commonXAxis.lowerBoundProperty());
  xaxis.upperBoundProperty().bind(commonXAxis.upperBoundProperty());

  initCommon();
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:37,代码来源:TimingDiagramController.java

示例15: enableEffectsProperty

import javafx.beans.property.BooleanProperty; //导入依赖的package包/类
public BooleanProperty enableEffectsProperty() {
    return enableEffects;
}
 
开发者ID:hendrikebbers,项目名称:ExtremeGuiMakeover,代码行数:4,代码来源:MovieView.java


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