Package com.dmissoh.biologic.models

Examples of com.dmissoh.biologic.models.Family


    Collections.sort(runningEvents);
  }

  private void addLogEntry(Entry logEntry) {
    String logEntryName = logEntry.getName();
    Family family = ModelUtils
        .getFamilyForName(getFamilies(), logEntryName);
    if (family != null) {
      family.getLogEntries().push(logEntry);
    }
    sequenceEditorTableViewer.getInput().addLogEntry(logEntry);
    sequenceEditorTableViewer
        .setSelection(new StructuredSelection(logEntry));
    notifyLogEntryListeners();
View Full Code Here


public class ModelUtils {

  public static void fillFamilies(List<Family> families, Sequence sequence) {
    for (Entry entry : sequence.getLogEntries()) {
      Family family = getFamilyForName(families, entry.getName());
      if (family != null) {
        family.getLogEntries().push(entry);
      }
    }
  }
View Full Code Here

  public static List<Family> getFamiliesFromPreferences() {
    List<Family> families = new ArrayList<Family>();
    List<EventConfiguration> configs = BioLogicPreferences.getInstance()
        .loadPersistedValueVariables();
    for (EventConfiguration eventconfig : configs) {
      Family family = new Family(eventconfig.getName());
      family.setStartKey(eventconfig.getStartKey());
      family.setEndKey(eventconfig.getEndKey());
      family.setPunctual(eventconfig.isPunctual());
      families.add(family);
    }
    return families;
  }
View Full Code Here

  }

  public static List<Family> spitIntoFamilies(Sequence sequence) {
    Map<String, Family> nameToFamilyMap = new HashMap<String, Family>();
    for (Entry entry : sequence.getLogEntries()) {
      Family family = nameToFamilyMap.get(entry.getName());
      if (family == null) {
        family = new Family(entry.getName());
        nameToFamilyMap.put(entry.getName(), family);
      }
      family.getLogEntries().push(entry);
    }
    return new ArrayList<Family>(nameToFamilyMap.values());
  }
View Full Code Here

TOP

Related Classes of com.dmissoh.biologic.models.Family

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.