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