Directory

← Back

TiffViewer

TiffViewer

Author

Rating

Popularity

<100

-Addon works on client side. -Display file only with .tiff (tiff) format -Supports multipage -Drag mode -Provide only display mode (tiff as img) -based on script https://github.com/seikichi/tiff.js -dragandscroll http://github.com/asvd/intence -allows

Simple usage

TifffViewer c = new TifffViewer(file); layout.addComponent(c);

Vaadin 7 support version <= 1.1.2 Vaadin 8 support version >=1.2

Sample code

TiffViewer c = new TiffViewer(file);
layout.addComponent(c);
        TiffViewer tiff = new TiffViewer(new File("tif.tiff"));
        tiff.addPageChangeListener(new PageChangeListener() {
			@Override
			public void pageChange(Integer page) {
				System.out.println("PAGE CHANGE: "+page);
			}
		});
        tiff.addAngleChangeListener(new AngleChangeListener() {
			@Override
			public void angleChange(Integer value) {
				System.out.println("ANGLE CHANGE: "+value);
				component.setPage(3);
			}
		});
        tiff.addDownloadTiffListener(new DownloadTiffListener() {
			@Override
			public void download() {
				System.out.println("TIFF WAS DOWNLOAD");
			}
		});
setPage(int i)
setPreviousPageCaption(String htmlCaption)
setNextPageCaption(String htmlCaption)
setPageCaption(String htmlCaption)
setToPageCaption(String htmlCaption)
setIncreaseButtonCaption(String htmlCaption)
setDecreaseButtonCaption(String htmlCaption)
setNextAngleButtonCaption(String htmlCaption)
setBackAngleButtonCaption(String htmlCaption)
setPrintButtonCaption(String htmlCaption)
setDownloadButtonCaption(String htmlCaption)
setAngleButtonVisible(boolean visible)
setDownloadBtnVisible(boolean visible)
addPageChangeListener(PageChangeListener listener)
removePageChangeListener(PageChangeListener listener)
addAngleChangeListener(AngleChangeListener listener)
removeAngleChangeListener(AngleChangeListener listener)
addDownloadTiffListener(DownloadTiffListener listener)
removeDownloadTiffListener(DownloadTiffListener listener)

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

added page,angle change listener and download click listener

Released
2017-09-08
Maturity
BETA
License
MIT License

Compatibility

Framework
Vaadin 7.1+
Vaadin 8.0+ in 1.2.0
Browser
N/A

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online