Package de.fu_berlin.inf.dpp.whiteboard.sxe.records

Examples of de.fu_berlin.inf.dpp.whiteboard.sxe.records.SetRecord


      return false;
    }
  }

  protected void applyNullRecord(SetRecord toConflict) {
    SetRecord setRecord = new SetRecord(toConflict.getTarget(),
        toConflict.getVersion());
    // let's apply the conflict locally, too, to ensure a same version
    setRecord.apply(document);
  }
View Full Code Here


   *
   * @param toConflict
   */
  protected void applyLocallyAndsentConflictingSetRecord(SetRecord toConflict) {
    LinkedList<IRecord> records = new LinkedList<IRecord>();
    SetRecord setRecord = new SetRecord(toConflict.getTarget(),
        toConflict.getVersion());
    // let's apply the conflict locally, too, to ensure a same version
    setRecord.apply(document);
    records.add(setRecord);
    commitRecords(records);
  }
View Full Code Here

  public boolean contains(Object o) {
    if (!(o instanceof SetRecord))
      return false;

    ListIterator<SetRecord> it = listIterator(size());
    SetRecord r = (SetRecord) o;
    SetRecord previous;

    while (it.hasPrevious()) {
      previous = it.previous();
      if (previous.getVersion() == r.getVersion())
        return r.equals(previous);
      if (previous.getVersion() < r.getVersion())
        break;
    }

    return false;
  }
View Full Code Here

    if (tmp != null) {
      parent = document.getElementRecordById(tmp);
    }

    SetRecord record = new SetRecord(target, version);

    Boolean visible = getBoolean(RecordEntry.VISIBLE);
    if (visible != null)
      record.setSetVisibilityTo(visible);

    tmp = getString(RecordEntry.CHDATA);
    if (tmp != null)
      record.setChdata(tmp);

    if (parent != null)
      record.setParentToChange(parent);

    Float pw = getFloat(RecordEntry.PRIMARY_WEIGHT);
    if (pw != null)
      record.setPrimaryWeight(pw);

    record.setSender(getSender());

    return record;
  }
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.whiteboard.sxe.records.SetRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.