當前位置: 首頁>>代碼示例>>Java>>正文


Java SimpleBooleanProperty類代碼示例

本文整理匯總了Java中javafx.beans.property.SimpleBooleanProperty的典型用法代碼示例。如果您正苦於以下問題:Java SimpleBooleanProperty類的具體用法?Java SimpleBooleanProperty怎麽用?Java SimpleBooleanProperty使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SimpleBooleanProperty類屬於javafx.beans.property包,在下文中一共展示了SimpleBooleanProperty類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SequenceVisualizer

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
/**
 * Create instance of {@link SequenceVisualizer}.
 */
public SequenceVisualizer() {
    sequenceProperty = new SimpleStringProperty();
    offsetProperty = new SimpleIntegerProperty();
    onScreenBasesProperty = new SimpleIntegerProperty();
    hoveredBaseIdProperty = new SimpleIntegerProperty(-1);

    sequenceProperty.addListener((observable, oldValue, newValue) -> {
        if (offsetProperty.get() == 0) {
            draw(); // force redraw if offset remains unchanged.
        }
        offsetProperty.set(0);
    });
    offsetProperty.addListener((observable, oldValue, newValue) -> draw());
    hoveredBaseIdProperty.addListener((observable, oldValue, newValue) -> draw());

    visibleProperty = new SimpleBooleanProperty(false);
}
 
開發者ID:ProgrammingLife2017,項目名稱:hygene,代碼行數:21,代碼來源:SequenceVisualizer.java

示例2: GlobalConfig

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
/**
 * Creates a default configuration. Paths are set to <tt>[Path to ... Executable]</tt>.
 */
public GlobalConfig() {
  verificationTimeout = new SimpleIntegerProperty(3600);
  simulationTimeout = new SimpleIntegerProperty(60);
  windowMaximized = new SimpleBooleanProperty(true);
  windowHeight = new SimpleIntegerProperty(600);
  windowWidth = new SimpleIntegerProperty(800);
  editorFontSize = new SimpleIntegerProperty(12);
  maxLineRollout = new SimpleIntegerProperty(50);
  editorFontFamily = new SimpleStringProperty("DejaVu Sans Mono");
  showLineNumbers = new SimpleBooleanProperty(true);
  uiLanguage = new SimpleStringProperty("EN");
  nuxmvFilename = new SimpleStringProperty(
      ExecutableLocator.findExecutableFileAsString("nuXmv")
          .orElse("[Path to nuXmv Executable]"));
  z3Path = new SimpleStringProperty(
      ExecutableLocator.findExecutableFileAsString("z3")
      .orElse("[Path to Z3 Executable]"));
  getetaCommand =
      new SimpleStringProperty("java -jar /path/to/geteta.jar -c ${code} -t ${spec} -x");
}
 
開發者ID:VerifAPS,項目名稱:stvs,代碼行數:24,代碼來源:GlobalConfig.java

示例3: addBoolean

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
/**
 * Add a yes/no choice to a wizard step.
 *
 * @param fieldName
 * @param defaultValue
 *            of the choice.
 * @param prompt
 *            the tooltip to show
 * @return
 */
@SuppressWarnings("unchecked")
public WizardStepBuilder addBoolean(final String fieldName, final boolean defaultValue, final String prompt)
{
    final JFXCheckBox box = new JFXCheckBox();
    box.setTooltip(new Tooltip(prompt));
    box.setSelected(defaultValue);

    this.current.getData().put(fieldName, new SimpleBooleanProperty());
    this.current.getData().get(fieldName).bind(box.selectedProperty());

    final Label label = new Label(fieldName);
    GridPane.setHalignment(label, HPos.RIGHT);
    GridPane.setHalignment(box, HPos.LEFT);
    this.current.add(label, 0, this.current.getData().size() - 1);
    this.current.add(box, 1, this.current.getData().size() - 1);
    return this;
}
 
開發者ID:Leviathan-Studio,項目名稱:MineIDE,代碼行數:28,代碼來源:WizardStepBuilder.java

示例4: MyGraphView

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
public MyGraphView(MyGraph<MyVertex, MyEdge> graph) {
    this.graph = graph;
    this.myVertexViewGroup = new Group();
    this.myEdgeViewGroup = new Group();
    this.animationService = new SpringAnimationService(graph);

    this.pausedProperty = new SimpleBooleanProperty(false);

    drawNodes();
    drawEdges();

    getChildren().add(myEdgeViewGroup);
    getChildren().add(myVertexViewGroup);

    // Add all Vertex to the selection Model and add Listener
    selectionModel = new VertexSelectionModel(graph.getVertices().toArray());
    addSelectionListener();
    addPausedListener();

    startLayout();
}
 
