コード例 #1
0
ファイル: IrisVisualizer.java プロジェクト: jbudynk/iris
  public void invalidateModel(ExtSed sed) {
    if (sed != null) {
      SpectrumContainer container =
          (SpectrumContainer) sed.getAttachment(IrisDisplayManager.FIT_MODEL);
      if (container != null) {

        ModelManager2 mm = container.getModelManager();
        if (mm != null && mm.isActive()) {
          mm.dispose();
        }

        sed.removeAttachment(IrisDisplayManager.FIT_MODEL);
      }
    }
  }
コード例 #2
0
ファイル: IrisVisualizer.java プロジェクト: jbudynk/iris
  private void manageAssociatedManagerWindows(ExtSed sed) {

    ExtSed displaying = idm.getDisplaying();

    if (displaying != null) {
      if (!sed.getId().equals(displaying.getId())) {

        // displayed Sed is exiting: make its model manager and metadata windows invisible.

        SpectrumContainer container =
            (SpectrumContainer) displaying.getAttachment(IrisDisplayManager.FIT_MODEL);

        if (container != null) {

          ModelManager2 modelManager = container.getModelManager();
          modelManager.setVisible(false);
          SpectrumVisualEditor editor = idm.getVisualEditor();

          if (editor != null) {
            editor.getJFrame().setVisible(false);
          }
        }

        // new Sed is entering display: make its model manager window visible if active.

        if (sed != null) {

          container = (SpectrumContainer) sed.getAttachment(IrisDisplayManager.FIT_MODEL);

          if (container != null) {
            ModelManager2 modelManager = container.getModelManager();
            modelManager.setVisible(modelManager.isActive());
          }
        }
      }
    }
  }