Multivalent API

multivalent.std.adaptor
Class ManualPage

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Behavior
          extended by multivalent.MediaAdaptor
              extended by multivalent.std.adaptor.ManualPage

public class ManualPage
extends MediaAdaptor

Media adaptor for UNIX manual pages (directly from roff -man source). Along with HTML and ASCII, example of a media adaptor directly building the tree rather than first translating to a big HTML String. No need for nroff, rman, or caching formatted pages. Parsing is much faster than TkMan, because TkMan can't parse in Tcl (waaay to slow) and rman costs and exec and generating a big string and processing a big string by Tk text widget. In fact, this is so fast that there is no need for preformatted cat versions of pages, or for progressive rendering as manual pages are usually local and even is bash short enough (200K) to be fast (4 seconds, with decompression while playing MP3 on 500MHz Pentium III).

Version:
$Revision: 1.17 $ $Date: 2005/02/10 05:47:56 $
See Also:
ManualPageVolume,

Field Summary
 
Fields inherited from class multivalent.MediaAdaptor
HINT_DEFAULTS, HINT_EXACT, HINT_FAST, HINT_METADATA_ONLY, HINT_NO_IMAGE, HINT_NO_INTERACTIVE, HINT_NO_LAYOUT, HINT_NO_SHAPE, HINT_NO_SHOW, HINT_NO_STYLE, HINT_NO_TEXT, HINT_NO_TRANSCLUSION, HINT_NONE, HINT_NORMALIZE
 
Fields inherited from class multivalent.Behavior
ATTR_BEHAVIOR, name_
 
Fields inherited from class multivalent.VObject
attr_
 
Constructor Summary
ManualPage()
           
 
Method Summary
 java.lang.Object parse(INode root)
          Parse *roff, translate to document tree.
 boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
          Since not all man page references are recognizable as such, have docpopup choice to treat current word as man page ref.
 
Methods inherited from class multivalent.MediaAdaptor
buildBefore, close, destroy, getHints, getInputUni, getURI, getZoom, isAuthorized, isStopped, parseHelper, semanticEventAfter, setHints, setInput, setInput, setPassword, setZoom, stop
 
Methods inherited from class multivalent.Behavior
buildAfter, checkRep, clipboardAfter, clipboardBefore, createUI, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, paintBefore, putPreference, redo, restore, restoreChildren, save, setName, toString, undo
 
Methods inherited from class multivalent.VObject
attrEntrySetIterator, attrKeysIterator, clearAttributes, getAttr, getAttr, getAttributes, getGlobal, getValue, hasAttributes, putAttr, removeAttr, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManualPage

public ManualPage()
Method Detail

parse

public java.lang.Object parse(INode root)
                       throws java.lang.Exception
Parse *roff, translate to document tree.

Specified by:
parse in class MediaAdaptor
Returns:
whatever Object is appropriate to the media adaptor. For HTML it is the root of the HTML tree (which has name "html"), for documents with no single root it can be parent, for an image constuctor it could be an Image. However, the primary job of a media adaptor is to add content to the document tree.
Throws:
java.lang.Exception
See Also:
for a convenient way to attach spans

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se,
                                   java.lang.String msg)
Since not all man page references are recognizable as such, have docpopup choice to treat current word as man page ref.

Overrides:
semanticEventBefore in class Behavior

Multivalent API