Class LiveStreamView

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
uk.ac.gda.client.live.stream.view.LiveStreamView
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
Direct Known Subclasses:
LiveStreamViewWithHistogram

public class LiveStreamView extends org.eclipse.ui.part.ViewPart
A RCP view for connecting to and displaying a live MJPEG stream. The intention is to provide a easy way for cameras to be integrated into GDA, with minimal Spring configuration.

Can be extended by overriding createLivePlot(Composite, String).

To setup this view in Spring create a CameraConfiguration in client Spring

For additional docs see Setup Live Stream Camera View

  • Field Details

  • Constructor Details

    • LiveStreamView

      public LiveStreamView()
  • Method Details

    • createPartControl

      public void createPartControl(org.eclipse.swt.widgets.Composite parent)
      Specified by:
      createPartControl in interface org.eclipse.ui.IWorkbenchPart
      Specified by:
      createPartControl in class org.eclipse.ui.part.WorkbenchPart
    • createLivePlot

      protected void createLivePlot(org.eclipse.swt.widgets.Composite parent, String secondaryId)
      This is the method that actually creates a live stream and sets up the plotting composite.

      To get here the secondary id of the view need to be set (hopefully to a valid camera id)

      When extending this class it is necessary to call this method with the composite the plot should be drawn on.

      Parameters:
      parent - Composite to draw on
      secondaryId - The name of the camera to use and type of stream to display
    • setFocus

      public void setFocus()
      Specified by:
      setFocus in interface org.eclipse.ui.IWorkbenchPart
      Specified by:
      setFocus in class org.eclipse.ui.part.WorkbenchPart
    • getAdapter

      public <T> T getAdapter(Class<T> clazz)
      Specified by:
      getAdapter in interface org.eclipse.core.runtime.IAdaptable
      Overrides:
      getAdapter in class org.eclipse.ui.part.WorkbenchPart
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.eclipse.ui.IWorkbenchPart
      Overrides:
      dispose in class org.eclipse.ui.part.WorkbenchPart
    • reopenView

      public void reopenView()
      Reopen the currently displayed live stream view by calling openViewWithSecondaryId(String, boolean)
    • openViewWithSecondaryId

      protected void openViewWithSecondaryId(String secondaryId, boolean closeExistingView)
      Open a live stream view with the secondary ID specified
      Parameters:
      secondaryId -
      closeExistingView - close the existing view first
    • getID

      protected String getID()
    • getActiveCameraConfiguration

      public CameraConfiguration getActiveCameraConfiguration()
    • getActiveStreamType

      public StreamType getActiveStreamType()
    • getSnapshot

      public SnapshotData getSnapshot() throws LiveStreamException
      Throws:
      LiveStreamException
    • getPlottingSystem

      public IPlottingSystem<org.eclipse.swt.widgets.Composite> getPlottingSystem()
    • getITrace

      protected IImageTrace getITrace()
    • getPlottingComposite

      protected LivePlottingComposite getPlottingComposite()
    • setPlottingComposite

      protected void setPlottingComposite(LivePlottingComposite plottingComposite)