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