Class ExamplePlotWindow

All Implemented Interfaces:
gda.observable.IObservable, IPlotWindow

public class ExamplePlotWindow extends AbstractPlotWindow
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:
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.)
  • 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

      public static IPlotWindowManager 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: AbstractPlotWindow
      Create the IPlottingSystem and other controls if necessary
      The IPlottingSystem should 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:
      createPlotControl in class AbstractPlotWindow
      Parameters:
      composite -
    • getPlotMode

      public GuiPlotMode getPlotMode()
      Description copied from class: ScriptingConnection
      Set the default plot mode
      Overrides:
      getPlotMode in class ScriptingConnection
      Returns:
      gui plotmode
    • createRegion

      public void createRegion()
      Description copied from class: ScriptingConnection
      Creates a region if needed
      Overrides:
      createRegion in class ScriptingConnection