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


Java ReadOnlyBooleanProperty类代码示例

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

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

示例1: initRegisteredCommandsListener

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
private void initRegisteredCommandsListener() {
	this.registeredCommands.addListener((ListChangeListener<Command>) c -> {
		while (c.next()) {
			if (registeredCommands.isEmpty()) {
				executable.unbind();
				running.unbind();
				progress.unbind();
			} else {
				BooleanBinding executableBinding = constantOf(true);
				BooleanBinding runningBinding = constantOf(false);

				for (Command registeredCommand : registeredCommands) {
					ReadOnlyBooleanProperty currentExecutable = registeredCommand.executableProperty();
					ReadOnlyBooleanProperty currentRunning = registeredCommand.runningProperty();
					executableBinding = executableBinding.and(currentExecutable);
					runningBinding = runningBinding.or(currentRunning);
				}
				executable.bind(executableBinding);
				running.bind(runningBinding);

				initProgressBinding();
			}
		}
	});
}
 
开发者ID:cmlanche,项目名称:easyMvvmFx,代码行数:26,代码来源:CompositeCommand.java


示例2: createAndAttachTab

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
private Tab createAndAttachTab(Path path) {
  BorderPane pane = new BorderPane();
  MplEditor editor = MplEditor.create(path, pane, eventBus, appMemento, this);

  ReadOnlyBooleanProperty modifiedProperty = editor.modifiedProperty();
  StringExpression titleText = Bindings.createStringBinding(() -> {
    return modifiedProperty.get() ? "*" : "";
  }, modifiedProperty).concat(path.getFileName());

  Tab tab = new Tab();
  tab.textProperty().bind(titleText);
  tab.setContent(pane);
  tab.setUserData(new MplEditorData(path, editor));
  tab.setOnCloseRequest(e -> {
    if (warnAboutUnsavedResources(Arrays.asList(tab)))
      e.consume();
  });
  editorTabPane.getTabs().add(tab);
  tab.setOnClosed(e -> {
    editors.remove(path);
    tabs.remove(path);
  });
  editors.put(path, editor);
  tabs.put(path, tab);
  return tab;
}
 
开发者ID:Adrodoc55,项目名称:MPL,代码行数:27,代码来源:MplIdeController.java


示例3: initialiseField

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
private void initialiseField(final TextField field, final Supplier<Object> settingGetter) {
    StringProperty textProperty = field.textProperty();
    ReadOnlyBooleanProperty focusedProperty = field.focusedProperty();

    field.setText(settingGetter.get().toString());
    textProperty.addListener((o, oldValue, newValue) -> cleanNonNegativeInteger(field::setText, newValue, oldValue));
    focusedProperty.addListener((o, old, isFocused) -> applyDefaultIfEmpty(field::setText, field::getText, settingGetter));
}
 
开发者ID:VocabHunter,项目名称:VocabHunter,代码行数:9,代码来源:SettingsController.java


示例4: FXNodeFocusedHelper

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/**
 * Creates a new instance of {@link FXNodeFocusedHelper}.
 */
public FXNodeFocusedHelper()
{
	sceneFocusOwnerListener = this::onSceneFocusOwnerChanged;
	nodeSceneListener = this::onNodeSceneChanged;
	
	focused = new SimpleBooleanProperty();
	focusedReadOnly = ReadOnlyBooleanProperty.readOnlyBooleanProperty(focused);
	
	node = new SimpleObjectProperty<>();
	node.addListener(this::onNodeChanged);
}
 
开发者ID:ivartanian,项目名称:JVx.javafx,代码行数:15,代码来源:FXNodeFocusedHelper.java


示例5: setWizard

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/**
 * Callback-method associating this {@code WizardPage} with the given {@code wizard}.
 * <p>
 * Implementors should <i>not</i> override this method, but instead initialise their {@code WizardPage}-sub-class
 * via overriding {@link #init()}!
 * <p>
 * Please note that a {@code WizardPage} cannot be re-used in another {@code Wizard}. Therefore, this method is
 * only invoked with one single wizard. It may be invoked multiple times, but it makes sure {@link #init()} is
 * only called once.
 * @param wizard the {@link Wizard} this {@code WizardPage} is used in. Must not be <code>null</code>.
 */
