Ejemplo n.º 1
0
  private void clearModels() {
    structureStick.selectedProperty().unbind();
    structureBall.selectedProperty().unbind();
    structureMesh.selectedProperty().unbind();

    structureBall.setOnAction(event -> {});

    rnaSequence3D.getModels().clear();
  }
Ejemplo n.º 2
0
 private void activateRightSideButtons() {
   colorPyrpur.setOnAction(
       (me) -> {
         ((MeshModel) rnaSequence3D.getModels().get(1)).colorPyrPur();
       });
   colorAugc.setOnAction(
       (me) -> {
         ((MeshModel) rnaSequence3D.getModels().get(1)).colorBases();
       });
   centerObject.setOnAction(
       (me) -> {
         tertiaryRoom.setCameraCenter(rnaSequence3D.computeCenter());
       });
 }
Ejemplo n.º 3
0
  private void loadAllmodels() {
    rnaSequence3D.addModel(new StickModel());
    rnaSequence3D.addModel(new MeshModel());
    rnaSequence3D.addModel(new BallModel());

    structureStick.selectedProperty().unbind();
    structureMesh.selectedProperty().unbind();
    structureBall.selectedProperty().unbind();

    rnaSequence3D.getModels().get(0).visibleProperty().bind(structureStick.selectedProperty());
    rnaSequence3D.getModels().get(1).visibleProperty().bind(structureMesh.selectedProperty());
    rnaSequence3D.getModels().get(2).visibleProperty().bind(structureBall.selectedProperty());

    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(0));
    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(1));
    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(2));
  }
Ejemplo n.º 4
0
  private void setFileDependingButtonBindings() {
    // MenuItems
    pyrpurItem.disableProperty().bind(model.fileLoadedProperty().not());
    augcItem.disableProperty().bind(model.fileLoadedProperty().not());
    meshItem.disableProperty().bind(model.fileLoadedProperty().not());
    stickItem.disableProperty().bind(model.fileLoadedProperty().not());
    ballItem.disableProperty().bind(model.fileLoadedProperty().not());

    // Buttons on the side
    colorPyrpur.disableProperty().bind(model.fileLoadedProperty().not());
    colorAugc.disableProperty().bind(model.fileLoadedProperty().not());
    structureMesh.disableProperty().bind(model.fileLoadedProperty().not());
    structureStick.disableProperty().bind(model.fileLoadedProperty().not());
    structureBall.disableProperty().bind(model.fileLoadedProperty().not());
    playRotate.disableProperty().bind(model.fileLoadedProperty().not());
    rotateLeft.disableProperty().bind(model.fileLoadedProperty().not());
    rotateRight.disableProperty().bind(model.fileLoadedProperty().not());
    zoomIn.disableProperty().bind(model.fileLoadedProperty().not());
    zoomOut.disableProperty().bind(model.fileLoadedProperty().not());
    centerObject.disableProperty().bind(model.fileLoadedProperty().not());
  }
Ejemplo n.º 5
0
 private void bindMenuItemsToButtons() {
   pyrpurItem.selectedProperty().bindBidirectional(colorPyrpur.selectedProperty());
   augcItem.selectedProperty().bindBidirectional(colorAugc.selectedProperty());
   meshItem.selectedProperty().bindBidirectional(structureMesh.selectedProperty());
   stickItem.selectedProperty().bindBidirectional(structureStick.selectedProperty());
 }