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.MetaDataView; 016 017import org.eclipse.swt.SWT; 018import org.eclipse.swt.layout.FillLayout; 019import org.eclipse.swt.layout.GridData; 020import org.eclipse.swt.widgets.Composite; 021import org.eclipse.swt.widgets.Text; 022 023import hdf.object.Datatype; 024import hdf.object.HObject; 025import hdf.view.DataView.DataViewManager; 026 027/** 028 * 029 *The metadata view interface for displaying datatype metadata information 030 */ 031public class DefaultDatatypeMetaDataView extends DefaultLinkMetaDataView implements MetaDataView { 032 033 private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(DefaultDatatypeMetaDataView.class); 034 035 /** 036 *The metadata view interface for displaying datatype metadata information 037 * 038 * @param parentComposite 039 * the parent visual object 040 * @param viewer 041 * the viewer to use 042 * @param theObj 043 * the object to display the metadata info 044 */ 045 public DefaultDatatypeMetaDataView(Composite parentComposite, DataViewManager viewer, HObject theObj) { 046 super(parentComposite, viewer, theObj); 047 } 048 049 @Override 050 protected void addObjectSpecificContent() { 051 super.addObjectSpecificContent(); 052 053 org.eclipse.swt.widgets.Group datatypeInfoGroup = new org.eclipse.swt.widgets.Group(generalObjectInfoPane, SWT.NONE); 054 datatypeInfoGroup.setFont(curFont); 055 datatypeInfoGroup.setText("Type"); 056 datatypeInfoGroup.setLayout(new FillLayout()); 057 datatypeInfoGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); 058 059 Text infoArea = new Text(datatypeInfoGroup, SWT.MULTI); 060 infoArea.setFont(curFont); 061 infoArea.setText(((Datatype) dataObject).getDescription()); 062 infoArea.setEditable(false); 063 } 064 065}