Class ExamplePlotWindow
java.lang.Object
uk.ac.diamond.scisoft.analysis.plotclient.ScriptingConnection
uk.ac.diamond.scisoft.analysis.rcp.plotting.AbstractPlotWindow
uk.ac.diamond.scisoft.analysis.rcp.plotting.ExamplePlotWindow
- All Implemented Interfaces:
gda.observable.IObservable,IPlotWindow
Plot Window example
This plot window enables to create a custom Plot View with custom controls side by side with an IPlottingSystem
linked to the plot server.
The IPlottingSystem should be created the following way:
(see
This plot window enables to create a custom Plot View with custom controls side by side with an IPlottingSystem
The IPlottingSystem
plottingSystem = PlottingFactory.createPlottingSystem();plottingSystem.setColorOption(ColorOption.NONE);plottingSystem.createPlotPart(parent, getName(), bars, PlotType.XY, (IViewPart) getGuiManager());plottingSystem.repaint();plottingSystem.addRegionListener(getRoiManager());
plottingSystem.addTraceListener(getRoiManager().getTraceListener());(see
ExamplePlotView for more info.)-
Field Summary
Fields inherited from class uk.ac.diamond.scisoft.analysis.rcp.plotting.AbstractPlotWindow
bars, parentComp, plotSystemCompositeFields inherited from class uk.ac.diamond.scisoft.analysis.plotclient.ScriptingConnection
myBeanMemory, name, plotConnection, plottingSystem, roiManager -
Constructor Summary
ConstructorsConstructorDescriptionExamplePlotWindow(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.IActionBars bars, org.eclipse.ui.IWorkbenchPart part, String name) ExamplePlotWindow(org.eclipse.swt.widgets.Composite parent, IBeanScriptingManager manager, org.eclipse.ui.IActionBars bars, org.eclipse.ui.IWorkbenchPart part, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreatePlotControl(org.eclipse.swt.widgets.Composite composite) Create the IPlottingSystemand other controls if necessary
The IPlottingSystemshould be created the following way:
plottingSystem = PlottingFactory.createPlottingSystem();
plottingSystem.setColorOption(ColorOption.NONE);
plottingSystem.createPlotPart(parent, getName(), bars, PlotType.XY, (IViewPart) getGuiManager());
plottingSystem.repaint();
plottingSystem.addRegionListener(getRoiManager());plottingSystem.addTraceListener(getRoiManager().getTraceListener());
voidCreates a region if neededstatic IPlotWindowManagerObtain the IPlotWindowManager for the running Eclipse.Set the default plot modeMethods inherited from class uk.ac.diamond.scisoft.analysis.rcp.plotting.AbstractPlotWindow
addClearAction, addDuplicateAction, changePlotMode, dispose, getPart, isExclusiveToolars, removePreviousActions, setExclusiveToolars, setFocusMethods inherited from class uk.ac.diamond.scisoft.analysis.plotclient.ScriptingConnection
addIObserver, cleanUpPlottingSystem, clearPlot, deleteIObserver, deleteIObservers, getAdapter, getDataBean, getGuiManager, getName, getNotififyListener, getObservers, getPlottingSystem, getPlotUI, getPreviousMode, getRoiManager, isUpdatePlot, notifyUpdateFinished, processGUIUpdate, processPlotUpdate, setDataBean, setNotifyListener, setPlottingSystem, setPreviousMode, setUpdatePlot, setVisibleByPlotType, updatePlotMode, updatePlotModeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.ac.diamond.scisoft.analysis.plotclient.IPlotWindow
getName
-
Constructor Details
-
ExamplePlotWindow
public ExamplePlotWindow(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.IActionBars bars, org.eclipse.ui.IWorkbenchPart part, String name) -
ExamplePlotWindow
public ExamplePlotWindow(org.eclipse.swt.widgets.Composite parent, IBeanScriptingManager manager, org.eclipse.ui.IActionBars bars, org.eclipse.ui.IWorkbenchPart part, String name)
-
-
Method Details
-
getManager
Obtain the IPlotWindowManager for the running Eclipse.- Returns:
- singleton instance of IPlotWindowManager
-
createPlotControl
public void createPlotControl(org.eclipse.swt.widgets.Composite composite) Description copied from class:AbstractPlotWindowCreate the IPlottingSystemand other controls if necessary
The IPlottingSystemshould be created the following way:
plottingSystem = PlottingFactory.createPlottingSystem();
plottingSystem.setColorOption(ColorOption.NONE);
plottingSystem.createPlotPart(parent, getName(), bars, PlotType.XY, (IViewPart) getGuiManager());
plottingSystem.repaint();
plottingSystem.addRegionListener(getRoiManager());plottingSystem.addTraceListener(getRoiManager().getTraceListener());
- Overrides:
createPlotControlin classAbstractPlotWindow- Parameters:
composite-
-
getPlotMode
Description copied from class:ScriptingConnectionSet the default plot mode- Overrides:
getPlotModein classScriptingConnection- Returns:
- gui plotmode
-
createRegion
public void createRegion()Description copied from class:ScriptingConnectionCreates a region if needed- Overrides:
createRegionin classScriptingConnection
-