group.cib = false; group.cdted = false;
    public void groupFrames(Vector frames, Vector groups, boolean isDchum)            throws MakeTocException {        Frame frame;        Group group;        int groupCount;        int nFrames = frames.size();        Debug.message("maketoc", "MakeToc: *** grouping frames ***");        /* For each frame file */        for (int i = 0; i < nFrames; i++) {            Debug.message("maketocdetail",                    "MakeToc: group addition, starting outer loop");            // Assuming that the vector objects are in the same order            // as initally loaded.            frame = (Frame) frames.elementAt(i);            if (!frame.marked) {                groupCount = groups.size();                group = new Group();                group.left = maxSide / 2;                group.right = group.left + 1;                group.top = maxSide / 2;                group.bottom = group.top + 1;                group.horiz_pos[group.top] = frame.top;                group.horiz_pos[group.bottom] = frame.bottom;                group.vert_pos[group.left] = frame.left;                group.vert_pos[group.right] = frame.right;                group.h_interval = frame.h_interval;                group.v_interval = frame.v_interval;                group.h_resolution = frame.h_resolution;                group.v_resolution = frame.v_resolution;                group.scale = frame.scale;                group.zone = frame.zone;                group.cib = frame.cib;                group.cdted = frame.cdted;                group.cib = false;                group.cdted = false;                frame.x = group.left;                /*                 * DKS. Changed from top to bottom to fix bug in                 * Theron's frame numbering                 */                /*                 * Should start numbering at BOTTOM (southern-most                 * part) of group                 */                /* DKS. Switched back to fix row # <=0 bug */                frame.y = group.top;                frame.group = groupCount;                frame.marked = true;                Debug.message("maketocdetail",                        "Maketoc.groupFrames: created group " + groupCount                                + " for frame " + i + ", - " + frame.filename                                + " checking other frames for neighbors");                /*                 * If Dchum, create 1 group for each file. No need for                 * call to "add".                 */                if (!isDchum) {                    for (int j = 0; j < nFrames; j++) {                        if (i == j) {                            Debug.message("maketocdetail",                                    "Maketoc.groupFrames: inner loop, i = j = "                                            + i                                            + ", frame that created group added to group, expecting false return");                            continue;                        }                        Frame f = (Frame) frames.elementAt(j);                        if (addFrameToGroup(group, f, groupCount)) {                            Debug.message("maketocdetail",                                    "Maketoc.groupFrames: added frame " + j                                            + " to group " + groupCount);                            continue;                        }                    }                }                Debug.message("maketocdetail",                        "Maketoc.groupFrames: adding another group - "                                + groupCount + " *******************\n\n");                groups.add(group);            } /* if !frame.marked */            fireProgressUpdate(ProgressEvent.UPDATE,                    "Organizing frames",                    i,                    nFrames);        }/* for (i = 0; i < nFrames; i++) */        if (Debug.debugging("maketoc")) {            Debug.output("MakeToc: Number of boundary rectangles (groups): "                    + groups.size());        }    }