aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/extensions/Bookmarks.java
blob: 69ab04f523db3972263ad0b12ae79addf094d83e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * $Id$
 * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
 * For details on use and redistribution please refer to the
 * LICENSE file included with these sources.
 */

package org.apache.fop.extensions;

import org.apache.fop.fo.FONode;

import java.util.*;

import org.xml.sax.Attributes;

public class Bookmarks extends ExtensionObj {
    private ArrayList outlines = new ArrayList();
    private BookmarkData data;

    public Bookmarks(FONode parent) {
        super(parent);
    }

    protected void addChild(FONode obj) {
        if (obj instanceof Outline) {
            outlines.add(obj);
        }
    }

    public BookmarkData getData() {
        return data;
    }

    public void end() {
        log.debug("adding bookmarks to area tree");
        data = new BookmarkData();
        for(int count = 0; count < outlines.size(); count++) {
            Outline out = (Outline)outlines.get(count);
            data.addSubData(out.getData());
        }
        // add data to area tree for resolving and handling
    }
}