Exemplo n.º 1
0
 public Relation saveAction() {
   relation.setNewVals(relComponents, commentPane);
   /** In case we are adding a new relation that matches a ghost relation that already exists: */
   List<Relation> model = fileManager.getRelationList();
   if (model.contains(relation)) {
     Relation original = model.get(model.indexOf(relation));
     if (original.isGhost()) {
       relation = original;
       relation.setNewVals(relComponents, commentPane);
     }
   }
   if (!relation.getIdentifierSpan().equals("")) {
     disableAll();
   }
   return relation;
 }
Exemplo n.º 2
0
 public Relation rejectAction() {
   relation.setNoVals(relComponents, commentPane);
   List<Relation> model = fileManager.getRelationList();
   if (model.contains(relation)) {
     Relation original = model.get(model.indexOf(relation));
     if (original.isGhost()) {
       relation = original;
       relation.setNewVals(relComponents, commentPane);
     }
   }
   disableAll();
   return relation;
 }