コード例 #1
0
 private void resetPanel() {
   if (!options.hasData()) {
     currentPartition = null;
     optionsPanels.clear();
     optionsPanelParent.removeAll();
   }
 }
コード例 #2
0
  /**
   * Sets the current partition that this panel is displaying
   *
   * @param partition the new partition to display
   */
  private void setCurrentPartition(AbstractPartitionData partition) {
    if (partition != null) {
      if (currentPartition != null) optionsPanelParent.removeAll();

      AncestralStatesOptionsPanel panel = optionsPanels.get(partition);
      if (panel == null) {
        panel = new AncestralStatesOptionsPanel(this, options, partition);
        optionsPanels.put(partition, panel);
      }

      currentPartition = partition;

      panel.setupPanel();

      optionsPanelParent.add(panel);

      updateBorder();
    }
  }