開發者ID:jmueller95,項目名稱:CORNETTO,代碼行數:22,代碼來源:MyGraphView.java

示例5: setupListeners

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
private void setupListeners() {
    correlationAndPValueInRange = new SimpleBooleanProperty(true);
    frequencyInRange = new SimpleBooleanProperty(true);
    //Add listeners for the two range properties - if both are false, set hidden to true
    correlationAndPValueInRange.addListener(observable -> {
        if (correlationAndPValueInRange.get() && frequencyInRange.get()) {
            showEdge();
        } else {
            hideEdge();
        }
    });

    frequencyInRange.addListener(observable -> {
        if (correlationAndPValueInRange.get() && frequencyInRange.get()) {
            showEdge();
        } else {
            hideEdge();
        }
    });
}
 
開發者ID:jmueller95,項目名稱:CORNETTO,代碼行數:21,代碼來源:MyEdge.java

示例6: Query

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
/**
 * Creates instance of {@link Query}.
 *
 * @param graphStore the {@link GraphStore} used to retrieve the most up to date graph
 */
@Inject
public Query(final GraphStore graphStore) {
    visibleProperty = new SimpleBooleanProperty();
    queryingProperty = new SimpleBooleanProperty();
    queriedNodeIds = FXCollections.observableArrayList();

    graphStore.getGfaFileProperty().addListener((observable, oldValue, newValue) ->
            setSearchQuery(new SearchQuery(newValue)));
}
 
開發者ID:ProgrammingLife2017,項目名稱:hygene,代碼行數:15,代碼來源:Query.java

示例7: init

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
private void init(long id, long parentId, String title) {
    this.setId(id);
    this.setParentId(parentId);
    this.setTitle(title);
    
    markAsChangedProperty = new SimpleBooleanProperty(Boolean.FALSE);
}
 
開發者ID:Naoghuman,項目名稱:ABC-List,代碼行數:8,代碼來源:Topic.java

示例8: ConstraintSpecificationValidator

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
/**
 * <p>
 * Creates a validator with given observable models as context information.
 * </p>
 *
 * <p>
 * The validator observes changes in any of the given context models. It automatically updates the
 * validated specification (see {@link #validSpecificationProperty()}) and/or the problems with
 * the constraint specification (see {@link #problemsProperty()}).
 * </p>
 *
 * @param typeContext the extracted types (esp. enums) from the code area
 * @param codeIoVariables the extracted {@link CodeIoVariable}s from the code area
 * @param validFreeVariables the most latest validated free variables from the
 *        {@link FreeVariableList}.
 * @param specification the specification to be validated
 */
public ConstraintSpecificationValidator(ObjectProperty<List<Type>> typeContext,
    ObjectProperty<List<CodeIoVariable>> codeIoVariables,
    ReadOnlyObjectProperty<List<ValidFreeVariable>> validFreeVariables,
    ConstraintSpecification specification) {
  this.typeContext = typeContext;
  this.codeIoVariables = codeIoVariables;
  this.validFreeVariables = validFreeVariables;
  this.specification = specification;

  this.problems = new SimpleObjectProperty<>(new ArrayList<>());
  this.validSpecification = new NullableProperty<>();
  this.valid = new SimpleBooleanProperty(false);

  // All these ObservableLists invoke the InvalidationListeners on deep updates
  // So if only a cell in the Specification changes, the change listener on the ObservableList
  // two layers above gets notified.
  specification.getRows().addListener(listenToSpecUpdate);
  specification.getDurations().addListener(listenToSpecUpdate);
  specification.getColumnHeaders().addListener(listenToSpecUpdate);

  typeContext.addListener(listenToSpecUpdate);
  codeIoVariables.addListener(listenToSpecUpdate);
  validFreeVariables.addListener(listenToSpecUpdate);

  recalculateSpecProblems();
}
 
開發者ID:VerifAPS,項目名稱:stvs,代碼行數:44,代碼來源:ConstraintSpecificationValidator.java

