001/*****************************************************************************
002 * Copyright by The HDF Group.                                               *
003 * Copyright by the Board of Trustees of the University of Illinois.         *
004 * All rights reserved.                                                      *
005 *                                                                           *
006 * This file is part of the HDF Java Products distribution.                  *
007 * The full copyright notice, including terms governing use, modification,   *
008 * and redistribution, is contained in the COPYING file, which can be found  *
009 * at the root of the source code distribution tree,                         *
010 * or in https://www.hdfgroup.org/licenses.                                  *
011 * If you do not have access to either file, you may request a copy from     *
012 * help@hdfgroup.org.                                                        *
013 ****************************************************************************/
014
015package hdf.view.ImageView;
016
017import java.awt.Image;
018import java.awt.Rectangle;
019
020import hdf.view.DataView.DataView;
021
022/**
023 * The image view interface for displaying image object
024 *
025 * @author Peter X. Cao
026 * @version 2.4 9/6/2007
027 */
028public abstract interface ImageView extends DataView {
029    /**
030     * Returns the selected area of the image
031     *
032     * @return the rectangle of the selected image area.
033     */
034    public abstract Rectangle getSelectedArea();
035
036    /** @return true if the image is a truecolor image. */
037    public abstract boolean isTrueColor();
038
039    /** @return true if the image interlace is plane interlace. */
040    public abstract boolean isPlaneInterlace();
041
042    /** @return array of selected data */
043    public abstract Object getSelectedData();
044
045    /** @return the image displayed in this imageView */
046    public abstract Image getImage();
047
048    /**
049     * Sets the image
050     *
051     * @param img the image to view
052     */
053    public abstract void setImage(Image img);
054
055    /** @return the palette of the image */
056    public abstract byte[][] getPalette();
057
058    /**
059     * Sets the image palette
060     *
061     * @param palette the palette for the image to view
062     */
063    public abstract void setPalette(byte[][] palette);
064
065    /** @return the byte array of the image data */
066    public abstract byte[] getImageByteData();
067}