public void setWizard(final Wizard wizard) {
	assertNotNull(wizard, "wizard"); //$NON-NLS-1$
	if (this.wizard == wizard)
		return;

	if (this.wizard != null)
		throw new IllegalStateException("this.wizard != null :: Cannot re-use WizardPage in another Wizard!"); //$NON-NLS-1$

	this.wizard = wizard;

	Region spring = new Region();
	VBox.setVgrow(spring, Priority.ALWAYS);

	content = createContent();
	if (content == null)
		content = new HBox(new Text(String.format(
				">>> NO CONTENT <<<\n\nYour implementation of WizardPage.createContent() in class\n%s\nreturned null!", //$NON-NLS-1$
				this.getClass().getName())));

	if (content instanceof CompletableContent) {
		final ReadOnlyBooleanProperty contentCompleteProperty = ((CompletableContent) content).completeProperty();
		assertNotNull(contentCompleteProperty, "content.completeProperty()");
		this.completeProperty().bind(contentCompleteProperty.and(shownOrNotShownRequired));
	}

	getChildren().add(content);

	getChildren().addAll(spring, createButtonBar(), new Region());
	finishButton.disableProperty().bind(wizard.canFinishProperty().not());

	init();
	wizard.registerWizardPage(this);

	final WizardPage nextPage = getNextPage();
	if (nextPage != null)
		nextPage.setWizard(wizard);
}
 
开发者ID:subshare,项目名称:subshare,代码行数:49,代码来源:WizardPage.java


示例6: setComponent

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/**
 * @see gov.va.isaac.interfaces.gui.views.commonFunctionality.RefexViewI#setComponent(int, javafx.beans.property.ReadOnlyBooleanProperty, 
 * javafx.beans.property.ReadOnlyBooleanProperty, javafx.beans.property.ReadOnlyBooleanProperty, boolean)
 */
