use of pcgen.core.doomsdaybook.RuleSet in project pcgen by PCGen.
the class NameGenPanel method NameButtonActionPerformed.
private void NameButtonActionPerformed(ActionEvent evt) {
try {
NameButton nb = (NameButton) evt.getSource();
DataElement element = nb.getDataElement();
element.getData();
Rule rule = this.lastRule;
if (rule == null) {
if (chkStructure.isSelected()) {
RuleSet rs = (RuleSet) cbCatalog.getSelectedItem();
rule = rs.getLastRule();
} else {
rule = (Rule) cbStructure.getSelectedItem();
}
this.lastRule = rule;
}
ArrayList<DataValue> aName = rule.getLastData();
setNameText(aName);
setMeaningText(aName);
setPronounciationText(aName);
} catch (Exception e) {
Logging.errorPrint(e.getMessage(), e);
}
}
Aggregations