Пример #1
0
 private void exportSelectedCharacters() {
   if (herolabsCharacterList.getSelectedIndex() >= 0) {
     Character c =
         (Character)
             herolabsCharacterList
                 .getModel()
                 .getElementAt(herolabsCharacterList.getSelectedIndex());
     Config.ConfigEntry ce = config.get(c.getName());
     if (ce != null && ce.isOk()) {
       exportCharacters();
     } else {
       JOptionPane.showMessageDialog(
           panel,
           "The character you selected hasn't been configured yet.  Please configure "
               + "and try again.",
           "Export Warning",
           JOptionPane.WARNING_MESSAGE);
     }
   }
 }
Пример #2
0
 private void defaultNonOverriddenConfigurations() {
   ListModel model = herolabsCharacterList.getModel();
   for (int i = 0; i < model.getSize(); i++) {
     config.populateCharacterWithDefaults(((Character) model.getElementAt(i)).getName(), false);
   }
 }