ccs.cpc
Interface PluginCallback

All Superinterfaces:
ccs.utils.Hurlable
All Known Implementing Classes:
BrowserLogic

public interface PluginCallback
extends ccs.utils.Hurlable

An interface through which Internal Viewers can talk back to CPC.


Field Summary
static int FIRST
          Offset for getVFileRelativeTo.
static int LAST
          Offset for getVFileRelativeTo.
static int NEXT
          Offset for getVFileRelativeTo.
static int PREVIOUS
          Offset for getVFileRelativeTo.
 
Method Summary
 CpCmdr getCPC()
          Return the CPC object.
 java.lang.String getMIMETypeFor(VFile vf)
          Obtain the MIME type for a given VFile
 VFile getVFileRelativeTo(VFile base, PluginRuntime iv, 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.
 void teleportTo(VFile vf)
          Cause CPC to teleport to the supplied VFile.
 boolean viewerBoundTo(Viewer v, VFile vf)
          Returns whether the viewer is bound to the supplied VFile.
 
Methods inherited from interface ccs.utils.Hurlable
hurl
 

Field Detail

FIRST

static final int FIRST
Offset for getVFileRelativeTo. The result sorts first in the listing.

See Also:
Constant Field Values

PREVIOUS

static final int PREVIOUS
Offset for getVFileRelativeTo. The result is the predecessor to the base.

See Also:
Constant Field Values

NEXT

static final int NEXT
Offset for getVFileRelativeTo. The result is the successor to the base.

See Also:
Constant Field Values

LAST

static final int LAST
Offset for getVFileRelativeTo. The result sorts last in the listing.

See Also:
Constant Field Values
Method Detail

getCPC

CpCmdr getCPC()
Return the CPC object. This contains various methods that viewers may find useful.


teleportTo

void teleportTo(VFile vf)
Cause CPC to teleport to the supplied VFile.


getVFileRelativeTo

VFile getVFileRelativeTo(VFile base,
                         PluginRuntime iv,
                         int offset,
                         java.util.Set<java.lang.String> excludeMimes)
Returns a VFile given a "base" VFile. The returned VFile (if any) will fulfill these criteria:

Parameters:
base - The base, as described above.
iv - 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.
Throws:
IOException - If the method fails to obt

getMIMETypeFor

java.lang.String getMIMETypeFor(VFile vf)
Obtain the MIME type for a given VFile

Parameters:
vf - The VFile to test
Returns:
the MIME type of vf. This is never null.

viewerBoundTo

boolean viewerBoundTo(Viewer v,
                      VFile vf)
Returns whether the viewer is bound to the supplied VFile.


getVFileSorter

java.util.Comparator<VFile> getVFileSorter()
Return the current sort order.