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 http://hdfgroup.org/products/hdf-java/doc/Copyright.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; 016 017import java.awt.Image; 018import java.awt.Rectangle; 019 020/** 021 * The image view interface for displaying image object 022 * 023 * @author Peter X. Cao 024 * @version 2.4 9/6/2007 025 */ 026public abstract interface ImageView extends DataView { 027 /** 028 * Returns the selected area of the image 029 * 030 * @return the rectangle of the selected image area. 031 */ 032 public abstract Rectangle getSelectedArea(); 033 034 /** @return true if the image is a truecolor image. */ 035 public abstract boolean isTrueColor(); 036 037 /** @return true if the image interlace is plane interlace. */ 038 public abstract boolean isPlaneInterlace(); 039 040 /** @return array of selected data */ 041 public abstract Object getSelectedData(); 042 043 /** @return the image displayed in this imageView */ 044 public abstract Image getImage(); 045 046 /** Sets the image 047 * 048 * @param img the image to view 049 */ 050 public abstract void setImage(Image img); 051 052 /** @return the palette of the image */ 053 public abstract byte[][] getPalette(); 054 055 /** Sets the image palette 056 * 057 * @param palette the palette for the image to view 058 */ 059 public abstract void setPalette(byte[][] palette); 060 061 /** @return the byte array of the image data */ 062 public abstract byte[] getImageByteData(); 063 064}