Download presentation
Presentation is loading. Please wait.
Published byGwendolyn Bates Modified over 9 years ago
1
SGT Beans Easy-To-Use Graphics Toolkit for Java Applications Donald W. Denbo UW/JISAO-NOAA/PMEL
2
2003-10-23NOAATech 2004, Silver Spring, MD2 Introduction The Scientific Graphics Toolkit JavaBeans (SGT Beans) is a collection of Java classes that provide JavaBeans compatible access to SGT. JavaBeans makes SGT’s 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.).
3
2003-10-23NOAATech 2004, Silver Spring, MD3 History 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 visualizationOceanShare –ncBrowse, a netCDF file browserncBrowse –Climate Data Portal client, an application for browsing distributed dataClimate Data Portal client SGT has had ~17,000 downloads from 5,800 unique sites in 70 countries.
4
2003-10-23NOAATech 2004, Silver Spring, MD4 Other Users of SGT Buoy Data, Morska Bioloska Postaja (Marine Biology Station)Buoy Data Computational Physics Laboratory, University of EdinburghComputational Physics Laboratory A Utility in JOELib, Computational Chemistry, University of TübingenA UtilityJOELib “Coordinated, Interactive Data Visualization for Neutron Scattering Data”, Mikkelson et. al.Coordinated, Interactive Data Visualization for Neutron Scattering Data Dezo.org has created SGT applet plots.plots. “An Interactive Program for Determining Junction Depths in Diffused Silicon Devices”, Myers et. al.An Interactive Program for Determining Junction Depths in Diffused Silicon Devices Übungsunterlagen 2002, WasserspeicherWasserspeicher
5
2003-10-23NOAATech 2004, Silver Spring, MD5 Outline SGT Bean design goals Demonstration of SGT Bean application. Architecture –Page –DataModel –PanelModel SGT Bean code examples 1.Time series. Plotting data from a netCDF file. 2.Add grid plot. Refactor netCDF reader. 3.Overlay vectors and add printing, PanelModel edit, etc. What Next?
6
2003-10-23NOAATech 2004, Silver Spring, MD6 Design 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.
7
2003-10-23NOAATech 2004, Silver Spring, MD7 SGT Beans Demonstration Start Demonstration
8
2003-10-23NOAATech 2004, Silver Spring, MD8 Architecture 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 DataModelPanelModel 1 1
9
2003-10-23NOAATech 2004, Silver Spring, MD9 Page 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.
10
2003-10-23NOAATech 2004, Silver Spring, MD10 Page JPane 1 1 DataGroupLayer * Panel labelLayer legendLayer 2 components Layer 1..*
11
2003-10-23NOAATech 2004, Silver Spring, MD11 PanelModel JavaBean Non-visual JavaBean. PanelModel maintains: –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
12
2003-10-23NOAATech 2004, Silver Spring, MD12 PanelModel PanelHolder 1..* DataGroup 1..* Legend * Label * Margin 1 AxisHolder 2
13
2003-10-23NOAATech 2004, Silver Spring, MD13 DataModel JavaBean Non-visual JavaBean. DataModel uses information from the PanelModel to specify the connection between data and Panel/AxisGroup. Contains the SGTData and Attribute objects.
14
2003-10-23NOAATech 2004, Silver Spring, MD14 DataModel 1..* * DataHolder 1..* DataGroupLegend Attribute 1 SGTData 1 PanelHolder 1 11
15
2003-10-23NOAATech 2004, Silver Spring, MD15 SGT Beans Code Examples Example 1: Time SeriesExample 1 –Read time series from netCDF file into SimpleLine object.Read time series –Create graph using Page, DataModel, and PanelModel. –Load PanelModel from SBExample1.xml.SBExample1.xml. Example 2: Add Grid PlotExample 2 –Read grid from netCDF file into SimpleGrid object.Read grid –Load PanelModel from SBExample2.xml.SBExample2.xml. Example 3: Overlay Vectors and Add InteractivityExample 3 –Read vector from netCDF file into SGTVector object.Read vector –Load PanelModel from SBExample3.xml.SBExample3.xml. –Add color map Legend. –Add printing, class browsing, zoom reset, PanelModel edit.
16
Example 1: Time Series SBExample1.xml
17
2003-10-23NOAATech 2004, Silver Spring, MD17 SBExample1SBExample1 class
18
2003-10-23NOAATech 2004, Silver Spring, MD18 Constuctor
19
2003-10-23NOAATech 2004, Silver Spring, MD19 createGraphic()
20
2003-10-23NOAATech 2004, Silver Spring, MD20 createGraphic() (cont)
21
2003-10-23NOAATech 2004, Silver Spring, MD21 NcSimpleReader1
22
2003-10-23NOAATech 2004, Silver Spring, MD22 getTimeSeries() implementation
23
2003-10-23NOAATech 2004, Silver Spring, MD23 Set shape and read Arrays
24
2003-10-23NOAATech 2004, Silver Spring, MD24 Extract variable and axis values
25
2003-10-23NOAATech 2004, Silver Spring, MD25 Parse time units.
26
2003-10-23NOAATech 2004, Silver Spring, MD26 Parse time offset, create GeoDateArray
27
2003-10-23NOAATech 2004, Silver Spring, MD27 Create SimpleLine and return
29
2003-10-23NOAATech 2004, Silver Spring, MD29 Example 2: Add Grid Plot SBExample2.xml
30
2003-10-23NOAATech 2004, Silver Spring, MD30 SBExample2SBExample2 modifications
31
2003-10-23NOAATech 2004, Silver Spring, MD31 Add Grid to Page
32
2003-10-23NOAATech 2004, Silver Spring, MD32 Add createGridAttribute()
33
2003-10-23NOAATech 2004, Silver Spring, MD33 NcSimpleReader2NcSimpleReader2 - Add getGrid()
34
2003-10-23NOAATech 2004, Silver Spring, MD34 Get shape and x & y axis data
35
2003-10-23NOAATech 2004, Silver Spring, MD35 Adjust shape and get data grid
36
2003-10-23NOAATech 2004, Silver Spring, MD36 Create SimpleGrid and return
37
2003-10-23NOAATech 2004, Silver Spring, MD37
38
2003-10-23NOAATech 2004, Silver Spring, MD38 Example 3: Overlay Vectors and Add Interactivity SBExample3.xml
39
2003-10-23NOAATech 2004, Silver Spring, MD39 SBExample3SBExample3 modifications
40
2003-10-23NOAATech 2004, Silver Spring, MD40 Add Grid Legend
41
2003-10-23NOAATech 2004, Silver Spring, MD41 Add Printing
42
2003-10-23NOAATech 2004, Silver Spring, MD42 Reset Zoom and Open JClassTree
43
2003-10-23NOAATech 2004, Silver Spring, MD43 Edit Printer Layout and PanelModel
44
2003-10-23NOAATech 2004, Silver Spring, MD44 NcSimpleReader3NcSimpleReader3 - Add getVector()
45
2003-10-23NOAATech 2004, Silver Spring, MD45 Modify getGeoDateArray
46
2003-10-23NOAATech 2004, Silver Spring, MD46
47
2003-10-23NOAATech 2004, Silver Spring, MD47 What 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.
48
2003-10-23NOAATech 2004, Silver Spring, MD48 References SGT Beans –“Plug and Play Scientific Graphics with SGT”, NOAAResearch WebShop 2003, Longmont, CO“Plug and Play Scientific Graphics with SGT”, –SGT home pageSGT home page ncBrowse –“ncBrowse: A Graphical netCDF/OPeNDAP Browser”, 11 th ESIP Technical Meeting - OPeNDAP Session, Boulder, CO“ncBrowse: A Graphical netCDF/OPeNDAP Browser”, –ncBrowse home pagencBrowse home page OceanShare –“Fisheries Oceanography Collaboration Software”, 18th AMS International Conference on IIPS, Orlando, FL“Fisheries Oceanography Collaboration Software”, –Collaboration home pageCollaboration home page Climate Data Portal –Climate Data Portal home pageClimate Data Portal home page
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.