示例9: Person

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
private Person(boolean invited, String fName, String lName, String email) {
    this.invited = new SimpleBooleanProperty(invited);
    this.firstName = new SimpleStringProperty(fName);
    this.lastName = new SimpleStringProperty(lName);
    this.email = new SimpleStringProperty(email);
    this.invited = new SimpleBooleanProperty(invited);
    
    this.invited.addListener(new ChangeListener<Boolean>() {
        public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
            System.out.println(firstNameProperty().get() + " invited: " + t1);
        }
    });            
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:14,代碼來源:TableCellFactorySample.java

示例10: init

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
private void init (String name, String description, ImageGraphic graphic) {
    myName = new SimpleStringProperty(name);
    myDescription = new SimpleStringProperty(description);
    myImage = graphic;
    myImageWidth = graphic.getWidth();
    myImageHeight = graphic.getHeight();
    imageChange = new SimpleBooleanProperty(false);
}
 
開發者ID:tomrom95,項目名稱:GameAuthoringEnvironment,代碼行數:9,代碼來源:Profile.java

示例11: Check

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
public Check (IAttributeManager attributeManager, AttributeType type, double cost) {
    System.out.println("making");
    myManager = attributeManager;
    myType = type;
    myCost = cost;
    myStatus = new SimpleBooleanProperty(false);
}
 
開發者ID:tomrom95,項目名稱:GameAuthoringEnvironment,代碼行數:8,代碼來源:Check.java

示例12: init

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
private void init(long id, long generationTime, String title) {
    this.setId(id);
    this.setGenerationTime(generationTime);
    this.setTitle(title);
    
    markAsChangedProperty = new SimpleBooleanProperty(Boolean.FALSE);
}
 
開發者ID:Naoghuman,項目名稱:ABC-List,代碼行數:8,代碼來源:Term.java

示例13: initGame

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
public void initGame(Main mainApp, Core c) {
    setMainApp(mainApp);
    setCore(c);
    pieceChosenInInventory = -1;
    highlighted = new Highlighter();
    traductor = new TraducteurBoard();
    lastCoord = new CoordGene<Double>(0.0,0.0);
    animationPlaying = new SimpleBooleanProperty();
    animationPlaying.setValue(false);
    nbMessage = 0;
    nbChatRow = 2;
    inventoryGroup = new ToggleGroup();
    if (!core.hasPreviousState()) {
        undo.setDisable(true);
    }
    if (!core.hasNextState()) {
        redo.setDisable(true);
    }
    initButtonByInventory();
    animation = new AnimationTile(panCanvas,traductor);
    refreshor = new RefreshJavaFX(core, gameCanvas, highlighted, traductor, this);
    initGameCanvas();
    core.setGameScreen(this);
    
    if (core.getMode() == Consts.AIVP && core.getTurn() == 0){
        core.playAI();
    }

    if(core.getMode() != Consts.PVEX && core.getMode() != Consts.EXVP){
        inputChat.setVisible(false);
        textChat.setVisible(false);
        scrollChat.setVisible(false);
    }else{
        hideButtonsForNetwork();
    }
    
    refreshor.start();
}
 
開發者ID:Plinz,項目名稱:Hive_Game,代碼行數:39,代碼來源:GameScreenController.java

示例14: BaseDrag

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
public BaseDrag(T t) {
  super(t);
  this.minX = new SimpleDoubleProperty(0);
  this.minY = new SimpleDoubleProperty(0);
  this.maxX = new SimpleDoubleProperty(Double.MAX_VALUE);
  this.maxY = new SimpleDoubleProperty(Double.MAX_VALUE);
  this.borderWidth = new SimpleDoubleProperty(3);
  this.enable = new SimpleBooleanProperty(true);
}
 
開發者ID:XDean,項目名稱:JavaFX-EX,代碼行數:10,代碼來源:DragSupport.java

示例15: Tab

import javafx.beans.property.SimpleBooleanProperty; //導入依賴的package包/類
public Tab(Button button, final Pane pane) {
    this.button = button;
    this.pane = pane;

    this.button.setOnAction(event
            -> EventExecutor.getInstance().execute(new ChangeTabEvent(Tab.this)));
    this.active = new SimpleBooleanProperty(false);
    this.active.addListener((observable, oldValue, newValue) -> {
        button.pseudoClassStateChanged(TAB_ACTIVE_CLASS, active.get());
        pane.pseudoClassStateChanged(TAB_ACTIVE_CLASS, active.get());
    });
}
 
開發者ID:Superioz,項目名稱:MooProject,代碼行數:13,代碼來源:Tab.java


注:本文中的javafx.beans.property.SimpleBooleanProperty類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。