-
Created by Unknown User (chevtsov), last modified on Jun 17, 2011
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 9
Next »
- #Setup
- #Environment
- #Dependencies
- #Test inside Eclipse
- #Development
- #Overview
- #Classes and Functions
- #Model
- #Controllers
- #Panels
- #XYPlots
- #Renderers
- #Other
- #Release with Eclipse
Setup
Environment
- Effectively, you can develop BeamlineZplot inside Eclipse on lcls-builder.
- Check out the CVS module physics/beamlineZplot into your workspace
- From now on, the root of project is referred to as $ZPLOT_ROOT
Dependencies
- SLAColors (latest version)
- SwingUtil (latest version)
- xyplot (latest version)
Test inside Eclipse
- Select $ZPLOT_ROOT/src/edu.stanford.slac.util.zplot.example/SimpleExampleApplication
- Right-click => select Run As... => Java Application
- Add -Dsun.java2d.pmoffscreen=false to VM arguments, if too slow
Development
Overview
API
- Best is to look in $ZPLOT_ROOT/src/edu.stanford.slac.util.zplot.example/SimpleExampleApplication for how to use the API
Classes and Functions
Model
edu.stanford.slac.util.zplot.cartoon.model.CartoonDevice
edu.stanford.slac.util.zplot.model.Beamline
- Has name, start z position, and end z position
edu.stanford.slac.util.zplot.model.Device
- Has color, shape, and stroke
Controllers
edu.stanford.slac.util.zplot.ZPlotController
- Adds functionality to the right-click menu and the PropertiesDialog
edu.stanford.slac.util.zplot.ZPlotEvent, edu.stanford.slac.util.zplot.ZPlotListener
- Provide support for processing events after a tooltip is shown, or zoom is completed
Panels
edu.stanford.slac.util.zplot.ui.AbstractPanel
- Parent of all beamlineZplot panels
edu.stanford.slac.util.zplot.ui.CartoonFilterPanel
edu.stanford.slac.util.zplot.ui.DevicePlotsPanel
edu.stanford.slac.util.zplot.ui.DeviceRangePanel
edu.stanford.slac.util.zplot.ui.DevicesPanel
- Panel for configuring Devices (as well as CartoonDevices)
- Located on the Devices tab of the PropertiesDialog
edu.stanford.slac.util.zplot.ui.PropertiesDialog
- Dialog that pops up when you right-click on the plot and select "Properties..."
XYPlots
edu.stanford.slac.util.zplot.ZPlot
- Main plot for Devices; can include several subplots (e.g. X, Y) as well as a beamline cartoon; can draw device labels and beamlines (on the x-axis)
edu.stanford.slac.util.zplot.cartoon.BeamlineCartoon
org.jfree.chart.plot.XYPlot
- Modified JFreeChart XYPlot
- Fixed bugs; needed access to some private methods
Renderers
edu.stanford.slac.util.zplot.ZPlotFeatherRenderer
- Draws Devices as feathers (sticks)
edu.stanford.slac.util.zplot.ZPlotLineAndShapeRenderer
- Draws devices as shapes; optionally connects lines between them
edu.stanford.slac.util.zplot.cartoon.CartoonRenderer
- Draws CartoonDevices as shapes
Other
edu.stanford.slac.util.zplot.DevicesDataset
- Adapts an array of Devices into a JFreeChart-specific dataset class
edu.stanford.slac.util.zplot.MatlabUtil
- Utility methods for access from Matlab
edu.stanford.slac.util.zplot.ZPlotUtil
- Contains useful methods, mostly related to Java2D
- Adopts a CartoonWidget as an instance of Icon
- A repository of widgets for different types of devices
Release with Eclipse
- Add a note in $ZPLOT_ROOT/RELEASE_NOTES
- Increment the tag version accordingly
- Commit to CVS
- Tag with beamlineZplot-R#-#-#
- Check out the tagged version into production
cd $PHYSICS_TOP/release
cvs co -r beamlineZplot-R#-#-# -d beamlineZplot-R#-#-# physics/beamlineZplot
- Select File => New Java project => Create project from existing source
- Select $PHYSICS_TOP/release/beamlineZplot-R#-#-#
- Name the project beamlineZplot-R#-#-#
- Press "Finish"
- Right-click on the new project beamlineZplot-R#-#-# => Export...
- Select Java => JAR file
- Check beamlineZplot-R#-#-# in "Resources to export"
- Check "Export generated class files and resources"
- As the export destination, type (and/or select)
$PHYSICS_TOP/release/beamlineZplot-R#-#-#/jar/beamlineZplot.jar
- Press "Finish"
- Move the symbolic link
cd $PHYSICS_TOP/
rm -rf beamlineZplot; ln -s release/beamlineZplot-R#-#-# beamlineZplot