From 9500e155c7d7b1b99cc1f171c1ef3040c8023132 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 17 Jul 2016 16:54:20 +0800 Subject: JNI: Implement Link for hyperlinks in document. --- platform/java/src/com/artifex/mupdf/fitz/Link.java | 20 ++++++++------------ platform/java/src/com/artifex/mupdf/fitz/Page.java | 1 + 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'platform/java/src') diff --git a/platform/java/src/com/artifex/mupdf/fitz/Link.java b/platform/java/src/com/artifex/mupdf/fitz/Link.java index 0ecd8307..34bb648f 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Link.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Link.java @@ -2,18 +2,14 @@ package com.artifex.mupdf.fitz; public class Link { - private long pointer; - - protected native void finalize(); - - public void destroy() { - finalize(); - pointer = 0; - } - - private Link(long p) { - pointer = p; + public Rect bounds; + public int page; + public String uri; + + public Link(Rect bounds, int page, String uri) { + this.bounds = bounds; + this.page = page; + this.uri = uri; } - public native Link getNext(); } diff --git a/platform/java/src/com/artifex/mupdf/fitz/Page.java b/platform/java/src/com/artifex/mupdf/fitz/Page.java index 7763df04..91bd5067 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Page.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Page.java @@ -4,6 +4,7 @@ public class Page { private long pointer; private Annotation nativeAnnots[]; + private Link nativeLinks[]; protected native void finalize(); -- cgit v1.2.3