private void resetToDefaultsForSelectedCharacters() { int confirmation = JOptionPane.showConfirmDialog( panel, "NOTE: this will attempt to replace any custom configuration for the selected characters with the Portfolio defaults. \nAre you certain you wish to do this?", "Reset to portfolio defaults?", JOptionPane.YES_NO_OPTION); if (confirmation == JOptionPane.YES_OPTION) { for (Object character : herolabsCharacterList.getSelectedValues()) { config.populateCharacterWithDefaults(((Character) character).getName(), true); } } herolabsCharacterList.repaint(); }
private void defaultNonOverriddenConfigurations() { ListModel model = herolabsCharacterList.getModel(); for (int i = 0; i < model.getSize(); i++) { config.populateCharacterWithDefaults(((Character) model.getElementAt(i)).getName(), false); } }