@Override
public void setComponent(int componentNid, ReadOnlyBooleanProperty showStampColumns, ReadOnlyBooleanProperty showActiveOnly, 
		ReadOnlyBooleanProperty showFullHistory, boolean displayFSNButton)
{
	//disable refresh, as the bindings mucking causes many refresh calls
	noRefresh_.getAndIncrement();
	initialInit();
	setFromType_ = new InputType(componentNid, false);
	handleExternalBindings(showStampColumns, showActiveOnly, showFullHistory, displayFSNButton);
	showViewUsageButton_.invalidate();
	newComponentHint_ = null;
	noRefresh_.getAndDecrement();
	initColumnsLoadData();
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:19,代码来源:DynamicRefexView.java


示例7: setAssemblage

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/**
 * @see gov.va.isaac.interfaces.gui.views.commonFunctionality.RefexViewI#setAssemblage(int, javafx.beans.property.ReadOnlyBooleanProperty, 
 * javafx.beans.property.ReadOnlyBooleanProperty, javafx.beans.property.ReadOnlyBooleanProperty, boolean)
 */
@Override
public void setAssemblage(int assemblageConceptNid, ReadOnlyBooleanProperty showStampColumns, ReadOnlyBooleanProperty showActiveOnly, 
		ReadOnlyBooleanProperty showFullHistory, boolean displayFSNButton)
{
	//disable refresh, as the bindings mucking causes many refresh calls
	noRefresh_.getAndIncrement();
	initialInit();
	setFromType_ = new InputType(assemblageConceptNid, true);
	handleExternalBindings(showStampColumns, showActiveOnly, showFullHistory, displayFSNButton);
	newComponentHint_ = null;
	noRefresh_.getAndDecrement();
	initColumnsLoadData();
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:18,代码来源:DynamicRefexView.java


示例8: testReadOnlyBooleanProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@Test
public void testReadOnlyBooleanProperty(){
    ReadOnlyBooleanProperty actual = new SimpleBooleanProperty(true);
    assertThat(actual).isTrue();

    assertThat(actual).hasSameValue(actual);
}
 
开发者ID:lestard,项目名称:assertj-javafx,代码行数:8,代码来源:BooleanTest.java


示例9: isNotNumber

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
private ReadOnlyBooleanProperty isNotNumber(StringProperty textProperty) {
    SimpleBooleanProperty property = new SimpleBooleanProperty();
    textProperty.addListener((ObservableValue<? extends String> observable, String oldValue, String newValue) -> {
        try {
            String content = textProperty.get();
            Integer.parseInt(content);
            property.setValue(false);
        } catch (NumberFormatException nbr) {
            property.setValue(true);
        }
    });
    return property;
}
 
开发者ID:AdamBien,项目名称:floyd,代码行数:14,代码来源:ScannerPresenter.java


示例10: ccwProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/** Replies the property that indictes if the triangle's points are defined in a counter-clockwise order.
 *
 * @return the ccw property.
 */
@Pure
public ReadOnlyBooleanProperty ccwProperty() {
	if (this.ccw == null) {
		this.ccw = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.CCW);
		this.ccw.bind(Bindings.createBooleanBinding(() ->
			Triangle2afp.isCCW(
					getX1(), getY1(), getX2(), getY2(),
					getX3(), getY3()),
				x1Property(), y1Property(),
				x2Property(), y2Property(),
				x3Property(), y3Property()));
	}
	return this.ccw.getReadOnlyProperty();
}
 
开发者ID:gallandarakhneorg,项目名称:afc,代码行数:19,代码来源:Triangle2dfx.java


示例11: indexBuiltProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty indexBuiltProperty() {
    return indexBuilt;
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:4,代码来源:GraphAnnotation.java


示例12: validProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/**
 * @return <code>true</code> if there are no validation messages present.
 */
public ReadOnlyBooleanProperty validProperty() {
	return messages.emptyProperty();
}
 
开发者ID:cmlanche,项目名称:easyMvvmFx,代码行数:7,代码来源:ValidationStatus.java


示例13: executableProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@Override
public ReadOnlyBooleanProperty executableProperty() {
	return this.executable.getReadOnlyProperty();
}
 
开发者ID:cmlanche,项目名称:easyMvvmFx,代码行数:5,代码来源:DelegateCommand.java


示例14: executableProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@Override
public final ReadOnlyBooleanProperty executableProperty() {
	return executable.getReadOnlyProperty();
}
 
开发者ID:cmlanche,项目名称:easyMvvmFx,代码行数:5,代码来源:CommandBase.java


示例15: runningProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@Override
public final ReadOnlyBooleanProperty runningProperty() {
	return running.getReadOnlyProperty();
}
 
开发者ID:cmlanche,项目名称:easyMvvmFx,代码行数:5,代码来源:CommandBase.java


示例16: modifiedProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty modifiedProperty() {
  return modified.getReadOnlyProperty();
}
 
开发者ID:XDean,项目名称:JavaFX-EX,代码行数:4,代码来源:ModifiableObject.java


示例17: enabledProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public static ReadOnlyBooleanProperty enabledProperty() {
  return enabled;
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:4,代码来源:LiveWindow.java


示例18: viewModeProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public final ReadOnlyBooleanProperty viewModeProperty() {
  return viewMode;
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:4,代码来源:Scrubber.java


示例19: liveUpdateProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public final ReadOnlyBooleanProperty liveUpdateProperty() {
    return controller.liveUpdateProperty();
}
 
开发者ID:EricCanull,项目名称:fxexperience2,代码行数:4,代码来源:PaintPicker.java


示例20: validProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty validProperty() {
  return valid;
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:4,代码来源:ConstraintSpecificationValidator.java


示例21: updateListener

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@FXThread
private static void updateListener(@NotNull final Node node, @NotNull final ImageView imageView,
                                   @NotNull final ReadOnlyBooleanProperty condition,
                                   @NotNull final Object listenerKey, @NotNull final Object notSelectedKey,
                                   @NotNull final Object selectedKey) {

    final EditorConfig editorConfig = EditorConfig.getInstance();
    final CssColorTheme theme = editorConfig.getTheme();

    if (!theme.needRepaintIcons()) {
        return;
    }

    final ObservableMap<Object, Object> properties = node.getProperties();
    final Image newImage = imageView.getImage();

    if (newImage == null) {
        properties.remove(listenerKey);
        return;
    }

    final Image original = FILE_ICON_MANAGER.getOriginal(newImage);

    properties.put(notSelectedKey, newImage);
    properties.put(selectedKey, original);

    final ChangeListener<Boolean> listener = (observable, oldValue, newValue) -> {
        if (newValue) {
            imageView.setImage((Image) properties.get(selectedKey));
        } else {
            imageView.setImage((Image) properties.get(notSelectedKey));
        }
    };

    condition.addListener(listener);

    properties.put(listenerKey, listener);

    if (condition.get()) {
        imageView.setImage(original);
    } else {
        imageView.setImage(newImage);
    }
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:45,代码来源:DynamicIconSupport.java


示例22: canUndoProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty canUndoProperty() {
    return canUndo;
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:4,代码来源:CommandStack.java


示例23: canRedoProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty canRedoProperty() {
    return canRedo;
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:4,代码来源:CommandStack.java


示例24: canNavForwardProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty canNavForwardProperty() {
    return canNavForward.getReadOnlyProperty();
}
 
开发者ID:proofy,项目名称:willow-browser,代码行数:4,代码来源:History.java


示例25: canNavBackwardProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty canNavBackwardProperty() {
    return canNavBackward.getReadOnlyProperty();
}
 
开发者ID:proofy,项目名称:willow-browser,代码行数:4,代码来源:History.java


示例26: multipleSelectionProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty multipleSelectionProperty()
{
	return multipleSelectionProperty.getReadOnlyProperty();
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:5,代码来源:FxEditor.java


示例27: selectedProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
/**
 * The currently selected tab.
 */
public final ReadOnlyBooleanProperty selectedProperty() {
	return selectedPropertyImpl().getReadOnlyProperty();
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:7,代码来源:DockTab.java


示例28: workingProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty workingProperty() {
    return working.getReadOnlyProperty();
}
 
开发者ID:acmi,项目名称:xdat_editor,代码行数:4,代码来源:XdatEditor.java


示例29: getShowingProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@NotNull
public ReadOnlyBooleanProperty getShowingProperty() {
	return myStage.showingProperty();
}
 
开发者ID:kayler-renslow,项目名称:arma-dialog-creator,代码行数:5,代码来源:StagePopup.java


示例30: showPopupProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty showPopupProperty() {
	return showPopup.getReadOnlyProperty();
}
 
开发者ID:salimvanak,项目名称:myWMS,代码行数:4,代码来源:BasicEntityEditor.java


示例31: dirtyProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
public ReadOnlyBooleanProperty dirtyProperty () {
	return dirtyProperty.getReadOnlyProperty();
}
 
开发者ID:FrancisG-Massey,项目名称:Capstone2016,代码行数:4,代码来源:Trap.java


示例32: networkAvailableProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@Override
public ReadOnlyBooleanProperty networkAvailableProperty() {
	return networkAvailableProperty.getReadOnlyProperty();
}
 
开发者ID:FrancisG-Massey,项目名称:Capstone2016,代码行数:5,代码来源:RestNetworkService.java


示例33: loadingProperty

import javafx.beans.property.ReadOnlyBooleanProperty; //导入依赖的package包/类
@Override
public ReadOnlyBooleanProperty loadingProperty () {
   	return loadingProperty.getReadOnlyProperty();
   }
 
开发者ID:FrancisG-Massey,项目名称:Capstone2016,代码行数:5,代码来源:DefaultTrapDataService.java



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