aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/pdf/PDFInternalLink.java
blob: 569e0b66bdc65816e78e66c71281126e42c02c35 (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
45
/*
 * $Id$
 * Copyright (C) 2001-2003 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.pdf;

/**
 * class used to create a PDF internal link
 */
public class PDFInternalLink extends PDFAction {

    private String goToReference;

    /**
     * create an internal link instance.
     *
     * @param goToReference the GoTo Reference to which the link should point
     */
    public PDFInternalLink(String goToReference) {

        this.goToReference = goToReference;
    }

    /**
     * returns the action ncecessary for an internal link
     *
     * @return the action to place next to /A within a Link
     */
    public String getAction() {
        return goToReference;
    }

    /**
     * there is nothing to return for the toPDF method, as it should not be called
     *
     * @return an empty string
     */
    public byte[] toPDF() {
        return new byte[0];
    }

}