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.DataView; 016 017import java.util.HashMap; 018 019import org.eclipse.swt.widgets.Composite; 020import org.eclipse.swt.widgets.Shell; 021 022import hdf.object.HObject; 023import hdf.view.ImageView.ImageView; 024import hdf.view.MetaDataView.MetaDataView; 025import hdf.view.PaletteView.PaletteView; 026import hdf.view.TableView.TableView; 027import hdf.view.TreeView.TreeView; 028 029/** 030 * The data view factory interface for displaying data objects 031 */ 032public abstract class DataViewFactory { 033 /** 034 * Get an instance of TableView given the appropriate constructor parameters 035 * 036 * @param viewer 037 * The data view manager 038 * @param dataPropertiesMap 039 * The properties for the table view 040 * 041 * @throws ClassNotFoundException 042 * If there is an error getting the class for a table view. 043 * 044 * @return the table view. 045 */ 046 @SuppressWarnings("rawtypes") 047 public abstract TableView getTableView(DataViewManager viewer, HashMap dataPropertiesMap) throws ClassNotFoundException; 048 049 /** 050 * Get an instance of ImageView given the appropriate constructor parameters 051 * 052 * @param viewer 053 * The data view manager 054 * @param dataPropertiesMap 055 * The properties for the image view 056 * 057 * @throws ClassNotFoundException 058 * If there is an error getting the class for a image view. 059 * 060 * @return the image view. 061 */ 062 @SuppressWarnings("rawtypes") 063 public abstract ImageView getImageView(DataViewManager viewer, HashMap dataPropertiesMap) throws ClassNotFoundException; 064 065 /** 066 * Get an instance of PaletteView given the appropriate constructor parameters 067 * 068 * @param parent 069 * The parent shell for the palette view 070 * @param viewer 071 * The data view manager 072 * @param theImageView 073 * The image view for the palette view 074 * 075 * @throws ClassNotFoundException 076 * If there is an error getting the class for a palette view. 077 * 078 * @return the palette view. 079 */ 080 public abstract PaletteView getPaletteView(Shell parent, DataViewManager viewer, ImageView theImageView) throws ClassNotFoundException; 081 082 /** 083 * Get an instance of MetaDataView given the appropriate constructor parameters 084 * 085 * @param parent 086 * The parent composite for the maetadata view 087 * @param viewer 088 * The data view manager 089 * @param theObj 090 * The object for the metadata view 091 * 092 * @throws ClassNotFoundException 093 * If there is an error getting the class for a metadata view. 094 * 095 * @return the metadata view. 096 */ 097 public abstract MetaDataView getMetaDataView(Composite parent, DataViewManager viewer, HObject theObj) throws ClassNotFoundException; 098 099 /** 100 * Get an instance of TreeView given the appropriate constructor parameters 101 * 102 * @param parent 103 * The parent composite for the tree view 104 * @param viewer 105 * The data view manager 106 * 107 * @throws ClassNotFoundException 108 * If there is an error getting the class for a tree view. 109 * 110 * @return the tree view. 111 */ 112 public abstract TreeView getTreeView(Composite parent, DataViewManager viewer) throws ClassNotFoundException; 113}