Title: SGT Beans
1SGT Beans
- Easy-To-Use Graphics Toolkit for Java
Applications
Donald W. Denbo UW/JISAO-NOAA/PMEL
2Introduction
- The Scientific Graphics Toolkit JavaBeans (SGT
Beans) is a collection of Java classes that
provide JavaBeans compatible access to SGT.
- JavaBeans makes SGTs capabilities more
accessible to developers.
- SGT Beans reduces the learning curve needed to
produce graphics applications.
- SGT Beans can be used with several Java IDEs
(NetBeans, JBuilder, etc.).
3History
- SGT was developed to allow a NOAAServer user to
interactively preview data and overlay plots.
- SGT presently used with
- OceanShare, a collaborative tool for in situ data
visualization - ncBrowse, a netCDF file browser
- Climate Data Portal client, an application for
browsing distributed data
- SGT has had 17,000 downloads from 5,800 unique
sites in 70 countries.
4Other Users of SGT
- Buoy Data, Morska Bioloska Postaja (Marine
Biology Station) - Computational Physics Laboratory, University of
Edinburgh - A Utility in JOELib, Computational Chemistry,
University of Tübingen - Coordinated, Interactive Data Visualization for
Neutron Scattering Data, Mikkelson et. al. - Dezo.org has created SGT applet plots.
- An Interactive Program for Determining Junction
Depths in Diffused Silicon Devices, Myers et.
al. - Übungsunterlagen 2002, Wasserspeicher
5Outline
- Demonstration of SGT Bean application.
- Architecture
- Page
- DataModel
- PanelModel
- SGT Bean code examples
- Time series. Plotting data from a netCDF file.
- Add grid plot. Refactor netCDF reader.
- Overlay vectors and add printing, PanelModel
edit, etc.
6Design Goals
- Create easy-to-use JavaBeans from the SGT classes.
- JavaBeans will enable beginner and intermediate
developers a quick entry into SGT graphics.
- SGT Beans will handle most events and provide
tools to easily customize the appearance of the
plot.
7SGT Beans Demonstration
Start Demonstration
8Architecture
- The SGT Beans architecture consists of Page,
DataModel, and PanelModel JavaBeans. The
DataModel and PanelModel beans provide the
state information necessary for Page to create
a graphic display.
Page
9Page JavaBean
- Visual JavaBean. Page can be added to any swing
container.
- Page can have any number of Panels placed inside
it. Each Panel provides an independent graphical
display of data from the DataModel.
- The location and size of the Panels are specified
in the PanelModel.
10Page
Page
11PanelModel JavaBean
- location and size of Panels on Page
- AxisGroups and their positions on a Panel
- Legend position on a Panel
- Titles and annotation positions on a Panel
12PanelModel
PanelModel
13DataModel JavaBean
- DataModel uses information from the PanelModel to
specify the connection between data and
Panel/AxisGroup.
- Contains the SGTData and Attribute objects.
14DataModel
DataModel
15SGT Beans Code Examples
- Example 1 Time Series
- Read time series from netCDF file into SimpleLine
object. - Create graph using Page, DataModel, and
PanelModel. - Load PanelModel from SBExample1.xml.
- Example 2 Add Grid Plot
- Read grid from netCDF file into SimpleGrid
object. - Load PanelModel from SBExample2.xml.
- Example 3 Overlay Vectors and Add Interactivity
- Read vector from netCDF file into SGTVector
object. - Load PanelModel from SBExample3.xml.
- Add color map Legend.
- Add printing, class browsing, zoom reset,
PanelModel edit.
16Example 1 Time Series
SBExample1.xml
17SBExample1 class
18Constuctor
19createGraphic()
20createGraphic() (cont)
21NcSimpleReader1
22getTimeSeries() implementation
23Set shape and read Arrays
24Extract variable and axis values
25Parse time units.
26Parse time offset, create GeoDateArray
27Create SimpleLine and return
28(No Transcript)
29Example 2 Add Grid Plot
SBExample2.xml
30SBExample2 modifications
31Add Grid to Page
32Add createGridAttribute()
33NcSimpleReader2 - Add getGrid()
34Get shape and x y axis data
35Adjust shape and get data grid
36Create SimpleGrid and return
37(No Transcript)
38Example 3 Overlay Vectors and Add Interactivity
SBExample3.xml
39SBExample3 modifications
40Add Grid Legend
41Add Printing
42Reset Zoom and Open JClassTree
43Edit Printer Layout and PanelModel
44NcSimpleReader3 - Add getVector()
45Modify getGeoDateArray
46(No Transcript)
47What next?
- Add LayoutManager support to position Panels when
Page is resized. This requires creating a
graphical wizard to set SpringLayout properties.
- Add Annotation object support. Annotations
include line, oval, point, text, and rectangle
objects.
- Enhance IDE compatibility with popular tools.
- Continue fixing bugs, as they are found, and
adding new useful features.
48References
- SGT Beans
- Plug and Play Scientific Graphics with SGT,
NOAAResearch WebShop 2003, Longmont, CO - SGT home page
- ncBrowse
- ncBrowse A Graphical netCDF/OPeNDAP Browser,
11th ESIP Technical Meeting - OPeNDAP Session,
Boulder, CO - ncBrowse home page
- OceanShare
- Fisheries Oceanography Collaboration Software,
18th AMS International Conference on IIPS,
Orlando, FL - Collaboration home page
- Climate Data Portal
- Climate Data Portal home page