Example #1
0
 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);
   }
 }
Example #2
0
 @Override
 public void read(InputElement ie, Alternative alt) throws XMLStreamException {
   alt.name = ie.getAttribute("name", "");
 }
Example #3
0
 @Override
 public void write(Alternative alt, OutputElement oe) throws XMLStreamException {
   oe.setAttribute("name", alt.getName());
 }
Example #4
0
 public int compareTo(Alternative o) {
   return (name.compareTo(o.getName()));
 }