multivalent.std

Class LinkMarkup

public class LinkMarkup extends Behavior

For plain Jane document formats without hyperlinks, scan text looking for patterns to make into links, such as "protocol://host.domain", "www.host.domain", "ftp.host.domain", "user@host.domain". Manual pages not referred to much outside of other man pages, so that scanning left with that media adaptor. Better to be conservative and fast than exact, as also have alt-button-on-word for dynamic determination of a link type. Not necessary as can always treat any text as some link with the LinkMe behavior.

LATER: use regexp, load patterns from hub (then easy to inclue man pages or not), look for email and USENET quoted text.

Version: $Revision: 1.4 $ $Date: 2002/05/13 05:09:42 $

See Also: LinkMe

Field Summary
static StringMSG_LINKSCAN
Scan for implicit links.
static StringMSG_SET_ACTIVE
Sets active state on/off.
static PatternPATTERN
static StringPREF_AUTO
Boolean.
Method Summary
voidbuildAfter(Document doc)
booleanisActive()
voidscan()
booleansemanticEventAfter(SemanticEvent se, String msg)
Semantic events: toggleLinkScan, closeDocument cleans up link list.
booleansemanticEventBefore(SemanticEvent se, String msg)
Add entry to View menu.
voidsetActive(boolean active)

Field Detail

MSG_LINKSCAN

public static final String MSG_LINKSCAN
Scan for implicit links.

"linkScan": arg= java.util.HashMap attributes, in= INode root of tree, out=unused.

MSG_SET_ACTIVE

public static final String MSG_SET_ACTIVE
Sets active state on/off.

"linkScanSetActive": arg= java.lang.String or java.lang.Boolean or null to toggle.

PATTERN

public static final Pattern PATTERN

PREF_AUTO

public static final String PREF_AUTO
Boolean.

Method Detail

buildAfter

public void buildAfter(Document doc)

isActive

public boolean isActive()

scan

public void scan()

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)
Semantic events: toggleLinkScan, closeDocument cleans up link list.

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se, String msg)
Add entry to View menu.

setActive

public void setActive(boolean active)