Author: tilman Date: Fri Oct 14 16:36:44 2016 New Revision: 1764944 URL: http://svn.apache.org/viewvc?rev=1764944&view=rev Log: PDFBOX-2941: avoid UnsupportedOperationException when hovering over Pattern scn, draw "Pattern" tooltip instead Modified: pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java Modified: pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java?rev=1764944&r1=1764943&r2=1764944&view=diff ============================================================================== --- pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java (original) +++ pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java Fri Oct 14 16:36:44 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("Pattern"); + return; + } if (colorSpace != null) { try