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 files COPYING and Copyright.html. *
009 * COPYING can be found at the root of the source code distribution tree.    *
010 * Or, see https://support.hdfgroup.org/products/licenses.html               *
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    /** Sets the image
049     *
050     * @param img the image to view
051     */
052    public abstract void setImage(Image img);
053
054    /** @return the palette of the image */
055    public abstract byte[][] getPalette();
056
057    /** Sets the image palette
058     *
059     * @param palette the palette for the image to view
060     */
061    public abstract void setPalette(byte[][] palette);
062
063    /** @return the byte array of the image data */
064    public abstract byte[] getImageByteData();
065
066}