All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.belladati.sdk.impl.ImageViewImpl Maven / Gradle / Ivy

Go to download

The BellaDati SDK allows accessing a BellaDati server from 3rd-party applications using Java. This project contains the implementation for standard Java.

The newest version!
package com.belladati.sdk.impl;

import java.awt.image.BufferedImage;
import java.util.Collection;

import com.belladati.sdk.filter.Filter;
import com.belladati.sdk.view.ImageView;

class ImageViewImpl extends ViewImpl implements ImageView {

	ImageViewImpl(BellaDatiServiceImpl service, BufferedImage image) throws UnknownViewTypeException {
		super(service, image);
	}

	@Override
	public BufferedImage loadContent(Filter... filters) {
		return (BufferedImage) super.loadContent(filters);
	}

	@Override
	public BufferedImage loadContent(Collection> filters) {
		return (BufferedImage) super.loadContent(filters);
	}

	/**
	 * This class is a holder for an image
	 * 
	 * @author pavol.kovac
	 */
	static class ImageImpl implements Image {
		private final String id;
		private final BufferedImage image;

		/**
		 * Constructor accepting image ID and image itself
		 * 
		 * @param id of the image
		 * @param image itself
		 */
		public ImageImpl(String id, BufferedImage image) {
			this.id = id;
			this.image = image;
		}

		public String getId() {
			return id;
		}

		public BufferedImage getImage() {
			return image;
		}

	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy