ccs.cpc.impl
Class CpcImpl

java.lang.Object
  extended by ccs.cpc.CpCmdr
      extended by ccs.cpc.impl.CpcImpl

public class CpcImpl
extends CpCmdr

Implementation of CPC. Undocumented.


Field Summary
(package private)  ArchLogic al
           
(package private)  DoLogic dl
           
(package private)  CpcDispatcher ds
           
(package private)  Gui gui
           
(package private)  HurlLogic hl
           
(package private)  Model m
           
(package private)  MainLogic ml
           
(package private)  ProfileLogic pl
           
(package private)  BaseStrain strain
           
 
Fields inherited from class ccs.cpc.CpCmdr
VERSION
 
Constructor Summary
CpcImpl(java.lang.String[] args)
           
 
Method Summary
 ccs.utils.SwappingBuffer chromeFor(java.lang.String path)
          Returns the chrome corresponding to a given file.
 ccs.utils.SwappingBuffer docsFor(java.lang.String path)
          Returns a given file from the documentation.
 VDevice getDeviceForID(java.lang.String deviceID)
          Given a device ID, returns the device it belongs to, ie. for any VDevice vd, vd === getDeviceForID(vd.getID()).
 ImageLoader getImageLoader()
           
 ImageManager getImageManager()
           
 ccs.mime.MimeRegistry getMimeReg()
          Returns the MIME Registry currently in use.
 java.lang.String getStrainTitle()
          Checkpoint Commander exists in two "strains" (biological sense): Checkpoint Commander Standard and Checkpoint Commander Plus.
 ProfileModelElement readProfileElement(java.lang.String classname, java.lang.String key)
          Read a Profile Element.
(package private)  void setStatusDefault()
           
 void status(java.lang.String msg)
          Set the message in the main status box.
 java.lang.String toMem(long n)
          Converts the supplied quantity, which should be a file length, quantity of memory or similar, into a human-readable form.
 void writeProfileElement(ProfileModelElement element)
          Write a Profile Element.
 
Methods inherited from class ccs.cpc.CpCmdr
main, out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ds

CpcDispatcher ds

strain

BaseStrain strain

m

Model m

hl

HurlLogic hl

gui

Gui gui

ml

MainLogic ml

pl

ProfileLogic pl

al

ArchLogic al

dl

DoLogic dl
Constructor Detail

CpcImpl

public CpcImpl(java.lang.String[] args)
Method Detail

chromeFor

public ccs.utils.SwappingBuffer chromeFor(java.lang.String path)
                                   throws java.io.IOException
Returns the chrome corresponding to a given file.

Specified by:
chromeFor in class CpCmdr
Throws:
java.io.IOException

docsFor

public ccs.utils.SwappingBuffer docsFor(java.lang.String path)
                                 throws java.io.IOException
Returns a given file from the documentation.

Specified by:
docsFor in class CpCmdr
Throws:
java.io.IOException

writeProfileElement

public void writeProfileElement(ProfileModelElement element)
Description copied from class: CpCmdr
Write a Profile Element.

Specified by:
writeProfileElement in class CpCmdr
Parameters:
element - The Profile Element to write.
See Also:
readProfileElement

readProfileElement

public ProfileModelElement readProfileElement(java.lang.String classname,
                                              java.lang.String key)
Description copied from class: CpCmdr
Read a Profile Element. The profile element is where an internal viewer stores its persistent state - eg. settings of controls and other user preferences.

Specified by:
readProfileElement in class CpCmdr
Parameters:
classname - The name of the class used. Must implement ProfileModelElement.
key - An additional distinguishing key, if required. This allows two elements of the same class to be added. This can be useful if, for example, two different but related viewers use the same class for storage. Often this isn't required, in which case it should be the empty string.
Returns:
The element, if present; else null. (In the latter case, your next move should be to create a default and add it with writeProfileElement). Note that the returned instance is shared between all instances of the viewer in question. However, it's often the case that each viewer instance needs its own working copy, which won't be affected by changes made by other viewer instances. If so, you should act accordingly. Typically you proceed by having your ProfileModelElement implement Cloneable, and cloning it off.

status

public void status(java.lang.String msg)
Set the message in the main status box. MT-Safe. Call with the empty string to restore the default "Ready" message and the default (arrow) cursor. Other messages are printed, and set the wait (hourglass) cursor.

Parameters:
msg - The status message.

setStatusDefault

void setStatusDefault()

getMimeReg

public ccs.mime.MimeRegistry getMimeReg()
Description copied from class: CpCmdr
Returns the MIME Registry currently in use. This is used to bind filenames to MIME types, and also hints whether files of this type are likely to be compressible. Viewers should use this rather than any other mechanism (eg. java.net.FilenameMap) since it is user-extensible, and when last checked had more up-to-date and more complete defaults.

Specified by:
getMimeReg in class CpCmdr

getDeviceForID

public VDevice getDeviceForID(java.lang.String deviceID)
Description copied from class: CpCmdr
Given a device ID, returns the device it belongs to, ie. for any VDevice vd, vd === getDeviceForID(vd.getID()).

Specified by:
getDeviceForID in class CpCmdr

getStrainTitle

public java.lang.String getStrainTitle()
Description copied from class: CpCmdr
Checkpoint Commander exists in two "strains" (biological sense): Checkpoint Commander Standard and Checkpoint Commander Plus. These have different Frame titles (ie. the title which is displayed on the main GUI window). Viewers should usually include the Frame title for the current strain in their own Frame title, so here it is.

Specified by:
getStrainTitle in class CpCmdr

getImageManager

public ImageManager getImageManager()
Specified by:
getImageManager in class CpCmdr

getImageLoader

public ImageLoader getImageLoader()

toMem

public java.lang.String toMem(long n)
Converts the supplied quantity, which should be a file length, quantity of memory or similar, into a human-readable form.