Ejemplo n.º 1
0
  /** initialize secondary structure view items */
  private void initSecondaryView() {
    // clear the secondary structure pane on initialization
    pane2D.getChildren().clear();

    if (view2DController.getGraph2d() != null) {
      pane2D.widthProperty().removeListener(view2DController.getWidthChangeListener());
      pane2D.heightProperty().removeListener(view2DController.getHeightChangeListener());
    }

    view2DController.initGraph2d(
        rnaSequence3D.extractString(),
        rnaSequence3D.getNucleotides().size(),
        rnaSequence3D.computeWCBonds(),
        (int) pane2D.getWidth(),
        (int) pane2D.getHeight());

    listenOnPane2dResize();
    view2DController.setScaleBinding(pane2D.widthProperty(), pane2D.heightProperty());

    view2DController.getGraph2d().setSelectionModel(selectionModel);
    pane2D.getChildren().add(view2DController.getGraph2d());
  }
Ejemplo n.º 2
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();
  }