multivalent.std.ui

Class Multipage

public class Multipage extends Behavior

Interface for paginated document types to choose page number (next, previous, first, last, enter number). Common code shared by multipage media adaptors (berkeley.adaptor.Xdoc, tex.dvi.DVI, PDF). Uses ATTR_PAGE and ATTR_PAGECOUNT.

Version: $Revision: 1.8 $ $Date: 2002/03/07 00:56:23 $

See Also: PersonalAnnos MediaAdaptor

Field Summary
static StringMSG_CLOSEPAGE
Close current document page, giving other behaviors a chance to save state before moving to a new page or different document.
static StringMSG_FIRSTPAGE
Move to the first page of a multipage document.
static StringMSG_GOPAGE
Move to the given page of a multipage document.
static StringMSG_LASTPAGE
Move to the last page of a multipage document.
static StringMSG_NEXTPAGE
Move to the next page of a multipage document.
static StringMSG_OPENEDPAGE
Announce new page of document has been opened.
static StringMSG_OPENPAGE
Open a different page of a multipage document as given by the Document's ATTR_PAGE attribute.
static StringMSG_PREVPAGE
Move to the previous page of a multipage document.
static StringMSG_RELOADPAGE
Opens same page.
static intPAGECOUNT_NOT_APPLICABLE
static intPAGECOUNT_UNKNOWN
Method Summary
voidbuildAfter(Document doc)
booleaneventAfter(AWTEvent e, Point rel, Node n)
If at bottom of page, Space and PageDown flip to next page.
voidrestore(ESISNode n, Map<String,Object> attr, Layer layer)
If page given in URL anchor (e.g, #page=5 or #page10 or #page.15), use that.
booleansemanticEventAfter(SemanticEvent se, String msg)
Implement the following events: previosuPage, nextPage, fistPage, lastPage.
booleansemanticEventBefore(SemanticEvent se, String msg)
Appear in Go menu, doc popup, toolbar.

Field Detail

MSG_CLOSEPAGE

public static final String MSG_CLOSEPAGE
Close current document page, giving other behaviors a chance to save state before moving to a new page or different document.

"closePage": arg= java.lang.Integer current-page-number

MSG_FIRSTPAGE

public static final String MSG_FIRSTPAGE
Move to the first page of a multipage document.

"firstDocumentPage".

MSG_GOPAGE

public static final String MSG_GOPAGE
Move to the given page of a multipage document.

"goPageNum": arg= java.lang.String or java.lang.Integer new-page-number

MSG_LASTPAGE

public static final String MSG_LASTPAGE
Move to the last page of a multipage document.

"lastDocumentPage".

MSG_NEXTPAGE

public static final String MSG_NEXTPAGE
Move to the next page of a multipage document.

"nextPage".

MSG_OPENEDPAGE

public static final String MSG_OPENEDPAGE
Announce new page of document has been opened.

"openedDocumentPage": arg= xxx

MSG_OPENPAGE

public static final String MSG_OPENPAGE
Open a different page of a multipage document as given by the Document's ATTR_PAGE attribute.

"openDocumentPage".

MSG_PREVPAGE

public static final String MSG_PREVPAGE
Move to the previous page of a multipage document.

"previousPage".

MSG_RELOADPAGE

public static final String MSG_RELOADPAGE
Opens same page.

"reloadDocumentPage".

PAGECOUNT_NOT_APPLICABLE

public static final int PAGECOUNT_NOT_APPLICABLE

PAGECOUNT_UNKNOWN

public static final int PAGECOUNT_UNKNOWN

Method Detail

buildAfter

public void buildAfter(Document doc)

eventAfter

public boolean eventAfter(AWTEvent e, Point rel, Node n)
If at bottom of page, Space and PageDown flip to next page. If at top of page, PageUp flips to bottom of previous page. HOME goes to first page, END goes to last.

restore

public void restore(ESISNode n, Map<String,Object> attr, Layer layer)
If page given in URL anchor (e.g, #page=5 or #page10 or #page.15), use that. Else if PAGE attr already set, store it and set to null, so paginated media adaptor won't try to build.

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)
Implement the following events: previosuPage, nextPage, fistPage, lastPage.

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se, String msg)
Appear in Go menu, doc popup, toolbar.