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
027public class DefaultDatatypeMetaDataView extends DefaultLinkMetaDataView implements MetaDataView {
028
029    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(DefaultDatatypeMetaDataView.class);
030
031    public DefaultDatatypeMetaDataView(Composite parentComposite, DataViewManager viewer, HObject theObj) {
032        super(parentComposite, viewer, theObj);
033    }
034
035    @Override
036    protected void addObjectSpecificContent() {
037        super.addObjectSpecificContent();
038
039        org.eclipse.swt.widgets.Group datatypeInfoGroup = new org.eclipse.swt.widgets.Group(generalObjectInfoPane, SWT.NONE);
040        datatypeInfoGroup.setFont(curFont);
041        datatypeInfoGroup.setText("Type");
042        datatypeInfoGroup.setLayout(new FillLayout());
043        datatypeInfoGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
044
045        Text infoArea = new Text(datatypeInfoGroup, SWT.MULTI);
046        infoArea.setFont(curFont);
047        infoArea.setText(((Datatype) dataObject).getDescription());
048        infoArea.setEditable(false);
049    }
050
051}