use of org.apache.pivot.wtk.text.ImageNode in project pivot by apache.
the class TextPaneSkinImageNodeView method paint.
@Override
public void paint(Graphics2D graphics) {
ImageNode imageNode = (ImageNode) getNode();
Image image = imageNode.getImage();
if (image != null) {
image.paint(graphics);
}
}
use of org.apache.pivot.wtk.text.ImageNode in project pivot by apache.
the class TextPaneSkinImageNodeView method detach.
@Override
protected void detach() {
super.detach();
ImageNode imageNode = (ImageNode) getNode();
imageNode.getImageNodeListeners().remove(this);
}
use of org.apache.pivot.wtk.text.ImageNode in project pivot by apache.
the class TextPaneSkinImageNodeView method childLayout.
@Override
protected void childLayout(int breakWidth) {
ImageNode imageNode = (ImageNode) getNode();
Image image = imageNode.getImage();
if (image == null) {
setSize(0, 0);
} else {
setSize(image.getWidth(), image.getHeight());
}
}
Aggregations