Example #1
0
 private void initSelectionListener() {
   selectionFocusListener =
       c -> {
         if (selectionModel.getSelectedItems().isEmpty())
           tertiaryRoom.setCameraCenter(rnaSequence3D.computeCenter());
         if (selectionModel.getSelectedIndices().size() > 0) selectFocus();
       };
 }
Example #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());
       });
 }
Example #3
0
  /** initialize tertiary structure view */
  private void initTertiaryView() {
    Group models3D = new Group();
    rnaSequence3D = new RNASequence(model.getPdbfile());

    if (tertiaryRoom == null) {
      tertiaryRoom = new Room(models3D, 50, 50);
      tertiaryRoom.rotateCamera(tertiaryRoom);
      tertiaryRoom.scaleCamera(scene);
      tertiaryRoom.alignToParent(pane3D);
      tertiaryRoom.setPickOnBounds(false);
      pane3D.getChildren().add(tertiaryRoom);
    } else {
      tertiaryRoom.setObject(rnaSequence3D);
    }

    if (reloadItem.isSelected()) loadOneModel(0);
    if (!reloadItem.isSelected()) loadAllmodels();
    ((MeshModel) rnaSequence3D.getModels().get(1)).colorPyrPur();

    rnaSequence3D.setSelectionModel(selectionModel);
    tertiaryRoom.setCameraCenter(rnaSequence3D.computeCenter());

    activateRightSideButtons();
  }