pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1861470 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation: PDAnnotationMarkup.java handlers/PDSoundAppearanceHandler.java
Date Sun, 16 Jun 2019 16:39:21 GMT
Author: msahyoun
Date: Sun Jun 16 16:39:21 2019
New Revision: 1861470

URL: http://svn.apache.org/viewvc?rev=1861470&view=rev
Log:
PDFBOX-4574: add support for Sound appearance handler - implementation for the appearance
handler itself is empty

Added:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDSoundAppearanceHandler.java
Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationMarkup.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationMarkup.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationMarkup.java?rev=1861470&r1=1861469&r2=1861470&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationMarkup.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationMarkup.java
Sun Jun 16 16:39:21 2019
@@ -34,6 +34,7 @@ import org.apache.pdfbox.pdmodel.interac
 import org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDInkAppearanceHandler;
 import org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDPolygonAppearanceHandler;
 import org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDPolylineAppearanceHandler;
+import org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDSoundAppearanceHandler;
 
 /**
  * This class represents the additional fields of a Markup type Annotation. See section 12.5.6
of ISO32000-1:2008
@@ -876,6 +877,10 @@ public class PDAnnotationMarkup extends
             {
                 appearanceHandler = new PDPolylineAppearanceHandler(this);
             }
+            else if (SUB_TYPE_SOUND.equals(getSubtype()))
+            {
+                appearanceHandler = new PDSoundAppearanceHandler(this);
+            }
 
             if (appearanceHandler != null)
             {

Added: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDSoundAppearanceHandler.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDSoundAppearanceHandler.java?rev=1861470&view=auto
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDSoundAppearanceHandler.java
(added)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDSoundAppearanceHandler.java
Sun Jun 16 16:39:21 2019
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2018 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pdfbox.pdmodel.interactive.annotation.handlers;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation;
+
+public class PDSoundAppearanceHandler extends PDAbstractAppearanceHandler
+{
+    private static final Log LOG = LogFactory.getLog(PDSoundAppearanceHandler.class);
+
+    public PDSoundAppearanceHandler(PDAnnotation annotation)
+    {
+        super(annotation);
+    }
+
+    @Override
+    public void generateAppearanceStreams()
+    {
+        generateNormalAppearance();
+        generateRolloverAppearance();
+        generateDownAppearance();
+    }
+
+    @Override
+    public void generateNormalAppearance()
+    {
+        // TODO to be implemented
+    }
+
+    @Override
+    public void generateRolloverAppearance()
+    {
+        // TODO to be implemented
+    }
+
+    @Override
+    public void generateDownAppearance()
+    {
+        // TODO to be implemented
+    }
+}



Mime
View raw message