|
Multivalent API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmultivalent.VObject
multivalent.Behavior
multivalent.MediaAdaptor
multivalent.std.adaptor.DirectoryLocal
MediaAdaptor that displays contents of a local directory.
Reads directory and generates HTML which is passed on to HTML media adaptor.
HTML nodes should be publicly available so nodes can be directly created, rather than have a string generated only to be immediately parsed.
Initial sorting by filename done by throwing a TableSort event, rather than built in.
| Field Summary | |
|---|---|
static java.lang.String |
FIELDS
|
static java.lang.String |
MSG_SET_BKUP
Toggle between showing backup files ("...~", "....bkup", ...). |
static java.lang.String |
MSG_SET_DIRTYPE
Toggle between short name-only and full with dates and so on. |
static java.lang.String |
PREF_NOBKUP
|
static java.lang.String |
PREF_TYPE
|
static java.lang.String |
SHORT
|
| 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 | |
|---|---|
DirectoryLocal()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
parse(INode parent)
Parses a document's data format and constructs a document tree. |
boolean |
semanticEventAfter(SemanticEvent se,
java.lang.String msg)
On Document.MSG_STOP, set stop flag, which subclass has to check for periodically. |
boolean |
semanticEventBefore(SemanticEvent se,
java.lang.String msg)
Choose between short and fielded displays. |
java.lang.String |
toHTML(java.lang.String path)
|
| Methods inherited from class multivalent.MediaAdaptor |
|---|
buildBefore, close, destroy, getHints, getInputUni, getURI, getZoom, isAuthorized, isStopped, parseHelper, 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 |
| Field Detail |
|---|
public static final java.lang.String MSG_SET_DIRTYPE
"setDirectoryType": arg= SHORT or FIELDS or null to toggle.
public static final java.lang.String MSG_SET_BKUP
"setShowBackup": arg= String boolean or Boolean or null to toggle.
public static final java.lang.String PREF_TYPE
public static final java.lang.String PREF_NOBKUP
public static final java.lang.String SHORT
public static final java.lang.String FIELDS
| Constructor Detail |
|---|
public DirectoryLocal()
| Method Detail |
|---|
public java.lang.Object parse(INode parent)
throws java.lang.Exception
MediaAdaptorBefore using, invoke MediaAdaptor.setInput(InputUni).
The newly constructed document tree should attach to parent.
The parent is usually but not necessarily a Document.
Paginated documents should build the current page only, as indicated by the attribute Document.ATTR_PAGE, and report their page count to Document.ATTR_PAGECOUNT.
Metadata, such as author and dates, should be stored in the closed containing Document.
If encountering an unfixable/unrecoverable parsing error, usually due to an invalid data format, throws a ParseException.
(This does not supercede IOException.)
When media adaptor is done or has thrown an exception, the client must MediaAdaptor.close() it.
Subclasses should not rely on being able to obtain a Root, Browser, or Multivalent;
in such cases it is acceptable to reduce functionality.
parse in class MediaAdaptorImage.
However, the primary job of a media adaptor is to add content to the document tree.
java.lang.Exceptionfor a convenient way to attach spanspublic java.lang.String toHTML(java.lang.String path)
public boolean semanticEventBefore(SemanticEvent se,
java.lang.String msg)
semanticEventBefore in class Behavior
public boolean semanticEventAfter(SemanticEvent se,
java.lang.String msg)
MediaAdaptorDocument.MSG_STOP, set stop flag, which subclass has to check for periodically.
semanticEventAfter in class MediaAdaptor
|
Multivalent API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||