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 file COPYING.                     *
009 * COPYING can be found at the root of the source code distribution tree.    *
010 * If you do not have access to this file, you may request a copy from       *
011 * help@hdfgroup.org.                                                        *
012 ****************************************************************************/
013
014package hdf.view;
015
016import java.awt.Image;
017import java.awt.Rectangle;
018
019/**
020 * The image view interface for displaying image object
021 *
022 * @author Peter X. Cao
023 * @version 2.4 9/6/2007
024 */
025public abstract interface ImageView extends DataView {
026    /**
027     * Returns the selected area of the image
028     *
029     * @return the rectangle of the selected image area.
030     */
031    public abstract Rectangle getSelectedArea();
032
033    /** @return true if the image is a truecolor image. */
034    public abstract boolean isTrueColor();
035
036    /** @return true if the image interlace is plane interlace. */
037    public abstract boolean isPlaneInterlace();
038
039    /** @return array of selected data */
040    public abstract Object getSelectedData();
041
042    /** @return the image displayed in this imageView */
043    public abstract Image getImage();
044
045    /** Sets the image
046     *
047     * @param img the image to view
048     */
049    public abstract void setImage(Image img);
050
051    /** @return the palette of the image */
052    public abstract byte[][] getPalette();
053
054    /** Sets the image palette
055     *
056     * @param palette the palette for the image to view
057     */
058    public abstract void setPalette(byte[][] palette);
059
060    /** @return the byte array of the image data */
061    public abstract byte[] getImageByteData();
062
063}