medi.util
Class PreviewDispatcher

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--medi.util.PreviewDispatcher
All Implemented Interfaces:
java.lang.Runnable

public class PreviewDispatcher
extends java.lang.Thread

It is a class to dispatch preview classes.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PreviewDispatcher(java.lang.String str)
          Creates new PreviewDispatcher
 
Method Summary
 void hideFrame()
          Hides the preview frame.
 boolean isFrameVisible()
          Checks if the frame is visible.
 void mountAndRetry()
          Mounts the volume and retry displaying the file.
 void preview(Clippable obj)
          Previews the object.
 void preview(java.lang.Long dataID)
          Previews a file.
 void run()
          Thread's run method.
 void setProvider(Provider pPrv)
          Sets the provider to use.
 void setVolumeMounter(VolumeMounter pVmount)
          Sets the volume mounter.
 void showFrame()
          Shows the preview-frame.
 void stopAll()
          Stops the thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreviewDispatcher

public PreviewDispatcher(java.lang.String str)
Creates new PreviewDispatcher

Parameters:
str - The thread's name. Choose the one that you like.
Method Detail

setProvider

public void setProvider(Provider pPrv)
                 throws DbException
Sets the provider to use.

Parameters:
pPrv - The provider to use.
Throws:
DbException - If something goes wrong.

setVolumeMounter

public void setVolumeMounter(VolumeMounter pVmount)
Sets the volume mounter.

Parameters:
pVmount - The volume mounter to use.

preview

public void preview(java.lang.Long dataID)
             throws DbException
Previews a file.

Parameters:
dataID - The data ID of the file to preview.
Throws:
DbException - If something goes wrong.

preview

public void preview(Clippable obj)
             throws DbException
Previews the object.

Parameters:
obj - The clippable object to be previewed.
Throws:
DbException - If something goes wrong.

showFrame

public void showFrame()
Shows the preview-frame.


hideFrame

public void hideFrame()
Hides the preview frame.


isFrameVisible

public boolean isFrameVisible()
Checks if the frame is visible.

Returns:
true: the frame is visible; false: the frame is NOT visible.

mountAndRetry

public void mountAndRetry()
                   throws DbException
Mounts the volume and retry displaying the file.

Throws:
DbException - If something goes wrong.

run

public void run()
Thread's run method.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopAll

public void stopAll()
Stops the thread.