TODO Add a URL setter for the image property. @author gbrown
10991100110111021103110411051106
@Override protected void attach() { super.attach(); ImageNode imageNode = (ImageNode)getNode(); imageNode.getImageNodeListeners().add(this); }
11071108110911101111111211131114
@Override protected void detach() { super.detach(); ImageNode imageNode = (ImageNode)getNode(); imageNode.getImageNodeListeners().remove(this); }
111411151116111711181119112011211122112311241125
} @Override public void validate() { if (!isValid()) { ImageNode imageNode = (ImageNode)getNode(); Image image = imageNode.getImage(); if (image == null) { setSize(0, 0); } else { setSize(image.getWidth(), image.getHeight());
112811291130113111321133113411351136113711381139
super.validate(); } } public void paint(Graphics2D graphics) { ImageNode imageNode = (ImageNode)getNode(); Image image = imageNode.getImage(); if (image != null) { image.paint(graphics); } }
10961097109810991100110111021103
11041105110611071108110911101111
111111121113111411151116111711181119112011211122
112511261127112811291130113111321133113411351136