private void reconnectNameListeners() { for (Alternative a : modelManager.getModel().getAlternatives()) { a.addPropertyChangeListener(nameListener); } if (modelManager.getModel() instanceof SMAATRIModel) { for (Alternative cat : ((SMAATRIModel) modelManager.getModel()).getCategories()) { cat.addPropertyChangeListener(nameListener); } } for (Criterion c : modelManager.getModel().getCriteria()) { c.addPropertyChangeListener(nameListener); } }
@Override public void read(InputElement ie, Alternative alt) throws XMLStreamException { alt.name = ie.getAttribute("name", ""); }
@Override public void write(Alternative alt, OutputElement oe) throws XMLStreamException { oe.setAttribute("name", alt.getName()); }
public int compareTo(Alternative o) { return (name.compareTo(o.getName())); }