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 /** 037 * Check if the image is a truecolor image. 038 * 039 * @return true if the image is a truecolor image. 040 */ 041 public abstract boolean isTrueColor(); 042 043 /** 044 * Check if the image interlace is plane interlace. 045 * 046 * @return true if the image interlace is plane interlace. 047 */ 048 public abstract boolean isPlaneInterlace(); 049 050 /** 051 * Get the array of selected data 052 * 053 * @return array of selected data 054 */ 055 public abstract Object getSelectedData(); 056 057 /** 058 * Get the image displayed in this imageView 059 * 060 * @return the image displayed in this imageView 061 */ 062 public abstract Image getImage(); 063 064 /** 065 * Sets the image 066 * 067 * @param img the image to view 068 */ 069 public abstract void setImage(Image img); 070 071 /** 072 * Get the palette of the image 073 * 074 * @return the palette of the image 075 */ 076 public abstract byte[][] getPalette(); 077 078 /** 079 * Sets the image palette 080 * 081 * @param palette the palette for the image to view 082 */ 083 public abstract void setPalette(byte[][] palette); 084 085 /** 086 * Get the byte array of the image data 087 * 088 * @return the byte array of the image data 089 */ 090 public abstract byte[] getImageByteData(); 091}