Пример #1
0
  /**
   * Switches to the simple setup mode only if allowed to.
   *
   * @param exp the experiment to configure
   */
  public void switchToSimple(Experiment exp) {

    if (exp == null) {
      exp = m_advancedPanel.getExperiment();
    }
    if (exp != null && !m_simplePanel.setExperiment(exp)) {
      m_AdvancedSetupRBut.setSelected(true);
      switchToAdvanced(exp);
    } else {
      remove(m_advancedPanel);
      m_advancedPanel.removeNotesFrame();
      add(m_simplePanel, BorderLayout.CENTER);
      validate();
      repaint();
    }
  }
Пример #2
0
 private void setWidgetActivation() {
   m_name.setEnabled(m_enabled);
   m_alliances.setEnabled(m_enabled);
   m_enabledCheckBox.setEnabled(m_disableable.contains(m_playerName));
   m_parent.notifyObservers();
 }
Пример #3
0
  /**
   * Gets the currently configured experiment.
   *
   * @return the currently configured experiment.
   */
  public Experiment getExperiment() {

    if (m_SimpleSetupRBut.isSelected()) return m_simplePanel.getExperiment();
    else return m_advancedPanel.getExperiment();
  }
Пример #4
0
  /**
   * Adds a PropertyChangeListener who will be notified of value changes.
   *
   * @param l a value of type 'PropertyChangeListener'
   */
  public void addPropertyChangeListener(PropertyChangeListener l) {

    m_simplePanel.addPropertyChangeListener(l);
    m_advancedPanel.addPropertyChangeListener(l);
  }