IronImage - Vaadin Add-on Directory
Vaadin 10 component to integrate# IronImage
Vaadin 10 Java integration of https://github.com/PolymerElements/iron-image
## Usage
### Flow only
Adding an iron image as a component.
```
Component container = ...;
IronImage image = new IronImage("http://.../example.jpg");
// setting some basic properties
image.setSizing(IronImage.Sizing.COVER);
// ...
// styling
image.addClassName("example-image");
// image.setWidth("100px");
// activate preloading
image.setPlaceholder("http://.../small-placeholder.jpg");
image.activatePreload();
container.add(image);
```
### Polymer + Flow
Using the image in a Polymer template.
```
...
```
and attaching it to Flow
```
@Route("...")
public class View ... {
@Id("example-image")
private IronImage image;
@PostConstruct
private void init() {
...
// inform us, if the image source could not be loaded
image.addErrorChangedListener(event -> System.out.println(event.isError() ? "error at loading image" : "everything is fine"));
...
}
}
```
iron-image on webcomponents.orgIronImage version 1.0.1
Removed banner.txt and references to slf4j.
IronImage version 1.0.2.rc1
- modified artifact name to `iron-image`
- updated to Vaadin 10 RC 1
IronImage version 1.0.3
- support for Vaadin 10.0.3