Author: tilman
Date: Fri Oct 14 16:36:49 2016
New Revision: 1764945

URL: http://svn.apache.org/viewvc?rev=1764945&view=rev
Log:
PDFBOX-2941: avoid UnsupportedOperationException when hovering over Pattern 
scn, draw "Pattern" tooltip instead

Modified:
    
pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java

Modified: 
pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java?rev=1764945&r1=1764944&r2=1764945&view=diff
==============================================================================
--- 
pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
 (original)
+++ 
pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
 Fri Oct 14 16:36:49 2016
@@ -22,6 +22,7 @@ import java.io.IOException;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDResources;
 import org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace;
+import org.apache.pdfbox.pdmodel.graphics.color.PDPattern;
 
 /**
  * @author Khyrul Bashar
@@ -49,6 +50,11 @@ final class SCNToolTip extends ColorTool
         {
             e.printStackTrace();
         }
+        if (colorSpace instanceof PDPattern)
+        {
+            setToolTipText("<html>Pattern</html>");
+            return;
+        }
         if (colorSpace != null)
         {
             try


Reply via email to