Beispiel #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());
  }
Beispiel #2
0
  private void listenOnPane2dResize() {
    view2DController.initProperties();

    pane2D.widthProperty().addListener(view2DController.getWidthChangeListener());
    pane2D.heightProperty().addListener(view2DController.getHeightChangeListener());
  }