Skip to content

Commit

Permalink
FSCanvas, introduced with SWT refactoring, does not have add() method…
Browse files Browse the repository at this point in the history
… anymore.
  • Loading branch information
pdoubleya committed Dec 30, 2009
1 parent 2092a91 commit 5f8b856
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -23,6 +23,7 @@
import com.kitfox.svg.SVGException;
import com.kitfox.svg.app.beans.SVGPanel;
import org.w3c.dom.Element;
import org.xhtmlrenderer.extend.FSCanvas;
import org.xhtmlrenderer.extend.ReplacedElement;
import org.xhtmlrenderer.extend.ReplacedElementFactory;
import org.xhtmlrenderer.extend.UserAgentCallback;
Expand Down Expand Up @@ -99,7 +100,10 @@ public ReplacedElement createReplacedElement(
} else {
SwingReplacedElement result = new SwingReplacedElement(cc);
if (c.isInteractive()) {
c.getCanvas().add(cc);
FSCanvas canvas = c.getCanvas();
if (canvas instanceof JComponent) {
((JComponent) canvas).add(cc);
}
}
return result;
}
Expand Down

0 comments on commit 5f8b856

Please sign in to comment.