// Path: src/omr/SheetStructure.java
// public enum SheetStructureEvent {
// 	REGISTRATION_CHANGED,
// 	BUBBLE_POSITIONS_CHANGED,
//    	STRUCTURE_CHANGED,
//    	ANSWER_KEY_CHANGED
//    }


import java.io.File;
import java.io.IOException;
import java.util.AbstractList;
import java.util.Observable;
import java.util.Observer;
import omr.SheetStructure.SheetStructureEvent;
     * Automatically sets thresholds to sensible values. 
     */
    public void calculateThreshold() {
        histogram.guessThreshold();
    }
    
    /**
     * Calculates all answers using the global black and white thresholds (set in the global histogram).
     */
    public void calculateAnswers() {
        int blackThreshold = histogram.getBlackThreshold();
        int whiteThreshold = histogram.getWhiteThreshold();
        
        for (Sheet sheet : answerSheets) {
            if (thresholdingStrategy == ThresholdingStrategy.GLOBAL) {                
                for (QuestionGroup group : sheetStructure.getQuestionGroups()) {
                    sheet.calculateAnswers(group, blackThreshold, whiteThreshold);
                }
            } else {
                for (QuestionGroup group : sheetStructure.getQuestionGroups()) {
                    sheet.calculateAnswers(group, sheet.getHistogram().getBlackThreshold(), sheet.getHistogram().getWhiteThreshold());
                }
            }
        }
    }
    
    /**
     * Notified by sheet structure when it changes.
     */
    public void update(Observable source, Object event) {
// Path: src/omr/SheetStructure.java
// public enum SheetStructureEvent {
// 	REGISTRATION_CHANGED,
// 	BUBBLE_POSITIONS_CHANGED,
//    	STRUCTURE_CHANGED,
//    	ANSWER_KEY_CHANGED
//    }


// Path: src/omr/Project.java
import java.io.File;
import java.io.IOException;
import java.util.AbstractList;
import java.util.Observable;
import java.util.Observer;
import omr.SheetStructure.SheetStructureEvent;

     * Automatically sets thresholds to sensible values. 
     */
    public void calculateThreshold() {
        histogram.guessThreshold();
    }
    
    /**
     * Calculates all answers using the global black and white thresholds (set in the global histogram).
     */
    public void calculateAnswers() {
        int blackThreshold = histogram.getBlackThreshold();
        int whiteThreshold = histogram.getWhiteThreshold();
        
        for (Sheet sheet : answerSheets) {
            if (thresholdingStrategy == ThresholdingStrategy.GLOBAL) {                
                for (QuestionGroup group : sheetStructure.getQuestionGroups()) {
                    sheet.calculateAnswers(group, blackThreshold, whiteThreshold);
                }
            } else {
                for (QuestionGroup group : sheetStructure.getQuestionGroups()) {
                    sheet.calculateAnswers(group, sheet.getHistogram().getBlackThreshold(), sheet.getHistogram().getWhiteThreshold());
                }
            }
        }
    }
    
    /**
     * Notified by sheet structure when it changes.
     */
    public void update(Observable source, Object event) {
    	if (SheetStructureEvent.STRUCTURE_CHANGED == event || 