本文整理汇总了Java中javafx.scene.control.CheckBox.selectedProperty方法的典型用法代码示例。如果您正苦于以下问题:Java CheckBox.selectedProperty方法的具体用法?Java CheckBox.selectedProperty怎么用?Java CheckBox.selectedProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.CheckBox
的用法示例。
在下文中一共展示了CheckBox.selectedProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: executionOnNonInstructionMemorySelection
import javafx.scene.control.CheckBox; //导入方法依赖的package包/类
private Node executionOnNonInstructionMemorySelection( SimulatorSettingDetails settingDetails )
{
HBox hBox = new HBox();
//TODO ensure numerical values only
CheckBox executionOfNonInstructionMemoryCheckBox = new CheckBox("Allow execution of non-instruction memory");
executionOfNonInstructionMemoryCheckBox.setAllowIndeterminate(false);
executionOfNonInstructionMemoryCheckBox
.setSelected(Boolean.valueOf(settingDetails.getAllowExecutionOfNonInstructionMemory()));
allowExecutionOfNonInstructionMemoryModel = executionOfNonInstructionMemoryCheckBox.selectedProperty();
hBox.getChildren().add(executionOfNonInstructionMemoryCheckBox);
return hBox;
}
示例2: zeroOnReadsFromUninitializedMemorySelection
import javafx.scene.control.CheckBox; //导入方法依赖的package包/类
private Node zeroOnReadsFromUninitializedMemorySelection( SimulatorSettingDetails settingDetails )
{
HBox hBox = new HBox();
//TODO ensure numerical values only
CheckBox zeroOnReadsFromUninitializedMemoryCheckBox =
new CheckBox("Assume zero on reads from uninitialized memory");
zeroOnReadsFromUninitializedMemoryCheckBox.setAllowIndeterminate(false);
zeroOnReadsFromUninitializedMemoryCheckBox
.setSelected(Boolean.valueOf(settingDetails.getAssumeZeroOnReadsFromUninitializedMemory()));
assumeZeroOnReadsFromUninitializedMemoryModel = zeroOnReadsFromUninitializedMemoryCheckBox.selectedProperty();
hBox.getChildren().add(zeroOnReadsFromUninitializedMemoryCheckBox);
return hBox;
}
示例3: programInChunksSelection
import javafx.scene.control.CheckBox; //导入方法依赖的package包/类
private Node programInChunksSelection( ProgrammerSettingDetails settingDetails )
{
HBox hBox = new HBox();
//TODO ensure numerical values only
CheckBox programInChunksCheckBox = new CheckBox("Program in chunks");
programInChunksCheckBox.setAllowIndeterminate(false);
programInChunksCheckBox.setSelected(Boolean.valueOf(settingDetails.getProgramInChunks()));
programInChunksSelectionModel = programInChunksCheckBox.selectedProperty();
hBox.getChildren().add(programInChunksCheckBox);
return hBox;
}
示例4: autodetectSerialPortSelection
import javafx.scene.control.CheckBox; //导入方法依赖的package包/类
private Node autodetectSerialPortSelection( ProgrammerSettingDetails settingDetails )
{
HBox hBox = new HBox();
CheckBox autodetectCheckBox = new CheckBox("Autodetect serial ports");
autodetectCheckBox.setAllowIndeterminate(false);
autodetectCheckBox.setSelected(Boolean.valueOf(settingDetails.getAutoDetectSerialPorts()));
autodetectSerialPortsSelectionModel = autodetectCheckBox.selectedProperty();
hBox.getChildren().add(autodetectCheckBox);
return hBox;
}
示例5: setupValuePane
import javafx.scene.control.CheckBox; //导入方法依赖的package包/类
private Pane setupValuePane(Dimension<?> dimension, Label titleLabel, Pane contentPane) {
final HBox titlePane = new HBox();
final VBox valueVBox = new VBox();
final Node backValueGraphicNode = new ImageView(backValueGraphic);
final double buttonScale = 0.66;
backValueGraphicNode.setScaleX(1 / buttonScale);
backValueGraphicNode.setScaleY(1 / buttonScale);
final Button backValue = new Button("", backValueGraphicNode);
backValue.setOnAction((e) -> {
traceExplorer.backValue(dimension);
});
backValue.setScaleX(buttonScale);
backValue.setScaleY(buttonScale);
backValue.setDisable(!traceExplorer.canBackValue(dimension));
final Node stepValueGraphicNode = new ImageView(stepValueGraphic);
stepValueGraphicNode.setScaleX(1 / buttonScale);
stepValueGraphicNode.setScaleY(1 / buttonScale);
final Button stepValue = new Button("", stepValueGraphicNode);
stepValue.setOnAction((e) -> {
traceExplorer.stepValue(dimension);
});
stepValue.setDisable(!traceExplorer.canStepValue(dimension));
stepValue.setScaleX(buttonScale);
stepValue.setScaleY(buttonScale);
titlePane.setAlignment(Pos.CENTER_LEFT);
VBox.setMargin(titlePane, HALF_MARGIN_INSETS);
VBox.setMargin(contentPane, MARGIN_INSETS);
final CheckBox showValueCheckBox = new CheckBox();
showValueCheckBox.setScaleX(buttonScale);
showValueCheckBox.setScaleY(buttonScale);
boolean hide = traceExtractor.isDimensionIgnored(dimension);
if (hide) {
showValueCheckBox.setSelected(false);
} else {
showValueCheckBox.setSelected(true);
}
BooleanProperty sel = showValueCheckBox.selectedProperty();
backValue.visibleProperty().bind(sel);
stepValue.visibleProperty().bind(sel);
sel.addListener((v, o, n) -> {
if (o != n) {
traceExtractor.ignoreDimension(dimension, !n);
if (n) {
valueVBox.getChildren().add(contentPane);
} else {
valueVBox.getChildren().remove(contentPane);
}
sortValueLines();
}
});
titlePane.getChildren().addAll(showValueCheckBox, titleLabel, backValue, stepValue);
valueVBox.getChildren().add(titlePane);
if (!hide) {
valueVBox.getChildren().add(contentPane);
}
valuesLines.getChildren().add(valueVBox);
valueVBox.setUserData(dimension);
titleLabel.minWidthProperty().bind(valueTitleWidth);
titleLabel.widthProperty().addListener((v, o, n) -> {
if (n.doubleValue() > valueTitleWidth.get()) {
valueTitleWidth.set(n.doubleValue());
}
});
if (titleLabel.widthProperty().doubleValue() > valueTitleWidth.get()) {
valueTitleWidth.set(titleLabel.widthProperty().doubleValue());
}
return valueVBox;
}