ccs.cpc.impl
Class BrowserLogic

java.lang.Object
  extended by ccs.cpc.impl.BrowserLogic
All Implemented Interfaces:
PluginCallback, ccs.utils.Hurlable

public class BrowserLogic
extends java.lang.Object
implements PluginCallback


Field Summary
(package private) static int ACTION
           
(package private)  BrowserGui bg
           
(package private)  BrowserModel bm
           
(package private)  CpcImpl cpc
           
(package private)  Model m
           
(package private)  BrowserRefreshThread refresher
           
(package private) static int SELECT
           
(package private) static int TRAVERSE
           
 
Fields inherited from interface ccs.cpc.PluginCallback
FIRST, LAST, NEXT, PREVIOUS
 
Constructor Summary
BrowserLogic(CpcImpl cpc)
           
 
Method Summary
(package private)  void dispatch(int code, int i)
           
(package private)  void finish()
           
 BrowserModel getBrowserModel()
           
 CpCmdr getCPC()
          Return the CPC object.
 java.awt.Frame getFrame()
           
(package private)  MimeBinding getMimeBinding(VFile vf)
           
 java.lang.String getMIMETypeFor(VFile vf)
          Obtain the MIME type for a given VFile
 VFile getVFileRelativeTo(VFile base, PluginRuntime viewer, int offset, java.util.Set<java.lang.String> excludeMimes)
          Returns a VFile given a "base" VFile.
 java.util.Comparator<VFile> getVFileSorter()
          Return the current sort order.
(package private)  void gotoDeviceList()
           
(package private)  void gotoRootOf(VDevice vd)
           
 void hurl(java.lang.Throwable e)
          Stuff Happened.
(package private)  void initPreview(boolean state)
           
(package private)  boolean isFinished()
           
(package private)  void launchDefaultViewer(VFile vf)
           
(package private)  void launchViewer(VFile vf, java.lang.String viewerID)
           
(package private)  void launchViewer(VFile vf, Viewer v)
           
(package private)  void selectViewer(VFile vf)
           
(package private)  void setPreview(boolean state)
           
(package private)  void showVFileProps(VFile vf)
           
 void teleportTo(VFile slipgate)
          Cause CPC to teleport to the supplied VFile.
(package private)  void updatePwdSelectionModel()
           
 boolean viewerBoundTo(Viewer v, VFile vf)
          Returns whether the viewer is bound to the supplied VFile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bm

BrowserModel bm

bg

BrowserGui bg

cpc

CpcImpl cpc

m

Model m

refresher

BrowserRefreshThread refresher

ACTION

static final int ACTION
See Also:
Constant Field Values

SELECT

static final int SELECT
See Also:
Constant Field Values

TRAVERSE

static final int TRAVERSE
See Also:
Constant Field Values
Constructor Detail

BrowserLogic

BrowserLogic(CpcImpl cpc)
Method Detail

getBrowserModel

public BrowserModel getBrowserModel()

getFrame

public java.awt.Frame getFrame()

dispatch

void dispatch(int code,
              int i)

initPreview

void initPreview(boolean state)

setPreview

void setPreview(boolean state)

finish

void finish()

isFinished

boolean isFinished()

gotoRootOf

void gotoRootOf(VDevice vd)
          throws java.io.IOException
Throws:
java.io.IOException

gotoDeviceList

void gotoDeviceList()

getCPC

public CpCmdr getCPC()
Description copied from interface: PluginCallback
Return the CPC object. This contains various methods that viewers may find useful.

Specified by:
getCPC in interface PluginCallback

hurl

public void hurl(java.lang.Throwable e)
Description copied from interface: ccs.utils.Hurlable
Stuff Happened. Report it.

Specified by:
hurl in interface ccs.utils.Hurlable
Parameters:
e - That which happened.

teleportTo

public void teleportTo(VFile slipgate)
Description copied from interface: PluginCallback
Cause CPC to teleport to the supplied VFile.

Specified by:
teleportTo in interface PluginCallback

getVFileRelativeTo

public VFile getVFileRelativeTo(VFile base,
                                PluginRuntime viewer,
                                int offset,
                                java.util.Set<java.lang.String> excludeMimes)
Description copied from interface: PluginCallback
Returns a VFile given a "base" VFile. The returned VFile (if any) will fulfill these criteria:

Specified by:
getVFileRelativeTo in interface PluginCallback
Parameters:
base - The base, as described above.
viewer - Yourself.
offset - The navigation relationship; one of the four constants above.
excludeMimes - An optional set of MIME types for which you may be registered, but nevertheless don't want to get back under the circumstances. May be null.

getMIMETypeFor

public java.lang.String getMIMETypeFor(VFile vf)
Description copied from interface: PluginCallback
Obtain the MIME type for a given VFile

Specified by:
getMIMETypeFor in interface PluginCallback
Parameters:
vf - The VFile to test
Returns:
the MIME type of vf. This is never null.

viewerBoundTo

public boolean viewerBoundTo(Viewer v,
                             VFile vf)
Description copied from interface: PluginCallback
Returns whether the viewer is bound to the supplied VFile.

Specified by:
viewerBoundTo in interface PluginCallback

getVFileSorter

public java.util.Comparator<VFile> getVFileSorter()
Description copied from interface: PluginCallback
Return the current sort order.

Specified by:
getVFileSorter in interface PluginCallback

getMimeBinding

MimeBinding getMimeBinding(VFile vf)

launchDefaultViewer

void launchDefaultViewer(VFile vf)
                   throws java.io.IOException
Throws:
java.io.IOException

launchViewer

void launchViewer(VFile vf,
                  java.lang.String viewerID)
            throws java.io.IOException
Throws:
java.io.IOException

launchViewer

void launchViewer(VFile vf,
                  Viewer v)
            throws java.io.IOException
Throws:
java.io.IOException

selectViewer

void selectViewer(VFile vf)
            throws java.io.IOException
Throws:
java.io.IOException

showVFileProps

void showVFileProps(VFile vf)
              throws java.io.IOException
Throws:
java.io.IOException

updatePwdSelectionModel

void updatePwdSelectionModel()