I was able to achieve this by putting img tag on the same line as the input. I have the img set to 25px by 25px but this strategy should work for a large image as well.
Example code:
Html viewer:
Refer to this for setting the image on java side:
There is two options for showing an image in PolyScope:
ImgComponent - HTML5 [image] concept
LabelComponent - Basically an icon + text
Label component
On the HTML side:
<div id="liveImageImgDiv"><label id="liveImage"/></div>
In the contribution class:
@Label(id = "liveImage")
private LabelComponent liveImage;
In openView():
try{
liveImage.setImage(ImageIO.read(getClass().getResource("/com/ur/urcap/helloworld/impl/ur.png")));
} catch (java.io.IOException e) {
e.printStackTrace();
…