fable.imageviewer.component
Class ImagePlay

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by fable.imageviewer.component.ImagePlay
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

public class ImagePlay
extends org.eclipse.ui.part.ViewPart

ImagePlay implements a view to step through images and/or play images in a loop. The play controls view does not allow multiple views. The view can be detached for ease of use.

Author:
Andy Gotz (ESRF)

Field Summary
static java.lang.String ID
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
ImagePlay()
           
 
Method Summary
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
 boolean isAdvancePlay()
           
 java.lang.Thread PlayThread()
          This method will return a thread to advance the file index in play mode.
 void setAdvancePlay(boolean advancePlay)
           
 void setFocus()
           
static void setView(ImageComponent view)
          Set the view to which the play controls will apply (usually the main image view)
 void startPlay(int step, int wait)
           
 
Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationData
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

ImagePlay

public ImagePlay()
Method Detail

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

setFocus

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

isAdvancePlay

public boolean isAdvancePlay()
Returns:
the advancePlay

setAdvancePlay

public void setAdvancePlay(boolean advancePlay)
Parameters:
advancePlay - the advancePlay to set

startPlay

public void startPlay(int step,
                      int wait)

PlayThread

public java.lang.Thread PlayThread()
This method will return a thread to advance the file index in play mode. It should be called by the play buttons back and forward. The thread is ready to be run with start(). The thread will stop when the play flag is set to false.

Returns:
play thread

setView

public static void setView(ImageComponent view)
Set the view to which the play controls will apply (usually the main image view)

Parameters:
view - - ImageView to attach play controls to