/*-------------------------------------------------------------------------*/
  public void refresh(String name) {
    if (name == null) {
      return;
    }

    DifficultyLevel dl = Database.getInstance().getDifficultyLevels().get(name);

    impl.setText(dl.getClass().getName());
    sortOrder.setValue(dl.getSortOrder());
  }
  /*-------------------------------------------------------------------------*/
  public void copyItem(String newName) {
    SwingEditor.instance.setDirty(SwingEditor.Tab.DIFFICULTY_LEVELS);
    DifficultyLevel current =
        Database.getInstance().getDifficultyLevels().get((String) names.getSelectedValue());

    try {
      DifficultyLevel dl = current.getClass().newInstance();
      dl.setName(newName);
      Database.getInstance().getDifficultyLevels().put(dl.getName(), dl);
      refreshNames(newName);
    } catch (Exception x) {
      throw new MazeException(x);
    }
  }